public override CollisionInfo TestCollision(CollisionHull2D other) { switch (other.HullType) { case CollisionHull2D.CollisionType.Circle: return(CollisionHull2D.CircleVSCircle(this, other as CircleHull)); case CollisionHull2D.CollisionType.AABB: return(CollisionHull2D.CircleVSAABB(this, other as AABBHull)); case CollisionHull2D.CollisionType.OBB: return(CollisionHull2D.CircleVSOBB(this, other as OBBHull)); default: break; } return(null); }
public override bool TestCollision(CollisionHull2D other) { switch (other.HullType) { case CollisionHull2D.CollisionType.Circle: return(CollisionHull2D.CircleVSAABB(other as CircleHull, this)); case CollisionHull2D.CollisionType.AABB: return(CollisionHull2D.AABBVSAABB(this, other as AABBHull)); case CollisionHull2D.CollisionType.OBB: return(CollisionHull2D.AABBVSOBB(this, other as OBBHull)); default: break; } return(false); }