Beispiel #1
0
    public override void OnPlayerLeftRoom(Player otherPlayer)
    {
        if (PhotonNetwork.IsMasterClient)
        {
            var roomproperties = PhotonNetwork.CurrentRoom.CustomProperties;//Roomは大文字
            if (otherPlayer.CustomProperties["num"] is int num)
            {
                if (turnController2Obj.activeSelf == true && num == (gamemanager.movePlayerJudge - 1) % gamemanager.startPlayerCount)
                {
                    turnController2.StartJudge2Judge();
                }
                roomproperties[num.ToString()] = null;
                PhotonNetwork.CurrentRoom.SetCustomProperties(roomproperties);

                //いなくなったプレイヤーのpiece編集
                Debug.Log("PlayerLeft:");
                var playerproperties = new ExitGames.Client.Photon.Hashtable();
                playerproperties["piece"] = 0;
                otherPlayer.SetCustomProperties(playerproperties);

                //Text??
            }
            else
            {
                Debug.Log("CustomPropatiesDestroyMissed");
            }
        }
    }
Beispiel #2
0
 private void Update()
 {
     if (destroyJudgeFinish && destroyFinish)
     {
         Debug.Log("DestroyCheckOff");
         turnController2.StartJudge2Judge();
         gameObject.SetActive(false);
     }
     Debug.Log("destroyFinish" + destroyFinish);
     Debug.Log("destroyJudgeFinish" + destroyJudgeFinish);
 }