Advertisement
Guest User

Untitled

a guest
Mar 7th, 2015
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class PlayerHealth : MonoBehaviour {
  5.     public int health = 100;
  6.     [RPC]
  7.     public void dealDamage(int dmg) {
  8.         health -= dmg;
  9.         if (health <= 0) {
  10.             //You are now dead.
  11.         }
  12.         //networkView.RPC("updateHealth", RPC.Others, health);???
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement