/// <summary> /// Summons Lots of Zombies, Fast. /// </summary> /// <param name="z">Zombie in question</param> /// <param name="graphicsWidth">Graphics Width</param> /// <param name="graphicsHeight">Graphics Height</param> public void RecursiveSummoning(Zombie z, int graphicsWidth, int graphicsHeight) { if (this.CheckCollision(z) == true) { Random rand = new Random(); this.XValue = rand.Next(rand.Next(100, graphicsWidth) - 100); this.YValue = rand.Next(rand.Next(100, graphicsHeight) - 100); RecursiveSummoning(z, graphicsWidth, graphicsHeight); } }
/// <summary> /// What to do if they hit another zombie /// </summary> /// <param name="z">The zombie it collides with</param> public void HitOtherZomibe(Zombie z) { if (this.CheckCollision(z) == true) { this.XValue = previousZombiePosition.X; this.YValue = previousZombiePosition.Y; currentZombiePosition = previousZombiePosition; } }