private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "ball") { BallControler.PlaySparkleAnimation(); AudioMenager.metal.Play(); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "ball") { BallControler.PlaySparkleAnimation(); Destroy(this.gameObject); Debug.Log("Destroy"); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "ball") { BallControler.AddForceToBall(force1, force2); BallControler.PlaySparkleAnimation(); AudioMenager.rune.Play(); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "ball") { Rigidbody2D rb = collision.gameObject.GetComponent <Rigidbody2D>(); rb.velocity = Vector2.zero; rb.angularVelocity = 0; BallControler.PlaySparkleAnimation(); AudioMenager.rune.Play(); } }