private void OnCollisionEnter2D(Collision2D collision)
{
if(collision.gameObject.tag == "MovePlatform")
{
collision.gameObject.transform.parent = collision.transform;
}
}
private void OnCollisionExit2D(Collision2D collision)
{
if (collision.gameObject.tag == "MovePlatform")
{
collision.gameObject.transform.parent = null;
}
}