Example #1
0
 public BattleAnimationScreen(ConquestMap Map, UnitConquest ActiveUnit, UnitConquest EnemyUnit,
                              string ActiveTerrain, bool HorizontalMirror, AnimationScreen ActiveUnitAnimation, AnimationScreen EnemyUnitAnimation)
     : this(Map, ActiveUnit, EnemyUnit, 2, 2, ActiveTerrain, HorizontalMirror)
 {
     this.ActiveUnitAnimation = ActiveUnitAnimation;
     this.EnemyUnitAnimation  = EnemyUnitAnimation;
 }
Example #2
0
        public MapLayer(ConquestMap Map, List <AnimationBackground> ListBackgrounds, List <AnimationBackground> ListForegrounds, BinaryReader BR)
        {
            this.Map = Map;

            ListSubLayer = new List <SubMapLayer>();

            StartupDelay   = BR.ReadInt32();
            ToggleDelayOn  = BR.ReadInt32();
            ToggleDelayOff = BR.ReadInt32();
            Depth          = BR.ReadSingle();

            if (StartupDelay == 0)
            {
                IsVisible   = true;
                ToggleTimer = ToggleDelayOn;
            }
            else
            {
                IsVisible   = false;
                ToggleTimer = StartupDelay;
            }

            ArrayTerrain = new TerrainConquest[Map.MapSize.X, Map.MapSize.Y];
            for (int Y = 0; Y < Map.MapSize.Y; Y++)
            {
                for (int X = 0; X < Map.MapSize.X; X++)
                {
                    ArrayTerrain[X, Y] = new TerrainConquest(BR, X, Y);
                }
            }

            LayerGrid = new ConquestMap2D(Map, ListBackgrounds, ListForegrounds, new FogOfWarGridOverlay(Map), BR);
        }
Example #3
0
 public ActionPanelAttack(ConquestMap Map, UnitConquest ActiveUnit, List <Tuple <int, int> > ListSquadFound, int AttackIndex)
     : base("Attack", Map)
 {
     this.ActiveUnit     = ActiveUnit;
     this.ListSquadFound = ListSquadFound;
     this.AttackIndex    = AttackIndex;
 }
        public ActionPanelAIMoveCursor(ConquestMap Map, int ActivePlayerIndex, int ActiveUnitIndex)
            : base(PanelName, Map)
        {
            this.ActivePlayerIndex = ActivePlayerIndex;
            this.ActiveUnitIndex   = ActiveUnitIndex;

            ActiveUnit = Map.ListPlayer[ActivePlayerIndex].ListUnit[ActiveUnitIndex];
        }
        public ActionPanelPlayerUnitSelected(ConquestMap Map, int ActivePlayerIndex, int ActiveUnitIndex)
            : base(PanelName, Map)
        {
            this.ActivePlayerIndex = ActivePlayerIndex;
            this.ActiveUnitIndex   = ActiveUnitIndex;

            ActiveUnit = Map.ListPlayer[ActivePlayerIndex].ListUnit[ActiveUnitIndex];
        }
Example #6
0
 public FogOfWarGridOverlay(ConquestMap Map)
 {
     this.Map                = Map;
     FogOfWarMap             = new FogOfWarTile[Map.MapSize.X, Map.MapSize.Y];
     FogOfWarIntensityFinder = new MovementAlgorithmFogOfWar(FogOfWarMap);
     for (int X = FogOfWarMap.GetLength(0) - 1; X >= 0; --X)
     {
         for (int Y = FogOfWarMap.GetLength(1) - 1; Y >= 0; --Y)
         {
             FogOfWarMap[X, Y] = new FogOfWarTile(X, Y);
         }
     }
 }
Example #7
0
        public BattleAnimationScreen(ConquestMap Map, UnitConquest ActiveUnit, UnitConquest EnemyUnit, int DamageTakenSelf, int DamageTakenEnemy, string ActiveTerrain, bool HorizontalMirror)
            : base()
        {
            this.Map              = Map;
            this.ActiveUnit       = ActiveUnit;
            this.EnemyUnit        = EnemyUnit;
            this.DamageTakenSelf  = DamageTakenSelf;
            this.DamageTakenEnemy = DamageTakenEnemy;
            this.ActiveTerrain    = ActiveTerrain;
            this.HorizontalMirror = HorizontalMirror;

            RequireFocus     = true;
            RequireDrawFocus = true;
            IsOnTop          = false;
        }
Example #8
0
        public ConquestMap2D(ConquestMap Map, List <AnimationBackground> ListBackgrounds, List <AnimationBackground> ListForegrounds, BattleMapOverlay MapOverlay)
            : base(Map, ListBackgrounds, ListForegrounds, MapOverlay)
        {
            ActiveMap = Map;

            DrawableTile[,] ArrayTile = new DrawableTile[MapSize.X, MapSize.Y];

            for (int X = MapSize.X - 1; X >= 0; --X)
            {
                for (int Y = MapSize.Y - 1; Y >= 0; --Y)
                {
                    ArrayTile[X, Y] = new DrawableTile(new Rectangle(0, 0, ActiveMap.TileSize.X, ActiveMap.TileSize.Y), 0);
                }
            }

            ReplaceGrid(ArrayTile);
        }
        public ConquestMap2D(ConquestMap Map)
            : base(Map)
        {
            ActiveMap = Map;

            DrawableTile[,] ArrayTile = new DrawableTile[MapSize.X, MapSize.Y];

            for (int X = MapSize.X - 1; X >= 0; --X)
            {
                for (int Y = MapSize.Y - 1; Y >= 0; --Y)
                {
                    ArrayTile[X, Y] = new DrawableTile(new Rectangle(0, 0, ActiveMap.TileSize.X, ActiveMap.TileSize.Y), 0);
                }
            }

            ReplaceGrid(ArrayTile);
        }
Example #10
0
        public ActionPanelConquest(string Name, ConquestMap Map, bool CanCancel = true)
            : base(Name, Map.ListActionMenuChoice, CanCancel)
        {
            this.Map = Map;
            MenuX    = (int)(Map.CursorPosition.X + 1 - Map.CameraPosition.X) * Map.TileSize.X;
            MenuY    = (int)(Map.CursorPosition.Y - Map.CameraPosition.Y) * Map.TileSize.Y;

            if (MenuX + MinActionMenuWidth >= Constants.Width)
            {
                MenuX = Constants.Width - MinActionMenuWidth;
            }

            int MenuHeight = ListNextChoice.Count * PannelHeight + 6 * 2;

            if (MenuY + MenuHeight >= Constants.Height)
            {
                MenuY = Constants.Height - MenuHeight;
            }
        }
Example #11
0
        public MapLayer(ConquestMap Map, List <AnimationBackground> ListBackgrounds, List <AnimationBackground> ListForegrounds)
        {
            this.Map = Map;

            ListSubLayer = new List <SubMapLayer>();
            ToggleTimer  = StartupDelay;
            IsVisible    = StartupDelay > 0;

            //Tiles
            ArrayTerrain = new TerrainConquest[Map.MapSize.X, Map.MapSize.Y];
            for (int Y = 0; Y < Map.MapSize.Y; Y++)
            {
                for (int X = 0; X < Map.MapSize.X; X++)
                {
                    ArrayTerrain[X, Y] = new TerrainConquest(X, Y);
                }
            }

            LayerGrid = new ConquestMap2D(Map, ListBackgrounds, ListForegrounds, new FogOfWarGridOverlay(Map));
        }
Example #12
0
            public ScriptSpawnUnitConquest(ConquestMap Map)
                : base(Map, 140, 70, "Spawn Conquest Unit", new string[] { "Spawn" }, new string[] { "Timer Ended", "Animation Ended", "SFX Ended" })
            {
                _EndingValue = 1;
                _TimerType   = TimerTypes.Seconds;
                IsEnded      = false;
                IsTimerEnded = false;

                _UnitToSpawn   = string.Empty;
                _UnitToSpawnID = 0;
                _SpawnPosition = new Microsoft.Xna.Framework.Vector3();
                _SpawnPlayer   = 0;

                _AnimationPath  = "";
                _AnimationSpeed = 0.5f;

                _SFXPath = "";

                _AIPath = "";
            }
Example #13
0
        public MapLayer(ConquestMap Map)
        {
            this.Map = Map;

            ListSubLayer = new List <SubMapLayer>();
            ToggleTimer  = StartupDelay;
            IsVisible    = StartupDelay > 0;

            //Tiles
            ArrayTerrain = new TerrainConquest[Map.MapSize.X, Map.MapSize.Y];
            for (int Y = 0; Y < Map.MapSize.Y; Y++)
            {
                for (int X = 0; X < Map.MapSize.X; X++)
                {
                    ArrayTerrain[X, Y] = new TerrainConquest(X, Y);
                }
            }

            LayerGrid = new ConquestMap2D(Map);
        }
Example #14
0
 public ActionPanelAIDefault(ConquestMap Map)
     : base(PanelName, Map)
 {
 }
Example #15
0
 public ActionPanelPlayerDefault(ConquestMap Map)
     : base("Player Default", Map)
 {
 }
Example #16
0
 public ActionPanelMainMenuSave(ConquestMap Map)
     : base("Save", Map)
 {
 }
 public ActionPanelAIMoveCursor(ConquestMap Map, UnitConquest ActiveUnit)
     : base("AIMoveCursor", Map)
 {
     this.ActiveUnit = ActiveUnit;
 }
 public ActionPanelAIAttack(ConquestMap Map, UnitConquest ActiveUnit)
     : base("AIAttack", Map)
 {
     this.ActiveUnit = ActiveUnit;
 }
 public ActionPanelAIMoveCursor(ConquestMap Map)
     : base(PanelName, Map)
 {
 }
Example #20
0
 public ActionPanelPhaseEnd(ConquestMap Map, bool SendToHost)
     : base("PhaseEnd", Map)
 {
     PhaseTime       = 120;
     this.SendToHost = SendToHost;
 }
Example #21
0
 public ActionPanelWait(ConquestMap Map, UnitConquest ActiveUnit)
     : base("Wait", Map)
 {
     this.ActiveUnit = ActiveUnit;
 }
Example #22
0
 public ActionPanelPlayerMainMenu(ConquestMap Map)
     : base("Player Unit Main Menu", Map)
 {
 }
Example #23
0
 public ActionPanelMainMenuOptions(ConquestMap Map)
     : base("Options", Map)
 {
 }
Example #24
0
 public ActionPanelAIDefault(ConquestMap Map)
     : base("AI Default", Map)
 {
 }
Example #25
0
 public ActionPanelMainMenuEnd(ConquestMap Map)
     : base("End", Map)
 {
 }
Example #26
0
 public ActionPanelPlayerUnitSelected(ConquestMap Map, UnitConquest ActiveUnit)
     : base("Player Unit Selected", Map)
 {
     this.ActiveUnit = ActiveUnit;
 }
 public ActionPanelPlayerBuildingUnitSelected(ConquestMap Map)
     : base("Player Building Selected", Map)
 {
 }
Example #28
0
 public ActionPanelMoveUnit(ConquestMap Map, UnitConquest ActiveUnit)
     : base("Player Move Unit", Map)
 {
     this.ActiveUnit = ActiveUnit;
 }
Example #29
0
 public ActionPanelPlayerEnemyUnitSelected(ConquestMap Map)
     : base("Player Enemy Unit Selected", Map)
 {
 }
Example #30
0
 public ActionPanelMainMenuPower(ConquestMap Map)
     : base("Power", Map)
 {
 }