public CollisionBody(TransformableEntity entity, CollisionShape shape) : this() { Owner = entity; Shape = shape; }
// shortcut public static IWrappedBody CreateBody(TransformableEntity entity, CollisionShape shape) { return Create(entity, shape) as IWrappedBody; }
public static CollisionBody Create(TransformableEntity entity, CollisionShape shape) { CollisionBody collider = Pool.Acquire<CollisionBody>(); collider.Owner = entity; collider.Shape = shape; collider.OnCollision += collider.HandleOnCollision; collider.BeforeCollision += collider.HandleBeforeCollision; return collider; }
// shortcut public static IWrappedBody CreateBody(CollisionShape shape) { return Create(null, shape) as IWrappedBody; }