Пример #1
0
 void AumentaPontuacao()
 {
     if (playerLife.IsAlive())
     {
         pontuacao += 1;
     }
 }
Пример #2
0
 void Update()
 {
     if (!playerLife.IsAlive() && !GameOver)
     {
         GetComponentInChildren <Image>().enabled = true;
         GetComponentInChildren <Text>().enabled  = true;
         GameOver = true;
     }
 }
Пример #3
0
 void Update()
 {
     if (enemyLife.IsAlive() && playerLife.IsAlive())
     {
         nav.SetDestination(playerTransform.position);
     }
     else
     {
         nav.enabled = false;
     }
 }
Пример #4
0
    void Spawn()
    {
        if (playerLife.IsAlive())
        {
            float   x   = Random.Range(-1f, 1f);
            float   z   = Random.Range(-1f, 1f);
            Vector3 dir = new Vector3(x, 0f, z);
            dir = dir.normalized * Random.Range(raioDeSeguranca, raioDeSpanw);

            Instantiate(enemy, gameObject.transform.position + dir, gameObject.transform.rotation);
        }
    }
Пример #5
0
 public bool IsAbleToMove()
 {
     return(playerLife.IsAlive() && !playerEffectStatus.IsCurrentlyStun() && !isWin);
 }