public void Die() { //GlobalGameState.LogText.text = killername + " killed " + gameObject.name; GameObject particleGO = Instantiate(GlobalGameState.KillerDieFX, gameObject.transform.position, Quaternion.identity); if (particleGO && particleGO.GetComponent <ParticleSystem> ()) { particleGO.GetComponent <ParticleSystem> ().Play(); } GlobalGameState.RemoveUser(id); }
public void Kill(string killername) { GlobalGameState.LogText.text = killername + " killed " + gameObject.name; GameObject particleGO; if (!IsNPC) { particleGO = Instantiate(GlobalGameState.BlenderPlayerKillFX, gameObject.transform.position, Quaternion.identity); } else { particleGO = Instantiate(GlobalGameState.BlenderNPCKillFX, gameObject.transform.position, Quaternion.identity); } if (particleGO && particleGO.GetComponent <ParticleSystem> ()) { particleGO.GetComponent <ParticleSystem> ().Play(); } GlobalGameState.RemoveUser(id); }