public void UpdateScene() { foreach (Player player in PhotonNetwork.PlayerList) { if (player.NickName == p1.myPlayeerName) { p1.myCurrentSlimeHealth = (int)player.CustomProperties["PlayerSlimeHealth"]; } else if (player.NickName == p2.myPlayeerName) { p2.myCurrentSlimeHealth = (int)player.CustomProperties["PlayerSlimeHealth"]; } } p1.MyCurrentHealthText.text = p1.myCurrentSlimeHealth + "/100"; p2.MyCurrentHealthText.text = p2.myCurrentSlimeHealth + "/100"; p1.UpdateHealthColor(); p2.UpdateHealthColor(); }