示例#1
0
        public drawingPanel(worldView w)
        {
            //Get the images into the overarching list.

            allBlueShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-coast-blue.png"));
            allBlueShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-thrust-blue.png"));
            allBlueShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\shot-blue.png"));
            //blue ships will be at locaation 0 of overarchingImages.
            overarchingImages.Add(allBlueShips);

            allRedShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-coast-red.png"));
            allRedShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-thrust-red.png"));
            allRedShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\shot-red.png"));
            //red ships will be at locaation 1 of overarchingImages.
            overarchingImages.Add(allRedShips);

            allWhiteShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-coast-white.png"));
            allWhiteShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-thrust-white.png"));
            allWhiteShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\shot-white.png"));
            //white ships will be at locaation 2 of overarchingImages.
            overarchingImages.Add(allWhiteShips);

            allVioletShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-coast-violet.png"));
            allVioletShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-thrust-violet.png"));
            allVioletShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\shot-violet.png"));
            //violet ships will be at locaation 3 of overarchingImages.
            overarchingImages.Add(allVioletShips);

            allBrownShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-coast-brown.png"));
            allBrownShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-thrust-brown.png"));
            allBrownShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\shot-brown.png"));
            //brown ships will be at locaation 4 of overarchingImages.
            overarchingImages.Add(allBrownShips);

            allGreyShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-coast-grey.png"));
            allGreyShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-thrust-grey.png"));
            allGreyShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\shot-grey.png"));
            //grey ships will be at locaation 5 of overarchingImages.
            overarchingImages.Add(allGreyShips);

            allYellowShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-coast-yellow.png"));
            allYellowShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-thrust-yellow.png"));
            allYellowShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\shot-yellow.png"));
            //yellow ships will be at locaation 6 of overarchingImages.
            overarchingImages.Add(allYellowShips);

            allGreenShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-coast-green.png"));
            allGreenShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\ship-thrust-green.png"));
            allGreenShips.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\shot-green.png"));
            //green ships will be at locaation 7 of overarchingImages.
            overarchingImages.Add(allGreenShips);

            allStarImages.Add(Image.FromFile("..\\..\\..\\Resources\\Images\\star.jpg"));
            //star will be at locaation 8 of overarchingImages.
            overarchingImages.Add(allStarImages);

            DoubleBuffered = true;
            world          = w;
        }
示例#2
0
        /// <summary>
        /// Constructor. Adds brushes to overarching list during construction.
        /// </summary>
        /// <param name="w"></param>
        public scoreBoardPanel(worldView w)
        {
            //These brushes are in the same list order as the ship images and can be accessed
            //  by the same mod!
            allBrushes = new List <Brush>();
            allBrushes.Add(new SolidBrush(Color.DarkBlue));
            allBrushes.Add(new SolidBrush(Color.Red));
            allBrushes.Add(new SolidBrush(Color.White));
            allBrushes.Add(new SolidBrush(Color.Violet));
            allBrushes.Add(new SolidBrush(Color.Brown));
            allBrushes.Add(new SolidBrush(Color.Gray));
            allBrushes.Add(new SolidBrush(Color.Yellow));
            allBrushes.Add(new SolidBrush(Color.Green));

            DoubleBuffered = true;
            world          = w;
        }