Module: Chingu::GameObjectHelpers
Instance Method Summary collapse
-
#game_objects_of_class(klass) ⇒ Object
Fetch game objects of a certain type/class.
Instance Method Details
#game_objects_of_class(klass) ⇒ Object
Fetch game objects of a certain type/class
148 149 150 |
# File 'lib/chingu/helpers.rb', line 148 def game_objects_of_class(klass) @game_objects.select { |game_object| game_object.is_a? klass } end |