Ejemplo n.º 1
0
 void CheckIfKilled(int killerPnum, bool tipKill)
 {
     if (health <= 0)
     {
         transform.gameObject.SetActive(false);
         BS.transform.position = transform.position;
         // more elaborate effects for the tip kill
         Debug.Log(tipKill);
         if (tipKill)
         {
             BS.EmitParticles(125, 1, 2f, 1.5f);
         }
         else if (killerPnum != -2)
         {
             BS.EmitParticles(50);
         }
         if (killerPnum == -1)
         {
             // suicice
             SS.DecrementKills(PCS.GetPlayerNumber());
         }
         else
         {
             SS.IncrementKill(killerPnum);
         }
         RS.RespawnPlayer(3f, PCS.GetPlayerNumber());
     }
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     playerIndex = (PlayerIndex)PCS.GetPlayerNumber();
 }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     PCS = GetComponent <PlayerControlScript> ();
     // for use in local mode, gets palyer number from the pcs
     playerIndex = (PlayerIndex)PCS.GetPlayerNumber();
 }