Import first minecraft scene + other scripts fixes
This commit is contained in:
parent
1165e50bb5
commit
6a897fabfc
103 changed files with 273043 additions and 45 deletions
|
@ -10,6 +10,7 @@ public class HealthHandler : MonoBehaviour
|
|||
{
|
||||
Debug.Assert(damage >= 0, "Damage cannot be negative, use Heal if you want to heal");
|
||||
currentHealth -= Mathf.Max(0, damage-armor);
|
||||
if (currentHealth <= 0) Death();
|
||||
}
|
||||
|
||||
public void Heal(float value)
|
||||
|
@ -34,5 +35,10 @@ public class HealthHandler : MonoBehaviour
|
|||
Debug.Assert(armorBoost >= 0, "armorBoost can't be less than zero, use EquipArmor instead");
|
||||
armor -= armorBoost;
|
||||
}
|
||||
|
||||
public void Death()
|
||||
{
|
||||
print("you dead");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue