Exemplo n.º 1
0
        public Wall(int startPosX, int startPosY, String style)
        {
            this.posX = startPosX;
            this.posY = startPosY;

            //tutaj if sprawdzi jaki styl ma miec element i wstawi odpowiedni obrazek
            if (style.Contains("retro"))
            {
                this.graphics = GraphicManager.GetInstance().GetTexture(@"Map\WallR.png");
            }
            else if (style.Contains("classic"))
            {
                this.graphics = GraphicManager.GetInstance().GetTexture(@"Map\Wall.png");
            }

            picturebox           = new PictureBox();
            picturebox.Height    = 64;
            picturebox.Width     = 64;
            point                = new Point(this.posX, this.posY);
            picturebox.Image     = this.graphics;
            picturebox.Location  = point;
            picturebox.BackColor = Color.Transparent;
        }
Exemplo n.º 2
0
        public Hero(int startPosX, int startPosY, String style)
        {
            this.posX = startPosX;
            this.posY = startPosY;

            if (style.Contains("retro"))
            {
                this.graphics = GraphicManager.GetInstance().GetTexture(@"Map\heroDownR.png");
            }
            else if (style.Contains("classic"))
            {
                this.graphics = GraphicManager.GetInstance().GetTexture(@"Map\heroDown.png");
            }

            picturebox          = new PictureBox();
            picturebox.Height   = 64;
            picturebox.Width    = 64;
            point               = new Point(this.posX, this.posY);
            picturebox.Image    = this.graphics;
            picturebox.Location = point;
            numberSteps         = 0;
            Factory             = new FactoryMapPart();
        }