Class: GameMachine::GameSystems::ChatTopic
- Inherits:
-
Actor::Base
- Object
- JavaLib::GameActor
- Actor::Base
- GameMachine::GameSystems::ChatTopic
- Includes:
- Commands
- Defined in:
- lib/game_machine/game_systems/chat_topic.rb
Constant Summary
Constants inherited from Actor::Base
Instance Attribute Summary collapse
-
#chat_id ⇒ Object
readonly
Returns the value of attribute chat_id.
-
#registered_as ⇒ Object
readonly
Returns the value of attribute registered_as.
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
#chat_id ⇒ Object (readonly)
Returns the value of attribute chat_id.
6 7 8 |
# File 'lib/game_machine/game_systems/chat_topic.rb', line 6 def chat_id @chat_id end |
#registered_as ⇒ Object (readonly)
Returns the value of attribute registered_as.
6 7 8 |
# File 'lib/game_machine/game_systems/chat_topic.rb', line 6 def registered_as @registered_as end |
Instance Method Details
#on_receive(message) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/game_machine/game_systems/chat_topic.rb', line 12 def on_receive() if .is_a?(MessageLib::Entity) && . (.) elsif .is_a?(JavaLib::DistributedPubSubMediator::SubscribeAck) else unhandled() end end |
#post_init(*args) ⇒ Object
7 8 9 10 |
# File 'lib/game_machine/game_systems/chat_topic.rb', line 7 def post_init(*args) @chat_id = args.first @registered_as = args.last end |