public int traceID = 0; //TODO: this too #endregion Fields #region Constructors public PhysObj(Texture2D texture, Vector2 position) : base(texture, position) { if (texture != null) { halfWidth = texture.Width / 4; halfHeight = texture.Height / 4; hitBox = new CollisionBox(this, new Vector2(texture.Width / 2, texture.Height / 2)); hitBox.SetPosition(position); checkpoint = position; } }
public void SetCollisionBox(float width, float height, Vector2 offset) { hitBox = new CollisionBox(this, new Vector2(width, height)); hitBox.SetOffset(offset); hitBox.SetPosition(position); }