shawn42 / gamebox

A game template for building and distributing Gosu apps.
267 stars 29 forks source link

Fixed up netris! #82

Closed tanema closed 11 years ago

tanema commented 11 years ago

another day another pull request :P

I fixed up netris so it work properly and is pretty clean. grid.rb could use a clean up I think maybe. Also I have 2 questions while in the process of redoing this game.

  1. Is there a way that I can define_actor_view and then use that view for several different actors? if so it would really clean up most of the actors in netris
  2. How can I define methods on an actor that can be called by external game logic, either from it's behaviour or from its view.

cheers!

shawn42 commented 11 years ago

Looks good, I think my next commits will answer your questions. A few things to note: you can specify a view attribute to use for your actors. Also, any param passed to create_actor will become an attribute on the actor. Jump in #gamebox on freenode if you have more questions.