public Block(Block b) { BlockColor = b.BlockColor; BlockTexture = b.BlockTexture; PixelTexture = b.PixelTexture; spriteSheet = b.spriteSheet; spriteSize = new Vector2(16, 16); autoAnimate = true; layerDepth = 0.5f; animationByFrame = true; framesPerSprite = 1; }
public Block GenerateBlock(Block.BlockColors bc) { Block returnableBlock = new Block(bc); switch (returnableBlock.BlockColor) { case Puzzle_League_MAYHEM.Block.BlockColors.Red: returnableBlock.BlockTexture = redBlockTexture; returnableBlock.PixelTexture = redPixelTexture; break; case Puzzle_League_MAYHEM.Block.BlockColors.Yellow: returnableBlock.BlockTexture = yellowBlockTexture; returnableBlock.PixelTexture = yellowPixelTexture; break; case Puzzle_League_MAYHEM.Block.BlockColors.Green: returnableBlock.BlockTexture = greenBlockTexture; returnableBlock.PixelTexture = greenPixelTexture; break; case Puzzle_League_MAYHEM.Block.BlockColors.LightBlue: returnableBlock.BlockTexture = lightBlueBlockTexture; returnableBlock.PixelTexture = lightBluePixelTexture; break; case Puzzle_League_MAYHEM.Block.BlockColors.Purple: returnableBlock.BlockTexture = purpleBlockTexture; returnableBlock.PixelTexture = purplePixelTexture; break; case Puzzle_League_MAYHEM.Block.BlockColors.DarkBlue: returnableBlock.BlockTexture = darkBlueBlockTexture; returnableBlock.PixelTexture = darkBluePixelTexture; break; default: returnableBlock.BlockTexture = exclamationBlockTexture; returnableBlock.PixelTexture = exclamationPixelTexture; break; } returnableBlock.SpriteSheet = returnableBlock.BlockTexture; return returnableBlock; }