Example #1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag == "Crate")
     {
         Destroy(col.gameObject, 0.8f);
         col.gameObject.GetComponent <CrateControllerLevelTwo>().IsCollected();
         playerController2.AddToCollection();
     }
 }