Exemple #1
0
    public void TakeBack()
    {
        if (ingameM.GameState == InGameManager.GAME_STATE.GAME)
        {
            if (!data.isClicked_takeback)
            {
                data.isClicked_takeback = true;

                if (data.isMyTurn && data.turnCount2 > 2)
                {
                    serverM.RequestTakeBack();
                    data.isClicked_takeback = true;
                }
                else if (data.isSended_takeback)
                {
                    serverM.AcceptTakeBack();
                    data.isClicked_takeback = true;
                }
            }
        }
    }