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