コード例 #1
0
    // Methods ////////////////////////////////////////////////////////////////////////////////////

    public static CardViewing GetInstance()
    {
        if (StateInstance == null)
        {
            StateInstance = new CardViewing();
        }
        return(StateInstance);
    }
コード例 #2
0
    //---------------------------------------------------------------------------------------------

    public void OpenCardsMenu(bool show)
    {
        cardsView.GetComponent <CardMenu>().ShowCardsView(show);
        ShowTurnView(!show);

        if (show)
        {
            CurrentState = CardViewing.GetInstance();
        }
        else
        {
            CurrentState = WaitingForAction.GetInstance();
        }
    }
コード例 #3
0
    //---------------------------------------------------------------------------------------------

    public void ShowSellingControls(bool show)
    {
        cardsViewSellingControls.SetActive(show);
        cardsViewGeneralControls.SetActive(!show);

        if (show)
        {
            stateManager.CurrentState = CardSelling.GetInstance();
        }
        else
        {
            stateManager.CurrentState = CardViewing.GetInstance();
            stateManager.CurrentPlayer().ConfirmCardSell();
        }
    }