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;
    }
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (!dropTutorialFinished && collision.gameObject.tag == "Player")
     {
         TutorialSharedMethods.DestroyBubble(dropThoughtBubble);
         dropBubbleSpawned = false;
     }
 }
Exemplo n.º 4
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         TutorialSharedMethods.DestroyBubble(interactBubble);
         bubbleSpawned = false;
     }
 }
Exemplo n.º 5
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.º 6
0
 private void OnTriggerExit2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player")
     {
         canConverse = false;
         if (bubbleSpawned)
         {
             TutorialSharedMethods.DestroyBubble(interactBubble);
             bubbleSpawned = false;
         }
     }
 }
Exemplo n.º 7
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.º 8
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.º 9
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.º 10
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;
    }