Advertisement
Munchy2007

Part6b_1

Mar 12th, 2018
8,041
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. const int MAX_HP = 100;
  2.         int hitPoints
  3.         {
  4.             get
  5.             {
  6.                 object hp;
  7.                 if (photonView.owner.CustomProperties.TryGetValue("HP", out hp))
  8.                     return (int)hp;
  9.                 else
  10.                     return MAX_HP;
  11.             }
  12.             set
  13.             {
  14.                 player.SetCustomProperty("HP", value);
  15.             }
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement