public void Start() { State.DeckBuilderSetupState setupState = (State.DeckBuilderSetupState)State.StateHolder.StateManager.GetAndClearPassedState(); if (setupState != null) { mCardCollection = setupState.mCardCollection; if (setupState.mCardCollection.mLibrary != null) { mLibraryCards = Cards.Loading.CardLoading.ProduceDeck(State.StateHolder.StateManager.CardPool, setupState.mCardCollection.mLibrary); } else { mLibraryCards = new CardList(); } if (setupState.mCardCollection.mDeck != null) { mDeckCards = Cards.Loading.CardLoading.ProduceDeck(State.StateHolder.StateManager.CardPool, setupState.mCardCollection.mDeck); } else { mDeckCards = new CardList(); } mLastScene = setupState.mLastScene; } VerifyDeck(); UpdateUI(); }
public void ViewDeck() { State.DeckBuilderSetupState deckBuilderStateState = new State.DeckBuilderSetupState(mCampaignState.mCurrentCollection.mDeck, mCampaignState.mCurrentCollection.mLibrary, mCampaignState.mCurrentCollection, State.GameScene.CampaignMap); State.StateHolder.StateManager.SetPassedState(deckBuilderStateState); State.StateHolder.StateManager.MoveToNextScene(State.GameScene.DeckBuilder); }