Import first minecraft scene + other scripts fixes

This commit is contained in:
Crizomb 2024-12-22 16:19:32 +01:00
parent 1165e50bb5
commit 6a897fabfc
103 changed files with 273043 additions and 45 deletions

View file

@ -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");
}
}