Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. using allneeded;
  2.  
  3. public class PlayerAttributes{
  4.  
  5. public int PlayerHealthRegen;
  6.  
  7.  
  8. // PlayerHealthRegen modified by Gear and PlayerLevel
  9.  
  10. void Update()
  11. {
  12. if(!Player.PlayerDead && Player.Curhealth < Player.MaxHealth){
  13. RegenHealth(PlayerHealthRegen);
  14. }
  15. }
  16.  
  17. void RegenHealth (int regenAmount)
  18. {
  19. Player.CurHealth += PlayerHealthRegen;
  20.  
  21. if(Player.CurHealth > Player.MaxHealth)
  22. {
  23. Player.CurHealth == Player.MaxHealth;
  24. return;
  25. }
  26. else{
  27. RegenHealth(PlayerHealthRegen);
  28. return;
  29. }
  30. }
  31.  
  32.  
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement