ray icon indicating copy to clipboard operation
ray copied to clipboard

Some sort of GameObject

Open bil-bas opened this issue 13 years ago • 0 comments

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    

bil-bas avatar Jul 13 '11 17:07 bil-bas