internal Body(ShapeAbstract shape) { _Shape = shape; _StaticBody = true; _Friction = 0; _Elasticity = 0; }
//Constructors //First constructor for non static Body internal Body(ShapeAbstract shape, float mass, float elasticity) { _Shape = shape; _Velocity = new Vector2(); _VelocityCap = new Vector2(400); _Friction = 1f; _Mass = mass; _StaticBody = false; _Elasticity = elasticity; //1 for bouce, 0 for no bounce. }
//Second constructor for static Body internal Body(ShapeAbstract shape, bool staticBody, float elasticity) { _Shape = shape; _Velocity = new Vector2(); _VelocityCap = new Vector2(400); _Friction = 1f; _StaticBody = staticBody; _Elasticity = elasticity; //1 for bouce, 0 for no bounce. _Mass = staticBody ? 0 : 1; }