// Update is called once per frame void Update() { if (!pauseMenu.isGameInPause()) { refleshStatus(); if ((currentLife <= 0) || ((fromBoss != null) && ("isDie").Equals(fromBoss.getState()))) { die(); } else { enemyIA(); } } }
// Update is called once per frame void Update() { if (!pauseMenu.isGameInPause()) { refleshStatus(); if ((currentLife <= 0) || ((fromBoss != null) && ("isDie").Equals(fromBoss.getState()))) { timeToAttack = 0; timeInAttack = TIME_IN_ATTACK; die(); } else { enemyIA(); } } }
void FixedUpdate() { if (enemy != null) { if (("isDead").Equals(enemy.getState())) { DestroyImmediate(this.gameObject); } } if (boss != null) { if (("isDead").Equals(boss.getState())) { DestroyImmediate(this.gameObject); } } }