Class: GameMachine::GameSystems::LocalEcho

Inherits:
Actor::Base
  • Object
show all
Defined in:
server/lib/game_machine/game_systems/local_echo.rb

Constant Summary

Constants inherited from Actor::Base

Actor::Base::ON_RECEIVE_HOOKS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Actor::Base

aspect, aspects, find, find_by_address, find_distributed, find_distributed_local, find_remote, hashring, local_path, logger, model_filter, #onReceive, player_controller, #receive_message, #schedule_message, #schedule_message_once, #sender, set_player_controller

Class Method Details

.echo(message) ⇒ Object

Used in tests to see if actor got the message


6
7
# File 'server/lib/game_machine/game_systems/local_echo.rb', line 6

def self.echo(message)
end

Instance Method Details

#on_receive(message) ⇒ Object


9
10
11
12
13
# File 'server/lib/game_machine/game_systems/local_echo.rb', line 9

def on_receive(message)
  GameMachine.logger.debug("LocalEcho got #{message}")
  self.class.echo(message)
  sender.tell(message,self)
end