private float zombieCountdown; // How often zombies will spawn #endregion Fields #region Constructors public HvZWorld() { m_Player = new Player(this, new Vector2(300, 300), new Vector2(1f,0f), 32f, new Vector2(1f,0f), 400f, Settings.playerWeaponTimer, Settings.playerWeaponSpeed, Settings.playerAmmo); this.m_Entities = new SortedDictionary<ulong, Entity>(); this.AddEntity(this.m_Player); this.numZombies = 0; this.numItems = 0; this.m_WallGrid = new List<GridPoint>(); this.m_WallIndices = new List<ulong>(); this.CreateGrid(); this.SpawnWall(); //define the boundaries of the play area using walls drawn offscreen that do not cast shadows this.AddEntity(new Wall(this, new Vector2(Settings.worldWidth / 2, -16), Vector2.UnitX, Settings.worldWidth, 64, false)); this.AddEntity(new Wall(this, new Vector2(-16, Settings.worldHeight / 2), Vector2.UnitY, Settings.worldHeight, 64, false)); this.AddEntity(new Wall(this, new Vector2(Settings.worldWidth / 2, Settings.worldHeight + 16), Vector2.UnitX, Settings.worldWidth, 64, false)); this.AddEntity(new Wall(this, new Vector2(Settings.worldWidth + 16, Settings.worldHeight / 2), Vector2.UnitY, Settings.worldHeight, 64, false)); this.m_ColMatrix = null; this.zombieCountdown = Settings.zombieTimer; this.wallCountdown = Settings.wallSpawnTimer; this.wallCountdown = Settings.wallSpawnTimer; m_TimeElapsed = 0; m_secondCheck = m_TimeElapsed; m_Random = new Random(); m_GameOver = false; ClusterAIBrains.Initialize(); }
public override void OnPickup(Player player) { this.SetDead(true); player.TemporarySpeedIncrease(5f); }
public override void OnPickup(Player player) { this.SetDead(true); world.AddEntity(new Explosion(world, this.GetPosition(), Vector2.UnitX, 0f, 1024, 2200)); }
public abstract void OnPickup(Player player);
public override void OnPickup( Player player) { this.SetDead(true); player.AddAmmo(m_Ammo); }
public override void OnPickup( Player player) { this.SetDead(true); player.AddRockets(m_Rockets); }