public void StartTurn1()
    {
        gamemanager.movePlayerJudge++;
        Debug.Log("movePlayerJudge" + gamemanager.movePlayerJudge);
        movePlayerNum = (gamemanager.movePlayerJudge - 1) % gamemanager.startPlayerCount;

        gUIController.MyTurnObject(movePlayerNum);

        if (movePlayerNum == 0)
        {
            turnStart = true;
        }
        else
        {
            turnStart = false;
        }

        myTurnStart   = false;
        nextTurnStart = false;

        if (PhotonNetwork.IsMasterClient)
        {
            if (!(PhotonNetwork.CurrentRoom.CustomProperties[movePlayerNum.ToString()] is Player))//これでいける??
            {
                nextTurnStart = true;
            }
        }

        if (movePlayerNum == gamemanager.playerNum)//playerNumは各自で違う
        {
            myTurnStart = true;
        }
        Debug.Log("!!!!!!!!!TurnStartAnimation:" + "1" + turnStart + "2" + myTurnStart + "3" + nextTurnStart);
        animationControllerscript.TurnStartAnimationOn(turnStart, myTurnStart, nextTurnStart, false);
    }
Ejemplo n.º 2
0
    public void StartTurn2()
    {
        gamemanager.movePlayerJudge++;
        Debug.Log("movePlayerJudge" + gamemanager.movePlayerJudge);
        movePlayerNum = (gamemanager.movePlayerJudge - 1) % gamemanager.startPlayerCount;
        gUIController.MyTurnObject(movePlayerNum);

        if (movePlayerNum == 0)
        {
            turnStart = true;
        }
        else
        {
            turnStart = false;
        }


        myTurnStart    = false;
        nextTurnStart  = false;
        myPieceExtinct = false;
        //2つのifの内両方には入らない
        if (PhotonNetwork.IsMasterClient)
        {
            if (!(PhotonNetwork.CurrentRoom.CustomProperties[movePlayerNum.ToString()] is Player))//これでいける??
            {
                nextTurnStart = true;
            }
        }
        //2つめ
        if (movePlayerNum == gamemanager.playerNum)//playerNumは各自で違うb
        {
            if (PhotonNetwork.LocalPlayer.CustomProperties["piece"] is int piecenum)
            {
                if (piecenum != 0)
                {
                    myTurnStart = true;
                }
                else
                {
                    myPieceExtinct = true;
                }
            }
        }
        Debug.Log("myPieceExtinct:" + myPieceExtinct);
        animationControllerscript.TurnStartAnimationOn(turnStart, myTurnStart, nextTurnStart, myPieceExtinct);
        startJudge2Judge = true;//多分いらない
        Debug.Log("movePlayerNum1:" + movePlayerNum);
        Debug.Log(" gamemanager.playerNum1:" + gamemanager.playerNum);
    }