Пример #1
0
                public static void ChatMessage(string _message)
                {
                    using (var _packet = new Packet((int)ClientPackets.ChatMessage))
                    {
                        _packet.Write(_message);

                        Client.SendUDPData(_packet);
                    }
                }
Пример #2
0
                public static void WelcomeConfirmation(string _username)
                {
                    using (var _packet = new Packet((int)ClientPackets.WelcomeReceived))
                    {
                        _packet.Write(Client.MyId);
                        _packet.Write(_username);

                        Client.SendUDPData(_packet);
                    }
                }
Пример #3
0
                public static void UnitMovement(int _id, Vector2 _position, Vector2 _axis, Vector2 _velocity, float _rotation)
                {
                    using (var _packet = new Packet((int)ClientPackets.UnitMovement))
                    {
                        _packet.Write(_id);
                        _packet.Write(_position);
                        _packet.Write(_axis);
                        _packet.Write(_velocity);
                        _packet.Write(_rotation);

                        Client.SendUDPData(_packet);
                    }
                }