Пример #1
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("Player") && PM.CanCollectObjects())
     {
         GM.AddLife();
         EM.SetCoinPickUpParticles(transform.position);
         EM.CreateDisappearingCircle(transform.position);
         gameObject.SetActive(false);
     }
     else if (other.CompareTag("Wall"))
     {
         onDeath();
     }
 }
Пример #2
0
 public void OnDeath()
 {
     EM.SetCoinPickUpParticles(transform.position);
     EM.CreateDisappearingCircle(transform.position);
     gameObject.SetActive(false);
     // isAttached = false;
 }
Пример #3
0
 private void onDeath()
 {
     EM.SetCoinPickUpParticles(transform.position);
     EM.CreateDisappearingCircle(transform.position);
     gameObject.SetActive(false);
 }