Beispiel #1
0
 public void OnTriggerEnter2D(Collider2D collision)
 {
     if (GameObject.FindGameObjectWithTag("enemy") == null)
     {
         collision.gameObject.GetComponent <hero_move>().stage = 16;
         ctr.SaveGame();
         SceneManager.LoadScene(26);
     }
 }
 public void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         if ((GameObject.FindGameObjectWithTag("boss3") == null) && (GameObject.FindGameObjectWithTag("boss3") == null))
         {
             collision.gameObject.GetComponent <hero_move>().stage = 27;
             ctr.SaveGame();
             SceneManager.LoadScene(22);
         }
     }
 }
 public void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         if (GameObject.FindGameObjectWithTag("boss1") == null)
         {
             collision.gameObject.GetComponent <hero_move>().num[12] = true;
             collision.gameObject.GetComponent <hero_move>().stage   = 26;
             ctr.SaveGame();
             SceneManager.LoadScene(17);
         }
     }
 }
Beispiel #4
0
 public void OnTriggerEnter2D(Collider2D collision)
 {
     if (GameObject.FindGameObjectWithTag("enemy") == null)
     {
         for (int i = 7; i < 11; i++)
         {
             collision.gameObject.GetComponent <hero_move>().num[i] = true;
             collision.gameObject.GetComponent <hero_move>().stage  = 11;
         }
         ctr.SaveGame();
         SceneManager.LoadScene(12);
     }
 }
Beispiel #5
0
    public void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.tag == "Player")
        {
            if (GameObject.FindGameObjectWithTag("enemy") == null && x)
            {
                for (int i = 0; i < 3; i++)
                {
                    collision.gameObject.GetComponent <hero_move>().num[i] = true;
                }
                for (int i = 13; i < 16; i++)
                {
                    collision.gameObject.GetComponent <hero_move>().num[i] = true;
                }

                collision.gameObject.GetComponent <hero_move>().stage = 4;
                ctr.SaveGame();
                SceneManager.LoadScene(5);
            }
        }
    }