/// <summary> /// Updates the game /// </summary> /// <param name="gameTime">The game time</param> public override void Update(GameTime gameTime) { if (counter > threshold) { ghostPack.Move(); counter = 0; } else { counter++; } base.Update(gameTime); }
public override void Draw(GameTime gameTime) { if (!superGameState.Score.gameDone) { threshold++; spriteBatch.Begin(); foreach (Ghost ghost in gSquad) { spriteBatch.Draw(imgGhost, new Rectangle((int)ghost.Position.X * 32, (int)ghost.Position.Y * 32, 32, 32), ghost.Colour); } if (threshold == 15) { gSquad.Move(); threshold = 0; } spriteBatch.End(); base.Draw(gameTime); } }