// shortened constructor (used for Entities such as E_Space: public Entity(State parentState, Vector2 pos) { this.parentState = parentState; this.pos = pos; this.id = EntityCounter.takeNumber(); this.sprite = parentState.parentManager.game.noSprite; // default sprite this.spriteWidth = sprite.Width; this.spriteHeight = sprite.Height; // Default values: this.active = true; this.visible = true; }
// constructor: public Entity(State parentState, Texture2D sprite, int x, int y) { this.parentState = parentState; this.pos.X = x; this.pos.Y = y; this.id = EntityCounter.takeNumber(); this.sprite = sprite; this.spriteWidth = sprite.Width; this.spriteHeight = sprite.Height; // Default values: this.active = true; this.visible = true; }