void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { lvlman.AddPoints(gemPoints); Destroy(this.gameObject); } }
void OnTriggerEnter(Collider other) { if (other.tag == "Score") { GetComponent <AudioSource>().PlayOneShot(MyClip); scoreman.AddPoints(ScorerPoints); } }
void OnTriggerEnter2D(Collider2D other) { Debug.Log("inside trigger"); if (other.tag == "plate") { lvlman.AddPoints(foodpoint); Destroy(this.gameObject); } }
void DestructionM() { Destroy(this.gameObject, 0); lvlman.AddPoints(mPoints); }