public AnimationButton(AnimationButtonType type, Vector2 position) { this.type = type; buttonImage = new Animation(); this.position = position; buttonImage.Position = position; #region Set Texture if (type == AnimationButtonType.Increase || type == AnimationButtonType.Decrease) buttonImage.TextureName = TextureNames.button_increase; #endregion }
public Playfield(GameType gameType, Vector2 position, int sizeX) { this.gameType = gameType; this.Position = position; if (sizeX % 2 == 0) sizeX--; blockSize = Width / sizeX; int sizeY = (int)(Height / blockSize); maxBlocks = (sizeX - 1) * sizeY + 2; blocks = new List<Block>(maxBlocks); explodingBlocks = new List<Block>(); BlackBlocksQueued = 0; backgroundImage = new Image(); cutoffLine = new Image(); scoreCounter = new ScoreCounter(); scoreFloater = new ScoreFloater(); scale = new Vector2(blockSize / Block.STANDARDSIZE); staticBlocks = new Block[sizeX, sizeY]; startingColumn = (sizeX + 1) / 2; blockImages = new Image[Enum.GetNames(typeof(BlockType)).Length]; for (int i = 0; i < blockImages.Length; i++) blockImages[i] = new Image(); explosionAnimation = new Animation(); largestComboText = new Text(); stateText = new Text(); }