Exemple #1
0
 public void ShowInitialScreenProperly()
 {
     view.ShowInitialScreen("testTitle", "testSubtitle");
     Assert.IsTrue(view.initialScreen.activeSelf);
     Assert.AreEqual("testTitle", view.initialScreenTitle.text);
     Assert.AreEqual("testSubtitle", view.initialScreenSubtitle.text);
 }
    public void ApplyState()
    {
        switch (currentState)
        {
        case State.Initial:
            currentItemShown = 0;
            view.SetContentActive(true);
            view.ShowInitialScreen(model.title, model.subtitle);
            break;

        case State.SingleItem:
            view.ShowItemScreen(model.items[currentItemShown], model.items.Length - (currentItemShown + 1));
            break;

        case State.Summary:
            view.ShowSummaryScreen(model.items);
            break;

        case State.Summary_NoItems:
            view.ShowSummaryNoItemsScreen();
            break;

        case State.Finish:
            WebInterface.SendUserAcceptedCollectibles(model.id);

            OnAirdropFinished?.Invoke();

            MoveToNextState();
            break;

        case State.Hidden:
        default:
            model = null;
            view.SetContentActive(false);
            break;
        }
    }