samples/99_genre_arcade/sound_golf/app/main.rb
def defaults args
  args.state.notes ||= []
  args.state.click_feedbacks ||= []
  args.state.current_level ||= 1
  args.state.times_wrong ||= 0 # when game starts, user hasn't guessed wrong yet
end
# Sets default values and creates empty collections
# Initialization happens in the first frame only
Sets default values and creates empty collections
Initialization happens in the first frame only
Sets default values and creates empty collections Initialization happens in the first frame only
def defaults args
  args.state.notes ||= []
  args.state.click_feedbacks ||= []
  args.state.current_level ||= 1
  args.state.times_wrong ||= 0 
end
def defaults args args . state . notes ||= [ ] args . state . click_feedbacks ||= [ ] args . state . current_level ||= 1 args . state . times_wrong ||= 0 end
Sets default values and creates empty collections
Initialization happens in the first frame only
Sets default values and creates empty collections Initialization happens in the first frame only
# when game starts, user hasn't guessed wrong yet
args