Ejemplo n.º 1
0
        public Minion(float x, float y, Utility.MinionType type)
        {
            Position            = new Vector2(x, y);
            _inBetween          = 0;
            _distanceTraveled   = 0;
            _waypoints          = new List <Waypoint>();
            _stackFlamethrowers = new List <FireStack>();
            _fireClock          = new CoolDownTimer(1);
            _fireClock.Reset();
            _type = type;

            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);
        }
Ejemplo n.º 2
0
        public Spawner()
        {
            _timer1 = new CoolDownTimer(1);
            _timer1.Reset();

            _timer2 = new CoolDownTimer(5);
            _timer2.Reset();
            IsActive = true;
        }
Ejemplo n.º 3
0
 public Path()
 {
     pathway             = new List <Tile>();
     MinionList          = new List <Minion>();
     _spawnSequenceTimer = new CoolDownTimer(0.2f);
     _spawnSequenceTimer.Reset();
     _pathsShown    = 0;
     Sequence       = Animation.Spawn;
     _minionSpawner = new CoolDownTimer(10f);
     _minionSpawner.Reset();
     _spawner = new Spawner();
     _done    = false;
 }
Ejemplo n.º 4
0
 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();
 }
Ejemplo n.º 5
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();
        }
Ejemplo n.º 6
0
 public FireStack(FlameThrower flameThrower, CoolDownTimer fireTimer)
 {
     FlameThrower = flameThrower;
     FireTimer    = fireTimer;
 }