Пример #1
0
 public void ResetLevel()
 {
     _player.Reset();
     foreach (EnemyCharacter enemy in _enemies)
     {
         enemy.Reset();
     }
 }
Пример #2
0
 private void RespawnPlayer()
 {
     Debug.Log("respawn");
     score.Reset();
     player.Reset();
     player.transform.position = canyon.GetEnterPoint();
     isFinish = false;
     PauseGame(false);
     PlaySnowIfNeeded();
 }
Пример #3
0
 // We want to reuse this object instead of creating new ones each generation.
 public void Reset(Vector2 playerPos, bool resetFitness = false, FeedForwardNN brain = null)
 {
     Brain               = brain ?? Brain;
     fitness             = resetFitness ? Mathf.NegativeInfinity : fitness;
     hasMaxFitness       = false;
     shotTheBall         = false;
     shotTheBallRewarded = false;
     fitnessCanIncrease  = false;
     touchedRightGoal    = false;
     touchingRightGoal   = false;
     touchedBall         = false;
     touchingCorner      = false;
     Player.Reset(playerPos);
     BallInitialPosition = Player.ballInitialPosition;
 }