Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some sort of GameObject #5

Open
bil-bas opened this issue Jul 13, 2011 · 0 comments
Open

Some sort of GameObject #5

bil-bas opened this issue Jul 13, 2011 · 0 comments
Labels
Milestone

Comments

@bil-bas
Copy link
Contributor

bil-bas commented Jul 13, 2011

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    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant