Ejemplo n.º 1
0
    public void SendClockSing(string clockContent, uint objectId)
    {
        ClockSignPacket packet = new ClockSignPacket();

        packet.payload = clockContent;
        PacketManager.Instance.SendPacket(packet, objectId, false);
    }
Ejemplo n.º 2
0
    void OnReceivePacket(ushort type, Stream stream)
    {
        switch (type)
        {
        case (ushort)UserPacketType.TurnSign:
            TurnSignPacket turnSignPacket = new TurnSignPacket();
            turnSignPacket.Deserialize(stream);
            turnSign.text = turnSignPacket.payload;
            break;

        case (ushort)UserPacketType.Clock:
            ClockSignPacket clockSignPacket = new ClockSignPacket();
            clockSignPacket.Deserialize(stream);
            clockSign.text = clockSignPacket.payload;
            break;
        }
    }