public Sprite(Texture texture, Size size) { this.texture = texture; Size = size; GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); GL.Enable(EnableCap.Texture2D); }
public Box(Vector2D position, Size size) : base(position, size, BodyFactory.CreateRectangle(Entities.world2D, size.Width, size.Height, 1.0f, position, BodyType.Dynamic)) { Entities.Register(this); body.IsStatic = false; body.Restitution = 1; body.Friction = 0.01f; }
protected PhysicsObject(Vector2D position, Size size, Body body) { this.size = size; this.body = body; }