示例#1
0
 public void OnGUI()
 {
     if (!isLocalPlayer)
     {
         return;
     }
     if (GUI.Button(new Rect(10, 200, 200, 20), "Debug Equip Knife"))
     {
         powerup.Destroy();
         powerup = new KnifePowerup(gameObject);
         CmdSetPowerup("knife");
     }
     if (GUI.Button(new Rect(10, 230, 200, 20), "Debug Equip Gun"))
     {
         powerup.Destroy();
         powerup = new GunPowerup(gameObject);
         CmdSetPowerup("gun");
     }
 }
示例#2
0
 void RemovePowerup(Powerup p)
 {
     powerups.Remove(p);
     // my power pool is not yet a stack
     p.Destroy();
 }