예제 #1
0
 public MapSwitchPoint(EventPoint Copy)
     : base(Copy)
 {
     SwitchMapPath = "";
     SwitchMapType = "Deathmatch";
     SwitchText    = "";
 }
예제 #2
0
        protected void LoadSpawns(BinaryReader BR)
        {
            ArrayMultiplayerColor = new Color[16];

            //Deathmatch colors
            for (int D = 0; D < ArrayMultiplayerColor.Length; D++)
            {
                ArrayMultiplayerColor[D].R = BR.ReadByte();
                ArrayMultiplayerColor[D].G = BR.ReadByte();
                ArrayMultiplayerColor[D].B = BR.ReadByte();
            }

            int ListSingleplayerSpawnsCount = BR.ReadInt32();

            ListSingleplayerSpawns = new List <EventPoint>(ListSingleplayerSpawnsCount);

            for (int S = 0; S < ListSingleplayerSpawnsCount; S++)
            {
                EventPoint NewPoint = new EventPoint(BR);
                NewPoint.ColorRed   = Color.Blue.R;
                NewPoint.ColorGreen = Color.Blue.G;
                NewPoint.ColorBlue  = Color.Blue.B;

                ListSingleplayerSpawns.Add(NewPoint);
            }

            int ListMultiplayerSpawnsCount = BR.ReadInt32();

            ListMultiplayerSpawns = new List <EventPoint>(ListMultiplayerSpawnsCount);

            for (int S = 0; S < ListMultiplayerSpawnsCount; S++)
            {
                EventPoint NewPoint   = new EventPoint(BR);
                int        ColorIndex = Convert.ToInt32(NewPoint.Tag) - 1;
                NewPoint.ColorRed   = ArrayMultiplayerColor[ColorIndex].R;
                NewPoint.ColorGreen = ArrayMultiplayerColor[ColorIndex].G;
                NewPoint.ColorBlue  = ArrayMultiplayerColor[ColorIndex].B;
                ListMultiplayerSpawns.Add(NewPoint);
            }

            ListSubMap.Add(this);
            int ListMapSwitchPointCount = BR.ReadInt32();

            ListMapSwitchPoint = new List <MapSwitchPoint>(ListMapSwitchPointCount);

            for (int S = 0; S < ListMapSwitchPointCount; S++)
            {
                MapSwitchPoint NewMapSwitchPoint = new MapSwitchPoint(BR);
                ListMapSwitchPoint.Add(NewMapSwitchPoint);
                if (DicBattmeMapType.Count > 0 && !string.IsNullOrEmpty(NewMapSwitchPoint.SwitchMapPath) &&
                    ListSubMap.Find(x => x.BattleMapPath == NewMapSwitchPoint.SwitchMapPath) == null)
                {
                    BattleMap NewMap = DicBattmeMapType[NewMapSwitchPoint.SwitchMapType].GetNewMap(NewMapSwitchPoint.SwitchMapPath, 0, new List <Squad>());
                    NewMap.ListGameScreen = ListGameScreen;
                    NewMap.ListSubMap     = ListSubMap;
                    NewMap.Load();
                }
            }
        }
예제 #3
0
 public EventPoint(EventPoint Copy)
     : this(Copy.Position, Copy.Tag, Copy.ColorRed, Copy.ColorGreen, Copy.ColorBlue)
 {
 }
예제 #4
0
 public TeleportPoint(EventPoint Copy)
     : base(Copy)
 {
 }