private SetBoundBox ( |
||
World | ||
width | int | |
height | int | |
offset | Vector2 | |
category | Category | |
collidesWith | Category | |
isStatic | bool | |
return | void |
internal void SetBoundBox(World World, int width, int height, Vector2 offset,
Category category = Category.None, Category collidesWith = Category.None, bool isStatic = false)
{
BoundBox = BodyFactory.CreateRectangle(World, ConvertUnits.ToSimUnits(width),
ConvertUnits.ToSimUnits(height), 1f);
BoundBox.Position = ConvertUnits.ToSimUnits(CurrentPos);
BoundBox.CollidesWith = collidesWith;
BoundBox.CollisionCategories = category;
BoundBox.IsStatic = isStatic;
Offset = offset;
}