Ejemplo n.º 1
0
    private IEnumerator ThreadSpotted()
    {
        enableDialogue();         //A spool?
        while (GameController_v7.Instance.GetDialogueManager().IsDialogueBoxPlaying())
        {
            disablePlayerControls();
            yield return(null);
        }

        EnablePlayerControls();

        while (!pickupThread.IsTaken())
        {
            yield return(null);
        }

        enableDialogue();         //show something cool
        while (GameController_v7.Instance.GetDialogueManager().IsDialogueBoxPlaying())
        {
            disablePlayerControls();
            yield return(null);
        }

        EnablePlayerControls();
    }
    private IEnumerator HammerSighted()
    {
        playerAttack.SetHasHammer(false);

        enableDialogue();         //Spotted Hammer
        while (GameController_v7.Instance.GetDialogueManager().IsDialogueBoxPlaying())
        {
            disablePlayerControls();
            yield return(null);
        }

//		ToggleMobileUI (true);
//		GameController_v7.Instance.GetMobileUIManager().ToggleMobileControls(true);
//		playerController.canMove (true);
//		playerAttack.canAttack (true);
        EnablePlayerControls();

        bool interacted = false;

        while (!interacted)
        {
            //if the needle is still in the world, interacted is false
//			if (!pickupObject.pickup.activeInHierarchy) {

            if (pickupObject.IsTaken())
            {
                interacted = true;
                // disable pickup needle hint
//				pickupObject.gameObject.GetComponentInChildren<FloatingButtonHint>().isTangible = false;
            }

            yield return(null);
        }
        enableDialogue();         // We might use it on obstacles // Hammer also has sky fragment
        while (GameController_v7.Instance.GetDialogueManager().IsDialogueBoxPlaying())
        {
            disablePlayerControls();
            yield return(null);
        }
        EnablePlayerControls();
        //Switch weapons hint
        GameController_v7.Instance.GetDialogueManager().DisplayMessage(DialogueManager_v2.DialogueType.HINT, dialogues, null);

//		ToggleMobileUI (true);
//		playerController.canMove (true);
//		playerAttack.canAttack (true);

        while (!playerAttack.UsingHammer())
        {
            yield return(null);
        }

        GameController_v7.Instance.GetDialogueManager().HintSuccess();

        StartCoroutine(EnemySighted());
    }
Ejemplo n.º 3
0
    private IEnumerator InteractionTutorial()
    {
        bool interacted = false;

        if (!playerController.m_FacingRight)
        {
            playerController.Flip();
        }

        enableDialogue();        //Spot Needle
        while (GameController_v7.Instance.GetDialogueManager().IsDialogueBoxPlaying())
        {
            disablePlayerControls();
            yield return(null);
        }

        //Hint to move towards needle
        GameController_v7.Instance.GetDialogueManager().DisplayMessage(DialogueManager_v2.DialogueType.HINT, dialogues, null);

        ToggleMobileUI(true);
        playerController.canMove(true);
        while (!interacted)
        {
            //if the needle is still in the world, interacted is false
//			if (!pickupObject.pickup.activeInHierarchy) {
            if (pickupObject.IsTaken())
            {
                interacted = true;
                // disable pickup needle hint
                GameObject.Find("Hint_Needle").GetComponentInChildren <FloatingButtonHint>().isTangible = false;
            }

            yield return(null);
        }

        StartCoroutine(NeedleTutorial());
    }