Example #1
0
    void OnTriggerEnter2D(Collider2D collider)
    {
        ColorHuman human = collider.GetComponent <ColorHuman> ();
        ColorBoy   boy   = collider.GetComponent <ColorBoy> ();
        ColorGirl  girl  = collider.GetComponent <ColorGirl> ();

        if (boy != null)
        {
            StartCoroutine(ColorGirl.copy_girl.waitAndRun());
        }
        if (girl != null)
        {
            SceneManager.LoadScene("Level1");
        }
        if (human != null)
        {
            human.destroyHuman();
        }
    }
Example #2
0
 void Awake()
 {
     copy_girl        = this;
     pianoSource      = gameObject.AddComponent <AudioSource> ();
     pianoSource.clip = pianoIntroSound;
 }