Пример #1
0
    IEnumerator TutorialPart2()
    {
        generator.ClearWords();
        GameLogger.Clear();
        GameManager.Instance.blockInput = true;
        GameLogger.Log("<color=yellow>Good job.</color>");
        yield return(new WaitForSeconds(2));

        GameLogger.Log("<color=yellow>As you see, this didn't do anything, it just ended your turn.</color>");
        yield return(new WaitForSeconds(3));

        GameLogger.Log("<color=yellow>However, it's more interesting when you can combine this letters into something new.</color>");
        yield return(new WaitForSeconds(3));

        GameLogger.Log("<color=yellow>From now on, this word will be in the bottom right corner, and it will fill up as you do other actions.</color>");
        nothingWordContainer.transform.parent.gameObject.SetActive(true);
        GameManager.Instance.nothingWordContainer = nothingWordContainer.GetComponent <WordContainer>();
        yield return(new WaitForSeconds(3));

        GameLogger.Log("<color=yellow>Okay, now try defeating this training dummy...</color>");
        yield return(new WaitForSeconds(3));

        GameLogger.Log("<color=yellow>Remember, when you're done with the words you can fill up, end your turn by doing \"nothing\".</color>");
        yield return(new WaitForSeconds(3));

        GameLogger.Log("<color=yellow>Good luck!</color>");
        yield return(new WaitForSeconds(4));

        GameLogger.Clear();
        GameManager.Instance.currentEnemyEntity.OnDeath += OnDummyDead;
        GameManager.Instance.TutNextTurn();
        generator.GenerateWords();
        GameManager.Instance.blockInput = false;
    }
    IEnumerator WaitForExit()
    {
        GameLogger.Clear();
        GameLogger.Log("<color=yellow>Thanks for playing Word Wielding! I hope you had fun and remember to rate the game!</color>");
        yield return(new WaitForSeconds(5));

        Application.Quit();
    }
Пример #3
0
 private void OnDummyDead()
 {
     GameManager.Instance.blockInput = true;
     GameLogger.Clear();
     generator.ClearWords();
     generator.Words            = part3Words;
     generator.numberToGenerate = 1;
     nothingWordContainer.transform.parent.gameObject.SetActive(false);
     StartCoroutine(TutorialPart3());
 }
Пример #4
0
    IEnumerator WaitForEnemy()
    {
        yield return(new WaitForSeconds(3));

        GameLogger.Clear();
        if (enemies.Count != 0)
        {
            GameObject randomEnemy = enemies[UnityEngine.Random.Range(0, enemies.Count)];
            currentEnemyEntity      = Instantiate(randomEnemy).GetComponent <Entity>();
            currentEnemyEntity.name = randomEnemy.name;
            GameLogger.Log("<color=yellow>You face a terrifying</color> <color=red>" + currentEnemyEntity.name + "</color><color=yellow>!</color>");
            enemyInfo.SetNewEnemy(currentEnemyEntity);
            enemyHealthIndicator.trackingEntity = currentEnemyEntity;
            NewTurn();
        }
        else
        {
            TutNextTurn();
        }
    }