public OptionPointEventSquare(Sprite spriteSheet, Vector2 position, PointEventType state) : base(spriteSheet, position) { displaySprite = spriteSheet.GetSubSprite(new Rectangle(50, 0, 12, 12)); optionState = state; overlaySprite = PointSquare.GetEventSprite(state); readyToSetDisplay = false; }
//Creates square grid linked to given SquareData-grid protected void CreateSquareGrid(SquareData[,] data) { int localWidth = data.GetLength(0); int localHeight = data.GetLength(1); grid = new Square[localWidth, localHeight]; for (int n = 0; n < localWidth; n++) { for (int m = 0; m < localHeight; m++) { Square s = new PointSquare((PointSquareData)data[n, m], GetSquarePos(n, m), spriteSheet, new Coordinate(n, m)); s.Initialize(); grid[n, m] = s; } } }
public override void Update(GameTime gameTime) { base.Update(gameTime); overlaySprite = PointSquare.GetEventSprite(ActiveData.pointEventState); }