protected void ShootBomb() { Bomb bomb = BombsManager.GetBomb(this); if (bomb != null) { timeToNextBomb = RANGE_BOMB; bomb.Shoot(Position); } }
public override void OnExit() { PhysicsManager.RemoveAll(); UpdateManager.RemoveAll(); DrawManager.RemoveAll(); ObstacleManager.RemoveAll(); BombsManager.RemoveAll(); GuiManager.RemoveAll(); AudioManager.RemoveAll(); }
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(); }
protected override void OnPowerUpDeactive(Player p) { base.OnPowerUpDeactive(p); if (Type == PowerUpType.BombUp) { BombsManager.RemoveBombFromQueue(p); } else { BombsManager.AddBombToQueue(p); } }
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(); }
private void RestoreBombInManager() { BombsManager.EnqueBomb(this); }