diff options
Diffstat (limited to 'Thronefall_v1.0/Decompile/UpgradePlayerHp.cs')
-rw-r--r-- | Thronefall_v1.0/Decompile/UpgradePlayerHp.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Thronefall_v1.0/Decompile/UpgradePlayerHp.cs b/Thronefall_v1.0/Decompile/UpgradePlayerHp.cs new file mode 100644 index 0000000..84495d7 --- /dev/null +++ b/Thronefall_v1.0/Decompile/UpgradePlayerHp.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +public class UpgradePlayerHp : MonoBehaviour +{ + public float healthMultiplyer; + + private void OnEnable() + { + PlayerMovement[] registeredPlayers = PlayerManager.Instance.RegisteredPlayers; + for (int i = 0; i < registeredPlayers.Length; i++) + { + Hp component = registeredPlayers[i].GetComponent<Hp>(); + component.maxHp *= healthMultiplyer; + component.Heal(float.MaxValue); + } + } +} |