public override SKColor GetColor(TetrisField field, Nomino Element, NominoElement block, NESBlockTypes BlockType, BCT PixelType) { int LevelNum = field.Level; int LevelIndex = MathHelper.mod(LevelNum, AllLevelColors.Length); switch (PixelType) { case BCT.Transparent: return(SKColors.Transparent); case BCT.Glint: return(SKColors.White); case BCT.Base_Dark: return(LevelColorSets[LevelIndex][0]); case BCT.Base_Light: return(LevelColorSets[LevelIndex][1]); case BCT.Black: return(SKColors.Black); default: return(LevelColorSets[LevelIndex][0]); } }
/* private void ApplyColorSet(Nomino bg, Color[] set) * { * foreach (var iterate in bg) * { * * Color[] Hollow = new Color[] { set[0], SKColors.White }; * Color[] Dark = new Color[] { set[0], set[0] }; * Color[] Light = new Color[] { set[1], set[1] }; * Color[] selected; * if (bg is Tetromino_I || bg is Tetromino_T || bg is Tetromino_O) * selected = Hollow; * else if (bg is Tetromino_J || bg is Tetromino_Z) * selected = Dark; * else if (bg is Tetromino) * selected = Light; * else * selected = TetrisGame.Choose(new Color[][] { Hollow, Dark, Light }); * if (iterate.Block is StandardColouredBlock) * { * var coloured = (StandardColouredBlock)iterate.Block; * coloured.DisplayStyle = StandardColouredBlock.BlockStyle.Style_Pixeled; * * coloured.BlockColor = selected[0]; * coloured.InnerColor = selected[1]; * if (coloured.InnerColor != coloured.BlockColor) * { * coloured.DisplayStyle = StandardColouredBlock.BlockStyle.Style_Pixeled_Outline; * } * } * } * }*/ public override SKPointI GetBlockSize(TetrisField field, NESBlockTypes BlockType) { return(new SKPointI(DarkerBlock.Length, DarkerBlock[0].Length)); }