- Home /
Question by
MobinYaqoob · Jan 16, 2015 at 06:13 AM ·
javascriptphotonunity 4
in PlayerNetworkMovement i wanna active a deathpanel but it is not taking gameobject
public GameObject deathPanel;
void Start () { if (photonView.isMine) { GetComponent().enabled = true; GetComponent().enabled = true; source = GameObject.Find("MakeCars").GetComponent();
}
else
{
StartCoroutine("UpdateData");
}
}
public void GetAccident_RPC(float damage)
{
health -= damage;
if (health<=0 && photonView.isMine)
{
if (ReSpawnMe != null)
{
ReSpawnMe(3.0f); }
PhotonNetwork.Destroy(this.gameObject);
Time.timeScale = 0;
source.mute = true;
}
init i wanna when health is equal to zero it appears a DeathPanel but my PlayerNetworkMovement script don't take the GameObject i dont know why ????
Comment