Exemple #1
0
 void AumentaPontuacao()
 {
     if (playerLife.IsAlive())
     {
         pontuacao += 1;
     }
 }
Exemple #2
0
 void Update()
 {
     if (!playerLife.IsAlive() && !GameOver)
     {
         GetComponentInChildren <Image>().enabled = true;
         GetComponentInChildren <Text>().enabled  = true;
         GameOver = true;
     }
 }
Exemple #3
0
 void Update()
 {
     if (enemyLife.IsAlive() && playerLife.IsAlive())
     {
         nav.SetDestination(playerTransform.position);
     }
     else
     {
         nav.enabled = false;
     }
 }
Exemple #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);
        }
    }
Exemple #5
0
 public bool IsAbleToMove()
 {
     return(playerLife.IsAlive() && !playerEffectStatus.IsCurrentlyStun() && !isWin);
 }