示例#1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.name == "Player")
     {
         sfx.PlaySfx(Gulp);
     }
 }
示例#2
0
 void FixedUpdate()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         sfx.PlaySfx(sfx.SadHowl);
         Invoke("LoadTutorial", 5);
     }
 }
示例#3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("Destroyer"))
     {
         sfx.PlaySfx(sfx.BirdDeath);
         Instantiate(Splat, transform.position, Quaternion.identity);
         Destroy(gameObject);
     }
 }
示例#4
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.CompareTag("Wall"))
        {
            Turn();
        }

        if (other.CompareTag("Death"))
        {
            transform.position = startingPos;
        }

        if (other.CompareTag("Destroyer"))
        {
            sfx.PlaySfx(sfx.SnakeDeath);
            Instantiate(Splat, transform.position, Quaternion.identity);
            Destroy(gameObject);
        }
    }
示例#5
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.name == "Player")
        {
            sfx.PlaySfx(Ding);
            // normal Running
            if (!isEnd)
            {
                theTextbox.currentLine = startLine;
                theTextbox.ReloadScript(theText, isEnd);
                hasActivated = true;

                if (endLine > 0 || IgnoreEndLine)
                {
                    theTextbox.endAtLine = endLine;
                }

                if (endLine == 0 && !IgnoreEndLine)
                {
                    theTextbox.endAtLine = theTextbox.textLines.Length - 1;
                }
            }

            if (isEnd)
            {
                Scene CheckScene = SceneManager.GetActiveScene();
                if (CheckScene.name == "Tutorial_Calculation_Portion")
                {
                    align.SetAlign();
                    print("AlignmentSet");
                }

                theTextbox.ReloadScript(theText, isEnd);
                theTextbox.currentLine = startLine;
                theTextbox.FixEndLine();
            }

            if (UseFader)
            {
                fader.IsFaded       = false;
                theTextbox.useFader = true;
            }

            else
            {
                theTextbox.useFader = false;
            }

            if (DestroyWhenActivated)
            {
                gameObject.SetActive(false);
            }


            if (FreezePlayer)
            {
                playerController.MovementFreeze();
                playerController.CanMove = false;
            }

            if (Monster != null)
            {
                Monster.SetActive(true);
            }
        }
    }