public void Restart() { xcord = 260; timer = 0; vel = 4; enemies = new List <Enemy>(); startGame = false; oldkb = Keyboard.GetState(); instructionScreen = false; healthBar = new Rectangle(20, 20, 200, 20); health = new hp(1.0); color = Color.Green; gameOver = false; background = Color.CornflowerBlue; deathPlayed = false; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here xcord = 260; timer = 0; kickTimer = 0; vel = 4; enemies = new List <Enemy>(); startGame = false; oldkb = Keyboard.GetState(); instructionScreen = false; healthBar = new Rectangle(20, 20, 200, 20); health = new hp(1.0); color = Color.Green; gameOver = false; deathPlayed = false; background = Color.CornflowerBlue; base.Initialize(); }