Exemplo n.º 1
0
    public void OnClick()
    {
        TutorialDialog dialog = TutorialDialog.Create();

        dialog.SetTutorialType(TutorialDialog.FLAG_TYPE.UNIT_PARTY_SELECT);
        dialog.Show(() => {
            Debug.Log("TutorialCarousel Completed");
        });
    }
Exemplo n.º 2
0
    void ResetState()
    {
        SessionData.Reset();

        playerScore.text = SessionData.score.ToString();
        killCount.text   = SessionData.enemiesKilled.ToString();
        rocketCount.text = SessionData.rocket.ToString();
        coinDisplay.text = SessionData.coins.ToString();

        playerShip.Initialize();
        playerShip.allowInput = true;

        UICanvas.SetActive(true);
        isShowingEndingUI = false;

        secondsElapsed = 0;
        roundTimer     = new RezTween.Timer(1, roundDuration)
        {
            onTick     = LogSeconds,
            onComplete = OnTimeUp
        };

        // Increase enemy linearly
        if (enemyManager.spawnInterval > 1)
        {
            enemyManager.spawnInterval -= 1;
        }

        if (firstTimePlay)
        {
            tutorialDialog.onClose = () =>
            {
                firstTimePlay = false;
                enemyManager.StartSpawn();
                roundTimer.Start();
                Destroy(tutorialDialog.gameObject);
            };
            RezTween.DelayedCall(0.5f, () => tutorialDialog.Show());
        }
        else
        {
            roundTimer.Start();
            enemyManager.StartSpawn();
        }
    }