public MusketSmoke(float xpos, float ypos)
            : base(xpos, ypos)
        {
            this.xscale    = 0.15f + Rando.Float(0.15f);
            this.yscale    = this.xscale;
            this.angle     = Maths.DegToRad(Rando.Float(360f));
            this._fastGrow = 0.6f + Rando.Float(0.3f);
            this._angleInc = Maths.DegToRad(Rando.Float(2f) - 1f);
            this._scaleInc = 1f / 1000f + Rando.Float(1f / 1000f);
            this._fade     = 0.0015f + Rando.Float(1f / 1000f);
            this.move.x    = Rando.Float(0.2f) - 0.1f;
            this.move.y    = Rando.Float(0.2f) - 0.1f;
            GraphicList graphicList = new GraphicList();
            Sprite      graphic1    = new Sprite("smoke");

            graphic1.depth = new Depth(1f);
            graphic1.CenterOrigin();
            graphicList.Add(graphic1);
            Sprite graphic2 = new Sprite("smokeBack");

            graphic2.depth = new Depth(-0.1f);
            graphic2.CenterOrigin();
            graphicList.Add(graphic2);
            this.graphic          = (Sprite)graphicList;
            this.center           = new Vec2(0.0f, 0.0f);
            this.depth            = new Depth(1f);
            this._backgroundSmoke = new Sprite("smokeBack");
        }
Example #2
0
        public EnemySpawn(float xpos = 0.0f, float ypos = 0.0f)
            : base(xpos, ypos)
        {
            GraphicList graphicList = new GraphicList();
            SpriteMap   spriteMap   = new SpriteMap("duck", 32, 32);

            spriteMap.depth    = new Depth(0.9f);
            spriteMap.position = new Vec2(-8f, -18f);
            graphicList.Add((Sprite)spriteMap);
            this._spawnSprite       = new SpriteMap("spawnSheet", 16, 16);
            this._spawnSprite.depth = new Depth(0.95f);
            graphicList.Add((Sprite)this._spawnSprite);
            this.graphic         = (Sprite)graphicList;
            this._editorName     = "enemy spawn";
            this.center          = new Vec2(8f, 8f);
            this.collisionSize   = new Vec2(16f, 16f);
            this.collisionOffset = new Vec2(-8f, -8f);
        }
Example #3
0
        //Initial Konstrukter - Is only called ones the game runs the first time
        public HaguruClock()
        {
            //Clock Position (Entity Position)
            X = 200;
            Y = 200;

            //Mainwheel Graphics
            mainWheel = new Image(Assets.HAGURUMAINCOCKWEEL);
            mainWheel.CenterOrigin();

            //Darf nicht relativ zur Uhr gerendered werden weil drehen der Uhr sonst mainwheel mitdreht!!!
            mainWheel.Relative = false;

            mainWheel.ScaleX = 0.25f;
            mainWheel.ScaleY = 0.25f;

            mainWheel.X = 0;
            mainWheel.Y = 0;

            //add it to the rendered Graphiclist
            graphics.Add(mainWheel);

            //SideWheel Graphics
            sideWheel = new Image(Assets.HAGURUSIDECOCKWEEL);
            sideWheel.CenterOrigin();

            //Muss relativ zur Uhr gerendered werden weil drehen der Uhr sonst sidewheels position nicht mitdreht!!!
            sideWheel.Relative = true;
            sideWheel.ScaleX   = 0.25f;
            sideWheel.ScaleY   = 0.25f;

            sideWheel.X = 0;
            //Relative Position zur Uhr
            sideWheel.Y = 0 - ((mainWheel.ScaledHeight / 2) + (sideWheel.ScaledHeight / 2) - 20);

            //add it to the rendered Graphiclist
            graphics.Add(sideWheel);

            //Set overall Graphic to the list so all graphics are rendered properly
            Graphic = graphics;
        }
        public TeamSpawn(float xpos = 0.0f, float ypos = 0.0f)
            : base(xpos, ypos)
        {
            GraphicList graphicList = new GraphicList();

            for (int index = 0; index < 3; ++index)
            {
                SpriteMap spriteMap = new SpriteMap("duck", 32, 32);
                spriteMap.CenterOrigin();
                spriteMap.depth    = (Depth)(float)(0.899999976158142 + 0.00999999977648258 * (double)index);
                spriteMap.position = new Vec2((float)((double)index * 9.41176414489746 - 16.0 + 16.0), -2f);
                graphicList.Add((Sprite)spriteMap);
            }
            this.graphic         = (Sprite)graphicList;
            this._editorName     = "team spawn";
            this.center          = new Vec2(8f, 5f);
            this.collisionSize   = new Vec2(32f, 16f);
            this.collisionOffset = new Vec2(-16f, -8f);
            this._visibleInGame  = false;
        }
Example #5
0
 //dodaje grafike do używanej instancji okna
 public void AddGraphicsToWindow(int x, int y, Image img)
 {
     img.SetPosition(mainbg.X + x, mainbg.Y + y);
     windowGraphics.Add(img);
 }