コード例 #1
0
        public override void DoWrite(ByteWriter BW)
        {
            BW.AppendInt32(ActivePlayerIndex);
            BW.AppendInt32(ActiveSquadIndex);
            BW.AppendInt32(ActiveSquad.CurrentLeader.AttackIndex);
            BW.AppendInt32(ListAttackChoice.Count);

            for (int A = 0; A < ListAttackChoice.Count; ++A)
            {
                BW.AppendFloat(ListAttackChoice[A].X);
                BW.AppendFloat(ListAttackChoice[A].Y);
                BW.AppendInt32((int)ListAttackChoice[A].Z);
            }

            BW.AppendBoolean(BattlePreview != null);
            if (BattlePreview != null)
            {
                BW.AppendInt32(BattlePreview.PlayerIndex);
                BW.AppendInt32(BattlePreview.SquadIndex);
            }

            BW.AppendFloat(Map.CursorPosition.X);
            BW.AppendFloat(Map.CursorPosition.Y);
            BW.AppendFloat(Map.CursorPosition.Z);
        }
コード例 #2
0
 public override void DoWrite(ByteWriter BW)
 {
     BW.AppendFloat(Map.CursorPosition.X);
     BW.AppendFloat(Map.CursorPosition.Y);
     BW.AppendFloat(Map.CameraPosition.X);
     BW.AppendFloat(Map.CameraPosition.Y);
 }
コード例 #3
0
 public override void DoWrite(ByteWriter BW)
 {
     BW.AppendInt32(ActivePlayerIndex);
     BW.AppendInt32(ActiveSquadIndex);
     BW.AppendFloat(CursorPosition.X);
     BW.AppendFloat(CursorPosition.Y);
     BW.AppendFloat(CursorPosition.Z);
 }
コード例 #4
0
 public override void DoWrite(ByteWriter BW)
 {
     BW.AppendInt32(ListBuildSpot.Count);
     for (int B = 0; B < ListBuildSpot.Count; ++B)
     {
         BW.AppendFloat(ListBuildSpot[B].X);
         BW.AppendFloat(ListBuildSpot[B].Y);
         BW.AppendFloat(ListBuildSpot[B].Z);
     }
 }
コード例 #5
0
 public override void DoWrite(ByteWriter BW)
 {
     BW.AppendInt32(ActivePlayerIndex);
     BW.AppendInt32(ActiveSquadIndex);
     BW.AppendFloat(LastPosition.X);
     BW.AppendFloat(LastPosition.Y);
     BW.AppendInt32((int)LastPosition.Z);
     BW.AppendFloat(LastCameraPosition.X);
     BW.AppendFloat(LastCameraPosition.Y);
     BW.AppendFloat(LastCameraPosition.Z);
 }
コード例 #6
0
        public override void DoWrite(ByteWriter BW)
        {
            BW.AppendInt32(ListMVChoice.Count);

            for (int M = 0; M < ListMVChoice.Count; ++M)
            {
                BW.AppendFloat(ListMVChoice[M].Position.X);
                BW.AppendFloat(ListMVChoice[M].Position.Y);
                BW.AppendInt32((int)ListMVChoice[M].Position.Z);
            }
        }
コード例 #7
0
        public override void DoWrite(ByteWriter BW)
        {
            BW.AppendInt32(ActivePlayerIndex);
            BW.AppendInt32(ActiveSquadIndex);
            BW.AppendInt32(ActiveSquad.CurrentLeader.AttackIndex);
            BW.AppendInt32(ListAttackChoice.Count);

            for (int A = 0; A < ListAttackChoice.Count; ++A)
            {
                BW.AppendFloat(ListAttackChoice[A].X);
                BW.AppendFloat(ListAttackChoice[A].Y);
                BW.AppendInt32((int)ListAttackChoice[A].Z);
            }
        }
コード例 #8
0
        public override byte[] GetSnapshotData()
        {
            ByteWriter BW = new ByteWriter();

            BW.AppendInt32(ListAllPlayer.Count);
            foreach (Player ActivePlayer in ListAllPlayer)
            {
                BW.AppendString(ActivePlayer.ConnectionID);
                BW.AppendString(ActivePlayer.Name);
                BW.AppendInt32(ActivePlayer.Team);
                BW.AppendBoolean(ActivePlayer.IsPlayerControlled);
                BW.AppendByte(ActivePlayer.Color.R);
                BW.AppendByte(ActivePlayer.Color.G);
                BW.AppendByte(ActivePlayer.Color.B);

                BW.AppendByte(ActivePlayer.LocalPlayerIndex);

                BW.AppendInt32(ActivePlayer.ListSquad.Count);
                foreach (Squad ActiveSquad in ActivePlayer.ListSquad)
                {
                    BW.AppendFloat(ActiveSquad.X);
                    BW.AppendFloat(ActiveSquad.Y);
                    BW.AppendFloat(ActiveSquad.Z);
                    BW.AppendBoolean(ActiveSquad.IsPlayerControlled);

                    BW.AppendInt32(ActiveSquad.UnitsInSquad);
                    for (int U = 0; U < ActiveSquad.UnitsInSquad; ++U)
                    {
                        Unit ActiveUnit = ActiveSquad.At(U);
                        BW.AppendString(ActiveUnit.UnitTypeName);
                        BW.AppendString(ActiveUnit.RelativePath);

                        BW.AppendInt32(ActiveUnit.ArrayCharacterActive.Length);
                        for (int C = 0; C < ActiveUnit.ArrayCharacterActive.Length; ++C)
                        {
                            BW.AppendString(ActiveUnit.ArrayCharacterActive[C].FullName);
                        }
                    }
                }
            }

            BW.AppendString(BattleMapPath);

            byte[] Data = BW.GetBytes();
            BW.ClearWriteBuffer();
            return(Data);
        }
コード例 #9
0
 public override void DoWrite(ByteWriter BW)
 {
     BW.AppendFloat(PlayerUnit.X);
     BW.AppendFloat(PlayerUnit.Y);
     BW.AppendInt32((int)PlayerUnit.Z);
 }