Exemplo n.º 1
0
 void OnDisable()
 {
     if (bubbleSpawned)
     {
         TutorialSharedMethods.DestroyBubble(interactBubble);
     }
 }
    void ManageDropTutorial()
    {
        //wait for drop tutorial delay

        /*if (dropTutorialTimer < dropTutorialDelay)
         * {
         *      dropTutorialTimer += Time.deltaTime;
         *      return;
         * }
         * //after tutorial delay, spawn the bubble only once
         * if (!dropBubbleSpawned)
         * {
         *      TutorialSharedMethods.SpawnBubble(dropThoughtBubble, thoughtBubblePoint);
         *      dropBubbleSpawned = true;
         * }*/
        //see if the player has interacted enough
        if (!PlayerHasDroppedEnough())
        {
            return;
        }
        //when they have jumped enough, end the tutorial
        TutorialSharedMethods.DestroyBubble(dropThoughtBubble);
        dropTutorialFinished = true;
        otherTutorial.GetComponent <DropThroughTutorial>().dropTutorialFinished = true;
    }
Exemplo n.º 3
0
    IEnumerator CutsceneCoroutine()
    {
        Debug.Log("player has started talking");
        Statics.SetPlayerControl(false, this); // revoke control from player

        yield return(null);                    //wait until player releases Q

        for (int i = 0; i < bubbles.Length; ++i)
        {
            bubbles[i].transform.position = attachPoints[i].position;
            bubbles[i].transform.rotation = attachPoints[i].rotation;
            bubbles[i].transform.parent   = attachPoints[i];
            bubbles[i].GetComponent <Renderer>().enabled = true; // makes bubble visible
            while (!Input.GetKeyDown(proceedKey))                //wait until user proceeds
            {
                yield return(null);
            }

            yield return(null);

            bubbles[i].GetComponent <Renderer>().enabled = false; // makes bubble invisible
        }

        Debug.Log("player has finished talking");
        Statics.SetPlayerControl(true, this); // return control to player
        currentlyConversing = false;
        TutorialSharedMethods.SpawnBubble(interactBubble, ThoughtBubblePoint);
        bubbleSpawned = true;
        onConversationEnd.Invoke();
    }
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (!dropTutorialFinished && collision.gameObject.tag == "Player")
     {
         TutorialSharedMethods.DestroyBubble(dropThoughtBubble);
         dropBubbleSpawned = false;
     }
 }
Exemplo n.º 5
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         TutorialSharedMethods.DestroyBubble(interactBubble);
         bubbleSpawned = false;
     }
 }
Exemplo n.º 6
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         TutorialSharedMethods.SpawnBubble(interactBubble, thoughtBubblePoint);
         bubbleSpawned = true;
     }
 }
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (!dropTutorialFinished && collision.gameObject.tag == "Player")
     {
         TutorialSharedMethods.SpawnBubble(dropThoughtBubble, thoughtBubblePoint);
         dropBubbleSpawned = true;
         ManageDropTutorial();
     }
 }
Exemplo n.º 8
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player")
     {
         canConverse = true;
         TutorialSharedMethods.SpawnBubble(interactBubble, ThoughtBubblePoint);
         bubbleSpawned = true;
     }
 }
Exemplo n.º 9
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(proceedKey) && canConverse && !currentlyConversing)
     {
         currentlyConversing = true;
         TutorialSharedMethods.DestroyBubble(interactBubble);
         bubbleSpawned = false;
         StartCoroutine(CutsceneCoroutine());
     }
 }
Exemplo n.º 10
0
 private void OnTriggerExit2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player")
     {
         canConverse = false;
         if (bubbleSpawned)
         {
             TutorialSharedMethods.DestroyBubble(interactBubble);
             bubbleSpawned = false;
         }
     }
 }
Exemplo n.º 11
0
 void ManageDropTutorial()
 {
     //wait for drop tutorial delay
     if (dropTutorialTimer < dropTutorialDelay)
     {
         dropTutorialTimer += Time.deltaTime;
         return;
     }
     //after tutorial delay, spawn the bubble only once
     if (!dropBubbleSpawned)
     {
         TutorialSharedMethods.SpawnBubble(dropThoughtBubble, thoughtBubblePoint);
         dropBubbleSpawned = true;
     }
     //see if the player has interacted enough
     if (!PlayerHasDroppedEnough())
     {
         return;
     }
     //when they have jumped enough, end the tutorial
     TutorialSharedMethods.DestroyBubble(dropThoughtBubble);
     dropTutorialFinished = true;
 }
Exemplo n.º 12
0
    //------------------------------------------------------------------------------
    // Methods for the JUMP tutorial
    //------------------------------------------------------------------------------

    void ManageJumpTutorial()
    {
        //wait for push tutorial delay
        if (jumpTutorialTimer < jumpTutorialDelay)
        {
            jumpTutorialTimer += Time.deltaTime;                //this will take longer than the moveTutorialDelay because it isn't incremented first
            return;
        }
        //after tutorial delay, spawn the bubble only once
        if (!jumpBubbleSpawned)
        {
            TutorialSharedMethods.SpawnBubble(jumpThoughtBubble, thoughtBubblePoint);
            jumpBubbleSpawned = true;
        }
        //see if the player has jumped enough
        if (!PlayerHasJumpedEnough())
        {
            return;
        }
        //when they have jumped enough, end the tutorial
        TutorialSharedMethods.DestroyBubble(jumpThoughtBubble);
        jumpTutorialFinished = true;
    }
Exemplo n.º 13
0
    //------------------------------------------------------------------------------
    // Methods for the PUSH tutorial
    //------------------------------------------------------------------------------

    void ManagePushTutorial()
    {
        //wait for push tutorial delay
        if (pushTutorialTimer < pushTutorialDelay)
        {
            pushTutorialTimer += Time.deltaTime;                //this will take longer than the moveTutorialDelay because it isn't incremented first
            return;
        }
        //after tutorial delay, spawn the bubble only once
        if (!pushBubbleSpawned)
        {
            TutorialSharedMethods.SpawnBubble(pushThoughtBubble, thoughtBubblePoint);
            pushBubbleSpawned = true;
        }
        //see if the player has pushed enough - enough is when one of the blocks is in a geyser
        if (!PlayerHasPushedEnough())
        {
            return;
        }
        //when they have pushed enough, end the tutorial
        TutorialSharedMethods.DestroyBubble(pushThoughtBubble);
        pushTutorialFinished = true;
    }
Exemplo n.º 14
0
    //------------------------------------------------------------------------------
    // Methods for the MOVEMENT tutorial
    //------------------------------------------------------------------------------

    void ManageMoveTutorial()
    {
        //wait for move tutorial delay
        if (moveTutorialTimer < moveTutorialDelay)
        {
            moveTutorialTimer += Time.deltaTime;                //this will take longer than the moveTutorialDelay because it isn't incremented first
            return;
        }
        //after tutorial delay, spawn the bubble only once
        if (!moveBubbleSpawned)
        {
            TutorialSharedMethods.SpawnBubble(moveThoughtBubble, thoughtBubblePoint);
            moveBubbleSpawned = true;
        }
        //keep track of how much the player has moved
        if (!PlayerHasMovedEnough())
        {
            return;
        }
        //when they have moved enough, end the tutorial
        TutorialSharedMethods.DestroyBubble(moveThoughtBubble);
        moveTutorialFinished = true;
    }