void Update() { hp.fillAmount = (healthEnemy / maxhp); objectS = GameObject.Find("Wall 1"); whp = objectS.GetComponent <WallHp>(); objectSkills = GameObject.Find("Player"); skillsSkript = objectSkills.GetComponent <Skills>(); if (skillsSkript.damageUpper == true && damageUpSkill == false) { DamageUP(); if (skillCritical == true) { CriticalDamage(); } damageUpSkill = true; } if (skillsSkript.criticalShoots == true && skillCritical == false) { CriticalDamage(); skillCritical = true; } if (healthEnemy <= 0) { Death(); healthEnemy = maxhp; } if (move == true) { Move(); } }
void Update() { hp.fillAmount = healthEnemy / 100f; objectS = GameObject.Find("Wall 1"); whp = objectS.GetComponent <WallHp>(); if (healthEnemy == 0) { Death(); } if (move == true) { Move(); } }