Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class PlayerHealth : MonoBehaviour {
- public int health = 100;
- [RPC]
- public void dealDamage(int dmg) {
- health -= dmg;
- if (health <= 0) {
- //You are now dead.
- }
- //networkView.RPC("updateHealth", RPC.Others, health);???
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement