Class: GameMachine::RestartWatcher
Constant Summary
Constants inherited
from Actor::Base
Actor::Base::ON_RECEIVE_HOOKS
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, model_filter, #onReceive, player_controller, #receive_message, #schedule_message, #sender, set_player_controller
Instance Method Details
#on_receive(message) ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/game_machine/restart_watcher.rb', line 8
def on_receive(message)
if message == 'check_restart'
if Console::Server.restart?
Console::Server.exit!
end
end
end
|
#post_init(*args) ⇒ Object
4
5
6
|
# File 'lib/game_machine/restart_watcher.rb', line 4
def post_init(*args)
schedule_message('check_restart',2000)
end
|