Пример #1
0
 private void ResetEnemy(bool starRoutines)
 {
     if (!initialized)
     {
         InitializeCharacter();
     }
     StopAllCoroutines();
     transform.position = pointOfOrigin;
     EnterAIState(EnemyState.Idle);
     playerEngaged        = false;
     playerInSight        = false;
     attackRoutineStarted = false;
     run         = 0;
     Velocity    = Vector2.zero;
     rightFacing = wasFacingRight;
     RotateMe(rightFacing);
     pathfinding.SetPathUnvalid();
     if (starRoutines)
     {
         StartCoroutine(BehaviourRoutine());
     }
 }