samples/99_genre_fighting/01_special_move_inputs/app/main.rb
def reset_player args
  args.state.player.x = 0
  args.state.player.y = args.state.bridge_top
  args.state.player.dy = 0
  args.state.player.dx = 0
  args.state.enemy.hammers.clear # empties hammer collection
  args.state.enemy.hammer_queue.clear # empties hammer_queue
  args.state.game_over_at = args.state.tick_count # game_over_at set to current frame (or passage of time)
end
# Resets the player by changing its properties back to the values they had at initialization
Resets the player by changing its properties back to the values they had at initialization
Resets the player by changing its properties back to the values they had at initialization
def reset_player args
  args.state.player.x = 0
  args.state.player.y = args.state.bridge_top
  args.state.player.dy = 0
  args.state.player.dx = 0
  args.state.enemy.hammers.clear 
  args.state.enemy.hammer_queue.clear 
  args.state.game_over_at = args.state.tick_count 
end
def reset_player args args . state . player . x = 0 args . state . player . y = args . state . bridge_top args . state . player . dy = 0 args . state . player . dx = 0 args . state . enemy . hammers . clear args . state . enemy . hammer_queue . clear args . state . game_over_at = args . state . tick_count end
Resets the player by changing its properties back to the values they had at initialization
Resets the player by changing its properties back to the values they had at initialization
# empties hammer collection # empties hammer_queue # game_over_at set to current frame (or passage of time)
args