Beispiel #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "JiYeon")
        {
            JiYeon = other.GetComponent <AppleJiYeon>();
            switch (name)
            {
            case "Left":
                if (!firstMove)
                {
                    StartCoroutine(MoveToCenter());
                }
                break;

            case "Center":
                Debug.Log(other.tag + " entered " + name);
                JiYeon.RotateTowardsTarget(gameManager.Wonbo);
                FindObjectOfType <DialogueRunner>().StartDialogue(Dialogues[dialoguesIndex % Dialogues.Length]);
                gameManager.StopKeyboard();
                dialoguesIndex++;
                break;

            case "Right":
                StartCoroutine(MoveToCenter());
                break;
            }
        }
    }
Beispiel #2
0
 private void Awake()
 {
     menuCard      = FindObjectOfType <MainMenuCard>();
     audioManager  = FindObjectOfType <AudioManager>();
     card          = FindObjectOfType <MainMenuCard>();
     JiYeon        = FindObjectOfType <AppleJiYeon>();
     dialogueCount = Waypoints.Length;
     dialogueIndex = 3;
 }
    void Start()
    {
        numApples = 0;
        // Start game timer
        timerText      = TimerTextUI.GetComponentInChildren <TextMeshProUGUI>();
        timerText.text = TimeLimit.ToString();

        // Get Ji-Yeon apple class
        appleJiYeon = JiYeon.GetComponent <AppleJiYeon>();
        appleWonbo  = Wonbo.GetComponent <AppleWonbo>();
        // Get UI manager
        uiManager = AppleUI.GetComponent <UIManagerApple>();

        // Play intro sequence
        StartCoroutine(PlayIntro());
    }