/// <summary> /// Uaktualnia poziomu, sprawdza czy gracz wygral lub przegral. /// </summary> /// <param name="gameTime"></param> public void Update(GameTime gameTime) { if (Tony.dead) { if (Count == 2) Game.CurrentGameState = GameState.Loss; else Game.CurrentGameState = GameState.Dead; } oLevel.Update(gameTime); point = Level.points; if (oLevel.levelEnd) { if (numLevel == 5 || numLevel == 10 || numLevel == 15) { Game.CurrentGameState = GameState.WinGame; } numLevel++; startPoint = Level.points; oLevel = new Level(oGraphics, point); } }
/// <summary> /// Startuje rozgrywke. /// </summary> public void startLevel() { oLevel = new Level(oGraphics, 0); }
/// <summary> /// Startuje rozgrywke /// </summary> /// <param name="point">Ilos punktow</param> /// <param name="counter">ilosc zyc</param> public void startLevel(int point,int counter) { Count++; oLevel = new Level(oGraphics, point); Tony.dead = false; oLevel.player.NumLife-=counter; }