void OnTriggerEnter2D(Collider2D other) { RubyController controller = other.GetComponent <RubyController>(); if (controller != null) { controller.ChangeCogs(1); Destroy(gameObject); } }
void OnTriggerEnter2D(Collider2D other) { RubyController controller = other.GetComponent <RubyController>(); if (controller != null) { controller.ChangeCogs(1); Destroy(gameObject); } }