public void Init()
    {
        clientMock  = Substitute.For <NetworkClientContainer> ();
        factoryMock = Substitute.For <MessageFactory> ();
        subject     = new GameHistoryClientMessenger(clientMock, factoryMock);

        writer         = new NetworkWriter();
        message        = new NetworkMessage();
        message.reader = new NetworkReader(writer);
    }
Ejemplo n.º 2
0
    // Use this for initialization
    public virtual void Start()
    {
        MessageFactory factory = new MessageFactory();

        client    = new NetworkClientContainer();
        messenger = new GameHistoryClientMessenger(client, factory);

        NetworkTransport.Init();
        client.RegisterHandler(MsgType.Connect, OnConnect);
        client.Connect(masterServerHost, masterServerPort);
    }
Ejemplo n.º 3
0
    public void Init()
    {
        profile = new PlayerProfile("Jayden", Color.black);

        gameRecordMock = Substitute.For <GameRecord> (
            0, BackgroundSelector.RoomType.ROOM_DAY, DateTime.Now
            );

        messengerMock = Substitute.For <GameHistoryClientMessenger> (
            null, null
            );

        GameObject holder = new GameObject();

        subject           = holder.AddComponent <RecordContainer> ();
        subject.messenger = messengerMock;
        subject.record    = gameRecordMock;
    }