private SKPaint GetPaint(string path)
        {
            var thisPaint = MiscHelpers.GetBitmapPaint();

            thisPaint.Shader = ImageExtensions.GetSkShader(_thisA, path);
            return(thisPaint);
        }
Esempio n. 2
0
        protected override void SetUpPaints()
        {
            _bitPaint = MiscHelpers.GetBitmapPaint();
            Assembly thisA = Assembly.GetAssembly(GetType());

            _thisBit        = ImageExtensions.GetSkBitmap(thisA, "SorryGameBoard.png");
            _highlightPaint = MiscHelpers.GetStrokePaint(SKColors.Fuchsia, 3);
        }
 protected override void SetUpPaints()
 {
     _thisA       = Assembly.GetAssembly(GetType());
     _bitPaint    = MiscHelpers.GetBitmapPaint();
     _thisBit     = ImageExtensions.GetSkBitmap(_thisA, "gameboard.png");
     _blackBorder = MiscHelpers.GetStrokePaint(SKColors.Black, 4);
     _aquaBorder  = MiscHelpers.GetStrokePaint(SKColors.Aqua, 4);
     _limeBorder  = MiscHelpers.GetStrokePaint(SKColors.LimeGreen, 4);
 }
Esempio n. 4
0
        protected override void SetUpPaints()
        {
            Assembly thisA = Assembly.GetAssembly(GetType());

            _fillPaint   = MiscHelpers.GetSolidPaint(SKColors.LightGray);
            _borderPaint = MiscHelpers.GetStrokePaint(SKColors.White, 3);         // try 3
            _publicBit   = ImageExtensions.GetSkBitmap(thisA, "publictrain.png");
            _playerBit   = ImageExtensions.GetSkBitmap(thisA, "playertrain.png"); // for testing, will be this one.
            _bitPaint    = MiscHelpers.GetBitmapPaint();
            _redPaint    = MiscHelpers.GetSolidPaint(SKColors.Red);
        }
        public LilyPadCP(int x, int y, bool pHasFrog)
        {
            Column  = x;
            Row     = y;
            HasFrog = pHasFrog;
            Assembly temps = Assembly.GetAssembly(GetType());

            _img_LilyPad = ImageExtensions.GetSkBitmap(temps, "leaf.png");
            _img_Frog    = ImageExtensions.GetSkBitmap(temps, "frog.png");
            _bitPaint    = MiscHelpers.GetBitmapPaint();
        }
        private void CreatePaints(int width)
        {
            Assembly thisA = Assembly.GetAssembly(GetType());

            _bitPaint        = MiscHelpers.GetBitmapPaint();
            _arrowImage      = ImageExtensions.GetSkBitmap(thisA, "arrows.png");
            _highSpeed1      = ImageExtensions.GetSkBitmap(thisA, "highspeed1.png");
            _highSpeed2      = ImageExtensions.GetSkBitmap(thisA, "highspeed2.png");
            _boardBit        = ImageExtensions.GetSkBitmap(thisA, "spinner.png");
            _actualBoardSize = width; // try this way
            var diffs = _actualBoardSize / _intendedBoardSize;

            _actualArrowHeight = _intendedArrowHeight * diffs;
            _actualArrowWidth  = _intendedArrowWidth * diffs;
            _didPaint          = true;
        }
        //private readonly BattleshipMainGameClass _mainGame;
        private void PrivateInit() //this is it i think.
        {
            CustomBasicList <string> TempList = new CustomBasicList <string>
            {
                "A",
                "B",
                "C",
                "D",
                "E",
                "F",
                "G",
                "H",
                "I",
                "J"
            };

            RowList = new Dictionary <int, string>();
            var loopTo = TempList.Count;
            int x;

            for (x = 1; x <= loopTo; x++)
            {
                RowList.Add(RowList.Count + 1, TempList[x - 1]);// because 0 based
            }
            ColumnList = new Dictionary <int, string>();
            for (x = 1; x <= 10; x++)
            {
                ColumnList.Add(ColumnList.Count + 1, x.ToString());
            }
            int y = 0;

            HumanList    = new BattleshipCollection();
            ComputerList = new BattleshipCollection();
            x            = 0; //i think.
            foreach (var thisRow in RowList.Values)
            {
                x += 1;
                foreach (var thisColumn in ColumnList.Values)
                {
                    y += 1;
                    HumanList[x, int.Parse(thisColumn)].Letter    = thisRow.ToLower();
                    ComputerList[x, int.Parse(thisColumn)].Letter = thisRow.ToLower();
                }
            }
            _penPaint = MiscHelpers.GetStrokePaint(SKColors.Black, 2); // try 2 instead of 1
            _bitPaint = MiscHelpers.GetBitmapPaint();
        }
        public PieceCP()
        {
            Assembly thisA = Assembly.GetAssembly(GetType());

            _blueBishop = ImageExtensions.GetSkBitmap(thisA, "BLUEBISHOP.gif");
            _blueKing   = ImageExtensions.GetSkBitmap(thisA, "BLUEKING.gif");
            _blueKnight = ImageExtensions.GetSkBitmap(thisA, "BLUEKNIGHT.gif");
            _bluePawn   = ImageExtensions.GetSkBitmap(thisA, "BLUEPAWN.gif");
            _blueQueen  = ImageExtensions.GetSkBitmap(thisA, "BLUEQUEEN.gif");
            _blueRook   = ImageExtensions.GetSkBitmap(thisA, "BLUEROOK.gif");
            _redBishop  = ImageExtensions.GetSkBitmap(thisA, "REDBISHOP.gif");
            _redKing    = ImageExtensions.GetSkBitmap(thisA, "REDKING.gif");
            _redKnight  = ImageExtensions.GetSkBitmap(thisA, "REDKNIGHT.gif");
            _redPawn    = ImageExtensions.GetSkBitmap(thisA, "REDPAWN.gif");
            _redQueen   = ImageExtensions.GetSkBitmap(thisA, "REDQUEEN.gif");
            _redRook    = ImageExtensions.GetSkBitmap(thisA, "REDROOK.gif");
            _bitPaint   = MiscHelpers.GetBitmapPaint();
        }
Esempio n. 9
0
        } // this simple.

        public GameBoardGraphicsCP()
        {
            _bitPaint     = MiscHelpers.GetBitmapPaint();
            _borderPaint  = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
            _thisAssembly = Assembly.GetAssembly(GetType());
        }