Sha256: cc39110cc0b9fdaba875a8c44a998f2a942d729640100010a1f12933adc41df8

Contents?: true

Size: 486 Bytes

Versions: 6

Compression:

Stored size: 486 Bytes

Contents

module GameMachine
  module GameSystems
    class PrivateChat < Actor::Base

      def preStart
        message = Subscribe.new.set_topic('private')
        MessageQueuel.find.tell(message,Actor::Ref.new(get_self))
      end

      def on_receive(message)
        if message.is_a?(ChatMessage)
          send_message(message)
        elsif message.is_a?(JavaLib::DistributedPubSubMediator::SubscribeAck)
        else
          unhandled(message)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
game_machine-1.0.4 lib/game_machine/game_systems/private_chat.rb
game_machine-1.0.2 lib/game_machine/game_systems/private_chat.rb
game_machine-0.0.11 lib/game_machine/game_systems/private_chat.rb
game_machine-0.0.10 lib/game_machine/game_systems/private_chat.rb
game_machine-0.0.9 lib/game_machine/game_systems/private_chat.rb
game_machine-0.0.8 lib/game_machine/game_systems/private_chat.rb