Пример #1
0
        public DeathmatchMap(string GameMode)
            : this()
        {
            CursorPosition        = new Vector3(9, 13, 0);
            CursorPositionVisible = CursorPosition;

            ListTileSet       = new List <Texture2D>();
            ListTilesetPreset = new List <Terrain.TilesetPreset>();
            CameraPosition    = Vector3.Zero;
            ActiveSquadIndex  = -1;

            switch (GameMode)
            {
            case "":
                GameRule = new SinglePlayerGameRule(this);
                break;

            case "Classic":
                GameRule = new ClassicMPGameRule(this);
                break;

            case "Campaign":
                GameRule = new CampaignGameRule(this);
                break;

            case "Horde":
                GameRule = new HordeGameRule(this);
                break;

            case "Deathmatch":
                GameRule = new HordeGameRule(this);
                break;
            }
        }
Пример #2
0
        public DeathmatchMap(DeathmatchContext GlobalBattleContext)
            : base()
        {
            this.GlobalBattleContext    = GlobalDeathmatchContext = GlobalBattleContext;
            GlobalDeathmatchContext.Map = this;

            GameRule             = new SinglePlayerGameRule(this);
            ListActionMenuChoice = new ActionPanelHolderDeathmatch(this);
            ActiveParser         = new DeathmatchFormulaParser(this);
            ActivePlayerIndex    = 0;
            ListPlayer           = new List <Player>();
            ListLocalPlayerInfo  = new List <Player>();
            RequireFocus         = false;
            RequireDrawFocus     = true;
            Pathfinder           = new MovementAlgorithmDeathmatch(this);
            ListDelayedAttack    = new List <DelayedAttack>();
            ListPERAttack        = new List <PERAttack>();
            ListTerrainType      = new List <string>();
            ListTerrainType.Add(UnitStats.TerrainAir);
            ListTerrainType.Add(UnitStats.TerrainLand);
            ListTerrainType.Add(UnitStats.TerrainSea);
            ListTerrainType.Add(UnitStats.TerrainSpace);
            ListTerrainType.Add(UnitStats.TerrainWall);
            ListTerrainType.Add(UnitStats.TerrainVoid);
        }