public SolidColliderComponent(MarauderEngine.Entity.Entity entity, Vector2 center, int radius) { _data = new SolidCData(); _data.Center = center; _data.Radius = radius; RegisterComponent(entity, "SolidColliderComponent"); }
public SolidColliderComponent(MarauderEngine.Entity.Entity entity, Vector2 center) { _data = new SolidCData(); _data.Center = center; Rectangle = entity.collisionRectanlge; RegisterComponent(entity, "SolidColliderComponent"); }
public SolidColliderComponent(MarauderEngine.Entity.Entity entity, Rectangle rectangle) { _data = new SolidCData(); Rectangle = entity.collisionRectanlge; _rectangle = rectangle; rectCollider = true; RegisterComponent(entity, "SolidColliderComponent"); }
public SolidColliderComponent(MarauderEngine.Entity.Entity entity) { _data = new SolidCData(); Rectangle = entity.collisionRectanlge; RegisterComponent(entity, "SolidColliderComponent"); try { //Collider = new Circle(new Particle((entity).GetComponent<TransformComponent>().Position, 0),this, 64) //{ // Particle = {Restitution = 1} //}; } catch (Exception ex) { throw new Exception("Entity does not have a Transform Component"); } PhysicsWorld.Instance.Add(Collider); }