Ejemplo n.º 1
0
        protected void ShootBomb()
        {
            Bomb bomb = BombsManager.GetBomb(this);

            if (bomb != null)
            {
                timeToNextBomb = RANGE_BOMB;
                bomb.Shoot(Position);
            }
        }
Ejemplo n.º 2
0
        public override void OnExit()
        {
            PhysicsManager.RemoveAll();
            UpdateManager.RemoveAll();
            DrawManager.RemoveAll();

            ObstacleManager.RemoveAll();
            BombsManager.RemoveAll();
            GuiManager.RemoveAll();

            AudioManager.RemoveAll();
        }
Ejemplo n.º 3
0
        public override void Update()
        {
            base.Update();

            float shake = (float)Math.Sin(shakeCounter) * WIDTH_SHAKE;

            labelWin.GetSprite().scale += new Vector2(shake) * Game.DeltaTime;
            shakeCounter += Game.DeltaTime * SPEED_SHAKE_MULTIPLIER;

            PhysicsManager.Update();
            UpdateManager.Update();
            BombsManager.Update();
        }
Ejemplo n.º 4
0
        protected override void OnPowerUpDeactive(Player p)
        {
            base.OnPowerUpDeactive(p);

            if (Type == PowerUpType.BombUp)
            {
                BombsManager.RemoveBombFromQueue(p);
            }
            else
            {
                BombsManager.AddBombToQueue(p);
            }
        }
Ejemplo n.º 5
0
        public override void Start()
        {
            base.Start();

            Rect.Debug              = false;
            Circle.Debug            = false;
            PhysicsManager.RayDebug = false;

            PhysicsManager.Init();


            Players = new List <Player>();
            Players.Add(new WhiteBomberman(Vector2.Zero));
            Players.Add(new BlackBomberman(Vector2.Zero));

            Enemy.EnemyCount = 0;
            LevelGenerator.GenerateLevel();

            BombsManager.Init();
            GuiManager.Init(Players);
            GameManager.Init();
        }
Ejemplo n.º 6
0
 private void RestoreBombInManager()
 {
     BombsManager.EnqueBomb(this);
 }