Exemple #1
0
//	void OnCollision2D(Collision2D other){
//		if (other.gameObject.tag == "Portal") {
//			gm.LoseLife ();
//		}
//	}
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.tag == "Portal")
        {
            gm.LoseLife();
            ass.clip = FindObjectOfType <Game_Manager>().audios[7];
            ass.Play();

            Invoke("Dead", 0.2f);
        }
    }