ray
ray copied to clipboard
Some sort of GameObject
Since developers will want to move a lot of the game logic away from the scene and into objects like the player and enemies, it makes sense to have a base for this (object or module).
As a minimum:
class GameObject
include Ray::Helper
attr_reader :window # This is required if you want to use #holding?
def initialize(scene)
@window = scene.window
self.raiser_runner = scene.raiser_runner # To allow things like animations to raise events.
self.event_runner = scene.event_runner # To get access to #on
end
end