Class: GameMachine::Commands::MiscCommands
- Inherits:
-
Object
- Object
- GameMachine::Commands::MiscCommands
- Defined in:
- lib/game_machine/commands/misc_commands.rb
Instance Attribute Summary collapse
-
#mono_proxy ⇒ Object
readonly
Returns the value of attribute mono_proxy.
-
#player_manager ⇒ Object
readonly
Returns the value of attribute player_manager.
Instance Method Summary collapse
- #call_mono(klass, message) ⇒ Object
- #client_manager_register(name, events = []) ⇒ Object
-
#initialize ⇒ MiscCommands
constructor
A new instance of MiscCommands.
Constructor Details
#initialize ⇒ MiscCommands
Returns a new instance of MiscCommands.
6 7 8 9 |
# File 'lib/game_machine/commands/misc_commands.rb', line 6 def initialize @mono_proxy = JavaLib::MonoProxy.getInstance @player_manager = Application.config.player_manager end |
Instance Attribute Details
#mono_proxy ⇒ Object (readonly)
Returns the value of attribute mono_proxy.
5 6 7 |
# File 'lib/game_machine/commands/misc_commands.rb', line 5 def mono_proxy @mono_proxy end |
#player_manager ⇒ Object (readonly)
Returns the value of attribute player_manager.
5 6 7 |
# File 'lib/game_machine/commands/misc_commands.rb', line 5 def player_manager @player_manager end |
Instance Method Details
#call_mono(klass, message) ⇒ Object
11 12 13 |
# File 'lib/game_machine/commands/misc_commands.rb', line 11 def call_mono(klass,) mono_proxy.call(klass,) end |
#client_manager_register(name, events = []) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/game_machine/commands/misc_commands.rb', line 15 def client_manager_register(name,events=[]) register = MessageLib::ClientManagerRegister.new. set_register_type('actor').set_name(name).set_events(events.join('|')) entity = MessageLib::Entity.new.set_id(name). set_client_manager_register(register) ClientManager.find.ask(entity,5000) end |