Esempio n. 1
0
    public override void SendToLocalGameObject(FFBasePacket package, GameObject go)
    {
        FFPacket <EventType> sentPackage = (FFPacket <EventType>)package;

        FFPacket <EventType> .Decrypt(ref sentPackage.message);

        switch (package.packetInstructions)
        {
        case FFPacketInstructionFlags.MessageBoardGameObjectSend:
            FFMessageBoard <EventType> .Send(sentPackage.message, go);

            break;

        case FFPacketInstructionFlags.MessageBoardGameObjectSendDown:
            FFMessageBoard <EventType> .SendDown(sentPackage.message, go);

            break;

        case FFPacketInstructionFlags.MessageBoardGameObjectSendUp:
            FFMessageBoard <EventType> .SendUp(sentPackage.message, go);

            break;

        case FFPacketInstructionFlags.MessageBoardGameObjectSendToAllConnected:
            FFMessageBoard <EventType> .SendAllConnected(sentPackage.message, go);

            break;

        default:
            break;
        }
    }