Class: Teien::ActorManager
- Inherits:
-
Object
- Object
- Teien::ActorManager
- Defined in:
- lib/teien/actor/actor_manager.rb
Instance Attribute Summary collapse
-
#actors ⇒ Object
Returns the value of attribute actors.
Instance Method Summary collapse
- #create_actor(actor_info) ⇒ Object
-
#initialize ⇒ ActorManager
constructor
A new instance of ActorManager.
- #update(delta) ⇒ Object
Constructor Details
#initialize ⇒ ActorManager
Returns a new instance of ActorManager.
11 12 13 14 15 |
# File 'lib/teien/actor/actor_manager.rb', line 11 def initialize() @actors = Hash.new @event_router = Teien::get_component("event_router") @event_router.register_receiver(self) end |
Instance Attribute Details
#actors ⇒ Object
Returns the value of attribute actors.
9 10 11 |
# File 'lib/teien/actor/actor_manager.rb', line 9 def actors @actors end |
Instance Method Details
#create_actor(actor_info) ⇒ Object
17 18 19 20 21 |
# File 'lib/teien/actor/actor_manager.rb', line 17 def create_actor(actor_info) actor = ActorFactory::create_actor(actor_info) @actors[actor_info.actor_name] = actor actor end |
#update(delta) ⇒ Object
23 24 25 26 27 |
# File 'lib/teien/actor/actor_manager.rb', line 23 def update(delta) @actors.each_value {|actor| actor.update(delta) } end |