示例#1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         //Debug.Log("collided");
         smash.Play();
         controller.EquipGravGun(true);
         gameObject.GetComponent <SpriteRenderer>().enabled = false;
         Destroy(gameObject, 1.3f);//Wait for audio to play before destroy
     }
 }