예제 #1
0
        public override bool MoveStep()
        {
            if (Program.NrPlayers == 1)
            {
                return(base.MoveStep());
            }
            else if (this.playerNr == 1)
            {
                int X = this.x;
                int Y = this.y;

                bool Result = base.MoveStep();

                if (this.x != X || this.y != Y || Result)
                {
                    BinaryOutput Output = new BinaryOutput();
                    Output.WriteByte(8);
                    Output.WriteInt(this.x);
                    Output.WriteInt(this.y);
                    Output.WriteInt(this.vx);
                    Output.WriteInt(this.vy);
                    Output.WriteBool(Result);

                    Program.MPE.SendUdpToAll(Output.GetPacket(), 3);
                }

                return(Result);
            }
            else
            {
                return(false);
            }
        }