public void OnPhotonPlayerDisconnected(PhotonPlayer player) { Debug.Log("OnPhotonPlayerDisconnected: " + player); if (PhotonNetwork.isMasterClient && player.ID == PunGameLogic.playerWhoIsIt) { PunGameLogic.TagPlayer(PhotonNetwork.player.ID); } }
public void Update() { if (PhotonNetwork.player.ID != PunGameLogic.playerWhoIsIt) { return; } if (Input.GetButton("Fire1")) { GameObject gameObject = this.RaycastObject(Input.mousePosition); if (gameObject != null && gameObject != base.gameObject && gameObject.name.Equals("monsterprefab(Clone)", 5)) { PhotonView component = gameObject.transform.root.GetComponent <PhotonView>(); PunGameLogic.TagPlayer(component.owner.ID); } } }