void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { HudScript.IncreaseScore(-500); Destroy(this.gameObject); } }
void OnTriggerEnter2D(Collider2D other) { if(other.tag == "Player"){ hud = GameObject.Find("Main Camera").GetComponent<HudScript>(); hud.IncreaseScore(5); Destroy(this.gameObject); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { hud = GameObject.Find("Main Camera").GetComponent <HudScript>(); hud.IncreaseScore(100); Destroy(this.gameObject); } }
void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { HudScript.IncreaseScore(250); coinsCollected++; Destroy(this.gameObject); HudScript.getNextAnswer(); //setCurrentImage(HudScript.getCurrentImageSprite()); } }
void OnTriggerEnter2D(Collider2D other) { if (other.GetComponent <moosecontroller>() == null) { return; } HudScript.IncreaseScore(amount); powerUpSoundEffect.Play(); powerUpParticleEffect.Play(); Destroy(gameObject); }