void OnCollisionExit(Collision col) { if (col.gameObject.tag == "Slime") { CollidedWithSlime = false; curSlimeSide = SlimeSide.None; } }
void OnCollisionStay(Collision col) { if (col.gameObject.tag == "Slime") { Slime = col.gameObject; if (Slime.transform.position.x > Player.Instance.Center.x) { curSlimeSide = SlimeSide.Right; } else if (Slime.transform.position.x < Player.Instance.Center.x) { curSlimeSide = SlimeSide.Left; } CollidedWithSlime = true; } }