Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int MAX_HP = 100;
- int hitPoints
- {
- get
- {
- object hp;
- if (photonView.owner.CustomProperties.TryGetValue("HP", out hp))
- return (int)hp;
- else
- return MAX_HP;
- }
- set
- {
- player.SetCustomProperty("HP", value);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement