void OnCollisionEnter2D(Collision2D collision) { Painter painter = new Painter(); painter.ChangeOpacity(gameObject, 50f); rigidBody.constraints = new RigidbodyConstraints2D(); collider.isTrigger = true; }
void OnCollisionEnter2D(Collision2D collision) { Painter painter = new Painter(); painter.ChangeOpacity(gameObject, 50f); rigidBody.constraints = new RigidbodyConstraints2D(); collider.isTrigger = true; }