Esempio n. 1
0
    public bool Shoot()
    {
        UDPPacket packet = new UDPPacket();

        packet.type = 'S';

        return(_matchUdp.SendData(packet.Encode()));
    }
Esempio n. 2
0
    public bool UDPHandshake()
    {
        UDPPacket packet = new UDPPacket();

        packet.type = 'H';
        packet.str  = playerInfo.PlayerData.ID;

        return(_matchUdp.SendData(packet.Encode()));
    }
Esempio n. 3
0
    public bool SendLocation()
    {
        UDPPacket packet = new UDPPacket();

        packet.type = 'U';
        packet.fList.Add(movementData.speed);
        packet.fList.Add(movementData.direction.x);
        packet.fList.Add(movementData.direction.y);

        return(_matchUdp.SendData(packet.Encode()));
    }