public Minion(float iX, float iY, Utility.MinionType iType)
        {
            Position           = new Vector2(iX, iY);
            inBetween          = 0;
            _distanceTraveled  = 0;
            waypoints          = new List <Waypoint>();
            stackFlamethrowers = new List <FireStack>();
            fireClock          = new CoolDownTimer(1);
            fireClock.Reset();
            type = iType;

            if (type == Utility.MinionType.fast)
            {
                hp     = Utility.fastMinionHP;
                maxHP  = Utility.fastMinionHP;
                speed  = 0.002f;
                radius = 0.2f;
            }
            else if (type == Utility.MinionType.slow)
            {
                hp     = Utility.slowMinionHP;
                maxHP  = Utility.slowMinionHP;
                speed  = 0.0005f;
                radius = 0.4f;
            }
            else if (type == Utility.MinionType.boss)
            {
                hp     = Utility.bossMinionHp;
                maxHP  = Utility.bossMinionHp;
                speed  = 0.0001f;
                radius = 0.6f;
            }
            healthBar = new HealthBar(this);
        }
        public Spawner()
        {
            timer1 = new CoolDownTimer(1);
            timer1.Reset();

            timer2 = new CoolDownTimer(5);
            timer2.Reset();
            IsActive = true;
        }
 protected override void Initialize()
 {
     Utility.currentGamestate = Utility.GameState.Playing;
     // TODO: Add your initialization logic here
     Window.ClientSizeChanged += Window_ClientSizeChanged;
     Utility.Window            = Window;
     Utility.board             = new Board(15, 10);
     Utility.TowerList         = new List <Tower>();
     input                  = new Input();
     hud                    = new HUD(input);
     sidebarUI              = new Sidebar(new Vector2(190, 10));
     difficultyCooldown     = new CoolDownTimer(30f);
     latestHoveredOverTower = null;
     ResetPlayingState();
     base.Initialize();
 }
Beispiel #4
0
        public Board(int iWidth, int iHeight)
        {
            Width  = iWidth;
            Height = iHeight;

            Paths    = new List <Path>();
            OldPaths = new List <Path>();
            tiles    = new Tile[FullWidth, FullHeight];

            bossTimer = new CoolDownTimer(60);
            bossTimer.Reset();

            for (int i = 0; i < FullWidth; i++)
            {
                for (int j = 0; j < FullHeight; j++)
                {
                    tiles[i, j] = new Tile(i, j);
                }
            }
            CacheGridSize();
        }
 public FireStack(FlameThrower iFlameThrower, CoolDownTimer iFireTimer)
 {
     flameThrower = iFlameThrower;
     fireTimer    = iFireTimer;
 }