Module: Shattered::Model
Overview
Models encompass all of the game play logic and the game specific data.
Models are useful for unit tests and for making game rules. They are where all logic (AI/collisions/etc) go.
They can also specify keyboard input.
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Class Method Details
.append_features(base) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/shattered_model/shattered_model.rb', line 10 def self.append_features(base) super base.send(:include, Timer) base.send(:include, Input) base.send(:timer, :every => :frame, :action => :update_input) base.send(:include, InstanceMethods) base.send(:timer, :every => :frame, :action => :update_time_elapsed) end |