Пример #1
0
 // Update is called once per frame
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         cc.BeginContact(collision.gameObject.transform.position);
     }
 }
Пример #2
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         cc.BeginContact(gameObject.transform.position);
         startMoving = true;
         collision.gameObject.transform.parent = gameObject.transform;
     }
 }