samples/99_genre_arcade/sound_golf/app/main.rb
def calc args
  args.state.target_note ||= available_notes.sample # chooses a note from available_notes collection as target note
  args.state.click_feedbacks.each    { |c| c.solid[-1] -= 5 } # remove this line and solid color will remain on screen indefinitely
  # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection
  args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 }
end
# Sets the target note for the level and performs calculations on click_feedbacks.
Sets the target note for the level and performs calculations on click_feedbacks.
Sets the target note for the level and performs calculations on click_feedbacks .
def calc args
  args.state.target_note ||= available_notes.sample 
  args.state.click_feedbacks.each    { |c| c.solid[-1] -= 5 } 
  args.state.click_feedbacks.reject! { |c| c.solid[-1] <= 0 }
end
def calc args args . state . target_note ||= available_notes . sample args . state . click_feedbacks . each { | c | c . solid [ - 1 ] -= 5 } args . state . click_feedbacks . reject! { | c | c . solid [ - 1 ] <= 0 } end
Sets the target note for the level and performs calculations on click_feedbacks.
Sets the target note for the level and performs calculations on click_feedbacks .
# chooses a note from available_notes collection as target note # remove this line and solid color will remain on screen indefinitely # comment this line out and the solid color will keep flashing on screen instead of being removed from click_feedbacks collection
args