// Update is called once per frame private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { cc.BeginContact(collision.gameObject.transform.position); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { cc.BeginContact(gameObject.transform.position); startMoving = true; collision.gameObject.transform.parent = gameObject.transform; } }