Sha256: fe6a68a9bd9688b51cfd26e27bcabf05429b6e7a76ff8db988ba848c5ebdc75c
Contents?: true
Size: 609 Bytes
Versions: 6
Compression:
Stored size: 609 Bytes
Contents
module Example class ExampleController < GameMachine::Actor::Base include GameMachine include GameMachine::Commands include GameMachine::Actor::Development # This is our initializer method. It is called once on actor start. # def post_init(*args) # Just because GameMachine.logger.info "#{self.class.name} post_init called" end def on_receive(message) # Send message back to player who sent it commands.player.send_message(message.to_entity,message.player.id) GameMachine.logger.info("message sent to #{message.player.id}") end end end
Version data entries
6 entries across 6 versions & 1 rubygems