void Awake() { p1 = p1SlimePanel.GetComponent <BattlePanel>(); p2 = p2SlimePanel.GetComponent <BattlePanel>(); pv = GetComponent <PhotonView>(); //msc = GameObject.Find() pv.RPC("SetBattleOverlay", RpcTarget.All); prevHealth = (int)PhotonNetwork.LocalPlayer.CustomProperties["PlayerSlimeHealth"]; pi = GameObject.Find("PlayerInfo").GetComponent <PlayerInfo>(); Debug.Log(PhotonNetwork.LocalPlayer.ActorNumber); Hashtable resetMyHealth = new Hashtable(); resetMyHealth.Add("PlayerSlimeHealth", 100); PhotonNetwork.LocalPlayer.SetCustomProperties(resetMyHealth); if (PhotonNetwork.LocalPlayer.ActorNumber == 1) { p2.MyCurrentHealthText.gameObject.SetActive(false); } else { p1.MyCurrentHealthText.gameObject.SetActive(false); } idata.BuildItems(); }
// Start is called before the first frame update void Start() { pReference = GameObject.Find("PlayerInfo").GetComponent <PlayerInfo>(); if (!pReference.LoggedInFirstTime) { pReference.LoggedInFirstTime = true; } if (pReference.mySlime.getNme() != "") { SlimeButton.image.sprite = ssl[pReference.mySlime.getSlimeEvolutionStage() - 1].SlimeStage[pReference.mySlime.getSlimeIndex()]; } else { pReference.SlimeEggTapped = false; SlimeButton.image.sprite = baseEgg; } id.BuildItems(); }