Class: GameMachine::Handlers::Game
- Inherits:
-
Actor::Base
- Object
- JavaLib::GameActor
- Actor::Base
- GameMachine::Handlers::Game
- Includes:
- Commands
- Defined in:
- lib/game_machine/handlers/game.rb
Constant Summary
Constants inherited from Actor::Base
Instance Attribute Summary collapse
-
#destinations ⇒ Object
readonly
Returns the value of attribute destinations.
-
#game_message_routes ⇒ Object
readonly
Returns the value of attribute game_message_routes.
Instance Method Summary collapse
Methods included from Commands
Methods inherited from Actor::Base
aspect, aspects, find, find_by_address, find_distributed, find_distributed_local, find_remote, hashring, local_path, model_filter, #onReceive, player_controller, #receive_message, #schedule_message, #sender, set_player_controller
Instance Attribute Details
#destinations ⇒ Object (readonly)
Returns the value of attribute destinations.
6 7 8 |
# File 'lib/game_machine/handlers/game.rb', line 6 def destinations @destinations end |
#game_message_routes ⇒ Object (readonly)
Returns the value of attribute game_message_routes.
6 7 8 |
# File 'lib/game_machine/handlers/game.rb', line 6 def @game_message_routes end |
Instance Method Details
#on_receive(message) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/game_machine/handlers/game.rb', line 13 def on_receive() if .is_a?(MessageLib::ClientMessage) if .get_entity_list dispatch_entities(.get_entity_list) end else unhandled() end end |
#post_init(*args) ⇒ Object
7 8 9 10 |
# File 'lib/game_machine/handlers/game.rb', line 7 def post_init(*args) @game_message_routes = Routes.instance. @destinations = {} end |