Beispiel #1
0
 private void Update()
 {
     if(curEnemy != null)
     {
         EnemyAImain enemyAI = curEnemy.GetComponent<EnemyAImain>();
         if(enemyAI.getState() == 2 && curEnemy.position.z < Player.transform.position.z)
         {
             endlrd.createdTransitionbackward = true;
         }
     }
 }
Beispiel #2
0
    private void Update()
    {
        if (curEnemy != null && Player != null)
        {
            EnemyAImain enemyAI = curEnemy.GetComponent <EnemyAImain>();
            if (enemyAI.getState() == 2 && curEnemy.position.z < Player.transform.position.z)
            {
                endlrd.createdTransitionbackward = true;
            }
        }

        if (Player == null)
        {
            deathTimer -= Time.deltaTime;
            if (deathTimer < 0)
            {
                SceneManager.LoadScene(0);
            }
        }
    }