Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using allneeded;
- public class PlayerAttributes{
- public int PlayerHealthRegen;
- // PlayerHealthRegen modified by Gear and PlayerLevel
- void Update()
- {
- if(!Player.PlayerDead && Player.Curhealth < Player.MaxHealth){
- RegenHealth(PlayerHealthRegen);
- }
- }
- void RegenHealth (int regenAmount)
- {
- Player.CurHealth += PlayerHealthRegen;
- if(Player.CurHealth > Player.MaxHealth)
- {
- Player.CurHealth == Player.MaxHealth;
- return;
- }
- else{
- RegenHealth(PlayerHealthRegen);
- return;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement