Ejemplo n.º 1
0
        public override void update()
        {
            if (_f == null)
            {
                _f = new List<FlxLogoPixel>();
                int scale = 10;
                float pwrscale;

                int pixelsize = (FlxG.height / scale);
                int top = (FlxG.height / 2) - (pixelsize * 2);
                int left = (FlxG.width / 2) - pixelsize;

                pwrscale = ((float)pixelsize / 24f);

                //Add logo pixels
                add(new FlxLogoPixel(left + pixelsize, top, pixelsize, 0, _fc));
                add(new FlxLogoPixel(left, top + pixelsize, pixelsize, 1, _fc));
                add(new FlxLogoPixel(left, top + (pixelsize * 2), pixelsize, 2, _fc));
                add(new FlxLogoPixel(left + pixelsize, top + (pixelsize * 2), pixelsize, 3, _fc));
                add(new FlxLogoPixel(left, top + (pixelsize * 3), pixelsize, 4, _fc));

                FlxSprite pwr = new FlxSprite((FlxG.width - (int)((float)_poweredBy.Width * pwrscale)) / 2, top + (pixelsize * 4) + 16, _poweredBy);
                pwr.loadGraphic(_poweredBy, false, false, (int)((float)_poweredBy.Width * pwrscale), (int)((float)_poweredBy.Height * pwrscale));

                pwr.color = _fc;
                pwr.scale = pwrscale;
                add(pwr);

                _fSound.Play(FlxG.volume, 0f, 0f);
            }

            _logoTimer += FlxG.elapsed;

            base.update();

            if (_logoTimer > 2.5f)
            {
                FlxG.state = _nextScreen;
            }
        }
Ejemplo n.º 2
0
        override public void create()
        {
            FlxG.resetHud();
            FlxG.hideHud();

            FlxG.backColor = Color.DarkTurquoise;

            base.create();



            FlxCaveGeneratorExt caveExt = new FlxCaveGeneratorExt(100, 60, 0.42f, 3);
            string[,] caveLevel = caveExt.generateCaveLevel();

            tileGrp = new FlxGroup();

            for (int i = 0; i < caveLevel.GetLength(1); i++)
            {
                for (int y = 0; y < caveLevel.GetLength(0); y++)
                {
                    //string toPrint = tiles[y, i];
                    if (Convert.ToInt32(caveLevel[y, i]) != 0)
                    {
                        FlxSprite x = new FlxSprite(i * 8, y * 8);
                        //x.createGraphic(8, 8, colors[Convert.ToInt32(caveLevel[y, i])]);
                        x.loadGraphic("flixel/autotilesIsland", false, false, 8, 8);
                        //x.color = colors[Convert.ToInt32(caveLevel[y, i])];

                        x.frame = Convert.ToInt32(caveLevel[y, i]);
                        //x.scale = 2;
                        x.angularDrag = 250;
                        //x.setOffset(4, 4);

                        x.@fixed = true;
                        tileGrp.add(x);
                    }
                    //Console.Write(toPrint);
                }

                //Console.WriteLine();
            }

            //string newMap = caveExt.convertMultiArrayStringToString(caveLevel);


            add(tileGrp);

            boats = new FlxGroup();

            for (int i = 0; i < 20; i++)
            {
                Boat b = new Boat((int)FlxU.random(0, FlxG.width), (int)FlxU.random(0, FlxG.height));
                b.velocity.X = FlxU.random(-40, 40);
                b.velocity.Y = FlxU.random(-40, 40);


                boats.add(b);
            }

            add(boats);
        }
Ejemplo n.º 3
0
        public override void create()
        {
            base.create();

            ImgTech=FlxG.Content.Load<Texture2D>("Mode/tech_tiles");
            ImgDirtTop=FlxG.Content.Load<Texture2D>("Mode/dirt_top");
            ImgDirt=FlxG.Content.Load<Texture2D>("Mode/dirt");
            ImgNotch=FlxG.Content.Load<Texture2D>("Mode/notch");
            ImgGibs=FlxG.Content.Load<Texture2D>("Mode/gibs");
            ImgSpawnerGibs = FlxG.Content.Load<Texture2D>("Mode/spawner_gibs");

            FlxG.mouse.hide();
            reload = false;

            //get the gibs set up and out of the way
            _littleGibs = new FlxEmitter();
            _littleGibs.delay = 3;
            _littleGibs.setXSpeed(-150,150);
            _littleGibs.setYSpeed(-200,0);
            _littleGibs.setRotation(-720,-720);
            _littleGibs.createSprites(ImgGibs,100,true,0.5f,0.65f);
            _bigGibs = new FlxEmitter();
            _bigGibs.setXSpeed(-200,200);
            _bigGibs.setYSpeed(-300,0);
            _bigGibs.setRotation(-720,-720);
            _bigGibs.createSprites(ImgSpawnerGibs,50,true,0.5f,0.35f);

            //level generation needs to know about the spawners (and thusly the bots, players, etc)
            _blocks = new FlxGroup();
            _decorations = new FlxGroup();
            _bullets = new FlxGroup();
            _player = new Player(316,300,_bullets.members,_littleGibs);
            _bots = new FlxGroup();
            _botBullets = new FlxGroup();
            _spawners = new FlxGroup();

            //simple procedural level generation
            int i;
            int r = 160;
            FlxTileblock b;

            b = new FlxTileblock(0,0,640,16);
            b.loadGraphic(ImgTech);
            _blocks.add(b);

            b = new FlxTileblock(0,16,16,640-16);
            b.loadGraphic(ImgTech);
            _blocks.add(b);

            b = new FlxTileblock(640-16,16,16,640-16);
            b.loadGraphic(ImgTech);
            _blocks.add(b);

            b = new FlxTileblock(16,640-24,640-32,8);
            b.loadGraphic(ImgDirtTop);
            _blocks.add(b);

            b = new FlxTileblock(16,640-16,640-32,16);
            b.loadGraphic(ImgDirt);
            _blocks.add(b);

            buildRoom(r * 0, r * 0, true);
            buildRoom(r*1,r*0);
            buildRoom(r*2,r*0);
            buildRoom(r * 3, r * 0, true);
            buildRoom(r * 0, r * 1, true);
            buildRoom(r*1,r*1);
            buildRoom(r*2,r*1);
            buildRoom(r * 3, r * 1, true);
            buildRoom(r*0,r*2);
            buildRoom(r*1,r*2);
            buildRoom(r*2,r*2);
            buildRoom(r*3,r*2);
            buildRoom(r*0,r*3,true);
            buildRoom(r*1,r*3);
            buildRoom(r*2,r*3);
            buildRoom(r*3,r*3,true);

            //Add bots and spawners after we add blocks to the state,
            // so that they're drawn on top of the level, and so that
            // the bots are drawn on top of both the blocks + the spawners.
            add(_spawners);
            add(_littleGibs);
            add(_bigGibs);
            add(_blocks);
            add(_decorations);
            add(_bots);

            //actually create the bullets now
            for(i = 0; i < 50; i++)
                _botBullets.add(new BotBullet());
            for(i = 0; i < 8; i++)
                _bullets.add(new Bullet());

            //add player and set up scrolling camera
            add(_player);
            FlxG.follow(_player,2.5f);
            FlxG.followAdjust(0.5f,0.0f);
            FlxG.followBounds(0,0,640,640);

            //add gibs + bullets to scene here, so they're drawn on top of pretty much everything
            add(_botBullets);
            add(_bullets);

            //finally we are going to sort things into a couple of helper groups.
            //we don't add these to the state, we just use them for collisions later!
            _enemies = new FlxGroup();
            _enemies.add(_botBullets);
            _enemies.add(_spawners);
            _enemies.add(_bots);
            _objects = new FlxGroup();
            _objects.add(_botBullets);
            _objects.add(_bullets);
            _objects.add(_bots);
            _objects.add(_player);
            _objects.add(_littleGibs);
            _objects.add(_bigGibs);

            //HUD - score
            Vector2 ssf = new Vector2(0,0);
            _score = new FlxText(0,0,FlxG.width);
            _score.color = new Color (0xd8, 0xeb, 0xa2);
            _score.scale = 2;
            _score.alignment = FlxJustification.Center;
            _score.scrollFactor = ssf;
            _score.shadow = new Color(0x13, 0x1c, 0x1b);
            add(_score);
            if (FlxG.scores.Count < 2)
            {
                FlxG.scores.Add(0);
                FlxG.scores.Add(0);
            }

            //HUD - highest and last scores
            _score2 = new FlxText(FlxG.width/2,0,FlxG.width/2);
            _score2.color = new Color(0xd8, 0xeb, 0xa2);
            _score2.alignment = FlxJustification.Right;
            _score2.scrollFactor = ssf;
            _score2.shadow = _score.shadow;
            add(_score2);
            if (FlxG.score > FlxG.scores[0])
                FlxG.scores[0] = FlxG.score;
            if (FlxG.scores[0] != 0)
                _score2.text = "HIGHEST: " + FlxG.scores[0] + "\nLAST: " + FlxG.score;
            FlxG.score = 0;
            _scoreTimer = 0;

            //HUD - the "number of spawns left" icons
            _notches = new List<FlxSprite>();
            FlxSprite tmp;
            for(i = 0; i < 6; i++)
            {
                tmp = new FlxSprite(4+i*10,4);
                tmp.loadGraphic(ImgNotch,true);
                tmp.scrollFactor.X = tmp.scrollFactor.Y = 0;
                tmp.addAnimation("on", new int[] {0});
                tmp.addAnimation("off",new int[] {1});
                tmp.moves = false;
                tmp.solid = false;
                tmp.play("on");
                _notches.Add((FlxSprite)this.add(tmp));
            }

            //HUD - the "gun jammed" notification
            _jamBar = this.add((new FlxSprite(0,FlxG.height-22)).createGraphic(FlxG.width,24, new Color(0x13, 0x1c, 0x1b))) as FlxSprite;
            _jamBar.scrollFactor.X = _jamBar.scrollFactor.Y = 0;
            _jamBar.visible = false;
            _jamText = new FlxText(0,FlxG.height-22,FlxG.width,"GUN IS JAMMED");
            _jamText.color = new Color(0xd8, 0xeb, 0xa2);
            _jamText.scale = 2;
            _jamText.alignment = FlxJustification.Center;
            _jamText.scrollFactor = ssf;
            _jamText.visible = false;
            add(_jamText);

            FlxG.playMusic(SndMode);
            FlxG.flash.start(new Color(0x13, 0x1c, 0x1b), 0.5f, null, false);
            _fading = false;
        }
Ejemplo n.º 4
0
        public FlxEmitter createSprites(Texture2D Graphics, int Quantity, bool Multiple, float Collide, float Bounce)
        {
            members = new List <FlxObject>();
            int       r;
            FlxSprite s;
            int       tf = 1;
            float     sw;
            float     sh;

            if (Multiple)
            {
                s = new FlxSprite();
                s.loadGraphic(Graphics, true);
                tf = s.frames;
            }
            int i = 0;

            while (i < Quantity)
            {
                if ((Collide > 0) && (Bounce > 0))
                {
                    s = new FlxParticle(Bounce) as FlxSprite;
                }
                else
                {
                    s = new FlxSprite();
                }
                if (Multiple)
                {
                    r = (int)(FlxU.random() * tf);
                    //if(BakedRotations > 0)
                    //    s.loadRotatedGraphic(Graphics,BakedRotations,r);
                    //else
                    //{
                    s.loadGraphic(Graphics, true);
                    s.frame = r;
                    //}
                }
                else
                {
                    //if(BakedRotations > 0)
                    //    s.loadRotatedGraphic(Graphics,BakedRotations);
                    //else
                    s.loadGraphic(Graphics);
                }
                if (Collide > 0)
                {
                    sw         = s.width;
                    sh         = s.height;
                    s.width    = (int)(s.width * Collide);
                    s.height   = (int)(s.height * Collide);
                    s.offset.X = (int)(sw - s.width) / 2;
                    s.offset.Y = (int)(sh - s.height) / 2;
                    s.solid    = true;
                }
                else
                {
                    s.solid = false;
                }
                s.exists       = false;
                s.scrollFactor = scrollFactor;
                add(s);
                i++;
            }
            return(this);
        }
Ejemplo n.º 5
0
 public void loadCustomFilledGraphic(string BarGraphic)
 {
     filledBar.loadGraphic(BarGraphic);
 }
Ejemplo n.º 6
0
 public void loadCustomEmptyGraphic(string BarGraphic)
 {
     emptyBar.loadGraphic(BarGraphic);
 }
Ejemplo n.º 7
0
        /// <summary>
        /// FlxHud
        /// </summary>
        /// <param name="targetLeft"></param>
        /// <param name="targetWidth"></param>
        public FlxHud(int targetLeft, int targetWidth)
        {
            _consoleRect  = new Rectangle(0, 0, FlxG.spriteBatch.GraphicsDevice.Viewport.Width, FlxG.spriteBatch.GraphicsDevice.Viewport.Height);
            _consoleColor = new Color(0, 0, 0, 0x00);

            visible = false;

            hudGroup = new FlxGroup();
            hudGroup.scrollFactor.X = 0;
            hudGroup.scrollFactor.Y = 0;

            string keys    = "flixel/buttons/MapWhite";
            string xbox360 = "flixel/buttons/Map360";
            string ouya    = "flixel/buttons/MapOuya";

            if (FlxG.buildDescription == "GAMEBOY")
            {
                keys    = "flixel/buttons/MapWhiteGameboy";
                xbox360 = "flixel/buttons/Map360Gameboy";
                ouya    = "flixel/buttons/MapOuyaGameboy";
            }

            p1OriginalPosition = new Vector2(targetLeft, 0);
            p2OriginalPosition = new Vector2(targetLeft, 0);
            p3OriginalPosition = new Vector2(targetLeft, FlxG.spriteBatch.GraphicsDevice.Viewport.Height - 20);
            p4OriginalPosition = new Vector2(targetLeft, FlxG.spriteBatch.GraphicsDevice.Viewport.Height - 20);


            //FlxG.Content.Load<SpriteFont>("flixel/initials/SpaceMarine")

            if (FlxG.hudFont == null)
            {
                p1HudText = new FlxText(targetLeft, 0, targetWidth, "").setFormat(null, 1, Color.White, FlxJustification.Left, Color.White);
                p2HudText = new FlxText(targetLeft, 0, targetWidth, "").setFormat(null, 1, Color.White, FlxJustification.Right, Color.White);
                p3HudText = new FlxText(targetLeft, FlxG.spriteBatch.GraphicsDevice.Viewport.Height - 20, targetWidth, "").setFormat(null, 1, Color.White, FlxJustification.Left, Color.White);
                p4HudText = new FlxText(targetLeft, FlxG.spriteBatch.GraphicsDevice.Viewport.Height - 20, targetWidth, "").setFormat(null, 1, Color.White, FlxJustification.Right, Color.White);
            }
            else
            {
                p1HudText = new FlxText(targetLeft, 0, targetWidth, "").setFormat(FlxG.Content.Load <SpriteFont>(FlxG.hudFont), 1, Color.White, FlxJustification.Left, Color.Black);
                p2HudText = new FlxText(targetLeft, 0, targetWidth, "").setFormat(FlxG.Content.Load <SpriteFont>(FlxG.hudFont), 1, Color.White, FlxJustification.Right, Color.Black);
                p3HudText = new FlxText(targetLeft, FlxG.spriteBatch.GraphicsDevice.Viewport.Height - 20, targetWidth, "").setFormat(FlxG.Content.Load <SpriteFont>(FlxG.hudFont), 1, Color.White, FlxJustification.Left, Color.Black);
                p4HudText = new FlxText(targetLeft, FlxG.spriteBatch.GraphicsDevice.Viewport.Height - 20, targetWidth, "").setFormat(FlxG.Content.Load <SpriteFont>(FlxG.hudFont), 1, Color.White, FlxJustification.Right, Color.Black);
            }


            keyboardButton = new FlxSprite(targetLeft, -1000);
            keyboardButton.loadGraphic(FlxG.Content.Load <Texture2D>(keys), true, false, 100, 100);
            keyboardButton.addAnimation("frame", new int[] { FlxButton.ControlPadA });
            keyboardButton.play("frame");
            keyboardButton.solid               = false;
            keyboardButton.visible             = true;
            keyboardButton.scrollFactor.X      = 0;
            keyboardButton.scrollFactor.Y      = 0;
            keyboardButton.boundingBoxOverride = false;

            xboxButton = new FlxSprite(targetLeft, -1000);
            xboxButton.loadGraphic(FlxG.Content.Load <Texture2D>(xbox360), true, false, 100, 100);
            xboxButton.addAnimation("frame", new int[] { FlxButton.ControlPadA });
            xboxButton.play("frame");
            xboxButton.solid               = false;
            xboxButton.visible             = true;
            xboxButton.scrollFactor.X      = 0;
            xboxButton.scrollFactor.Y      = 0;
            xboxButton.boundingBoxOverride = false;


            ouyaButton = new FlxSprite(targetLeft, -1000);
            ouyaButton.loadGraphic(FlxG.Content.Load <Texture2D>(ouya), true, false, 100, 100);
            ouyaButton.addAnimation("frame", new int[] { FlxButton.ControlPadA });
            ouyaButton.play("frame");
            ouyaButton.solid               = false;
            ouyaButton.visible             = true;
            ouyaButton.scrollFactor.X      = 0;
            ouyaButton.scrollFactor.Y      = 0;
            ouyaButton.boundingBoxOverride = false;


            keyboardDirection = new FlxSprite(targetLeft, -1000);
            keyboardDirection.loadGraphic(FlxG.Content.Load <Texture2D>(keys), true, false, 100, 100);
            keyboardDirection.addAnimation("frame", new int[] { Keyboard_Arrow_Up });
            keyboardDirection.play("frame");
            keyboardDirection.solid               = false;
            keyboardDirection.visible             = true;
            keyboardDirection.scrollFactor.X      = 0;
            keyboardDirection.scrollFactor.Y      = 0;
            keyboardDirection.boundingBoxOverride = false;


            xboxDirection = new FlxSprite(targetLeft, -1000);
            xboxDirection.loadGraphic(FlxG.Content.Load <Texture2D>(xbox360), true, false, 100, 100);
            xboxDirection.addAnimation("frame", new int[] { FlxButton.ControlPadA });
            xboxDirection.play("frame");
            xboxDirection.solid               = false;
            xboxDirection.visible             = true;
            xboxDirection.scrollFactor.X      = 0;
            xboxDirection.scrollFactor.Y      = 0;
            xboxDirection.boundingBoxOverride = false;


            ouyaDirection = new FlxSprite(targetLeft, -1000);
            ouyaDirection.loadGraphic(FlxG.Content.Load <Texture2D>(ouya), true, false, 100, 100);
            ouyaDirection.addAnimation("frame", new int[] { FlxButton.ControlPadA });
            ouyaDirection.play("frame");
            ouyaDirection.solid               = false;
            ouyaDirection.visible             = true;
            ouyaDirection.scrollFactor.X      = 0;
            ouyaDirection.scrollFactor.Y      = 0;
            ouyaDirection.boundingBoxOverride = false;



            //add(_gamePadButton, true);

            timeToShowButton = float.MaxValue;
            _elapsedSinceLastButtonNeeded = 0.0f;
        }
Ejemplo n.º 8
0
        public override void update()
        {
            //if (FlxG.elapsedFrames == 5)
            //    FlxG.transition.startFadeIn(0.08f);

            if (FlxG.keys.justPressed(Keys.B))
            {
                cheatStorage += "B";
            }
            if (FlxG.keys.justPressed(Keys.U))
            {
                cheatStorage += "U";
            }
            if (FlxG.keys.justPressed(Keys.G))
            {
                cheatStorage += "G";
            }
            if (FlxG.keys.justPressed(Keys.S))
            {
                cheatStorage += "S";
            }

            if (cheatStorage == FlxGlobal.titleScreenDebugMode)
            {
                debugMode.visible = true;
                FlxG.debug        = true;
            }

            _logoTweener.Update(FlxG.elapsedAsGameTime);
            //_logo.y = _logoTweener.Position;

            if (_logoTimer > 1.15f)
            {
                //FlxG.bloom.Visible = true;
                //FlxG.bloom.bloomIntensity += 1.5f;
                //FlxG.bloom.baseIntensity += 1.0f;
                //FlxG.bloom.blurAmount += 1.1f;
            }
            if (_f == null && _logoTimer > 2.5f)
            {
                foreach (FlxLogoSprite item in logoParts.members)
                {
                    item.play("bugs2", true);
                    //item.velocity.Y = FlxU.randomInt(-200, 200);
                    //item.angularVelocity = FlxU.randomInt(120, 240);

                    float offset = FlxG.height;
                    if (item._row < 1)
                    {
                        offset *= -1.0f;
                    }

                    item.t = new Tweener(item.y, item.y + offset, 0.25f + (item._col / 18.0f), Quadratic.EaseInOut);

                    item.t.Reverse();
                    item.t.Start();
                }
                //_logo.visible = false;

                _logoTweener.Reverse();
                _logoTweener.Start();

                //FlxG.flash.start(FlxG.backColor, 1.0f, null, false);

                _f = new List <FlxLogoPixel>();
                int   scale = 10;
                float pwrscale;

                int pixelsize = (FlxG.height / scale);
                int top       = (FlxG.height / 2) - (pixelsize * 2);
                int left      = (FlxG.width / 2) - pixelsize;

                pwrscale = ((float)pixelsize / 24f);

                //Add logo pixels
                add(new FlxLogoPixel(left + pixelsize, top, pixelsize, 0, _fc));
                add(new FlxLogoPixel(left, top + pixelsize, pixelsize, 1, _fc));
                add(new FlxLogoPixel(left, top + (pixelsize * 2), pixelsize, 2, _fc));
                add(new FlxLogoPixel(left + pixelsize, top + (pixelsize * 2), pixelsize, 3, _fc));
                add(new FlxLogoPixel(left, top + (pixelsize * 3), pixelsize, 4, _fc));

                FlxSprite pwr = new FlxSprite((FlxG.width - (int)((float)_poweredBy.Width * pwrscale)) / 2, top + (pixelsize * 4) + 16, _poweredBy);
                pwr.loadGraphic(_poweredBy, false, false, 64);

                //pwr.color = _fc;
                //pwr.scale = pwrscale;
                add(pwr);

                _fSound.Play(FlxG.volume, 0f, 0f);
            }

            _logoTimer += FlxG.elapsed;

            base.update();
            if (FlxG.keys.ONE)
            {
                FlxG.level = 1;
            }
            if (FlxG.keys.TWO)
            {
                FlxG.level = 2;
            }
            if (FlxG.keys.THREE)
            {
                FlxG.level = 3;
            }

            if (FlxG.keys.FOUR)
            {
                FlxG.level = 4;
            }
            if (FlxG.keys.FIVE)
            {
                FlxG.level = 5;
            }
            if (FlxG.keys.SIX)
            {
                FlxG.level = 6;
            }

            if (FlxG.keys.SEVEN)
            {
                FlxG.level = 7;
            }
            if (FlxG.keys.EIGHT)
            {
                FlxG.level = 8;
            }
            if (FlxG.keys.NINE)
            {
                FlxG.level = 9;
            }

            if (_logoTimer > 5.5f || FlxG.keys.SPACE || FlxG.keys.ENTER || FlxG.gamepads.isButtonDown(Buttons.A))
            {
                FlxG.destroySounds(true);

                //FlxG.bloom.Visible = false;

                FlxG.state = _nextScreen;
            }
            if (FlxG.keys.F1 || (FlxG.gamepads.isButtonDown(Buttons.RightStick) && FlxG.gamepads.isButtonDown(Buttons.LeftStick)))
            {
                //FlxG.bloom.Visible = false;
                FlxG.destroySounds(true);
                                #if !__ANDROID__
                FlxG.state = new org.flixel.examples.TestState();
                                #endif
            }
            if (FlxG.keys.F8)
            {
                FlxG.state = new org.flixel.FlxSplash();
                return;
            }
        }
Ejemplo n.º 9
0
 public FlxEmitter createSprites(Texture2D Graphics, int Quantity, bool Multiple, float Collide, float Bounce)
 {
     members = new List<FlxObject>();
     int  r;
     FlxSprite s;
     int tf = 1;
     float sw;
     float sh;
     if(Multiple)
     {
         s = new FlxSprite();
         s.loadGraphic(Graphics,true);
         tf = s.frames;
     }
     int i = 0;
     while(i < Quantity)
     {
         if((Collide > 0) && (Bounce > 0))
             s = new FlxParticle(Bounce) as FlxSprite;
         else
             s = new FlxSprite();
         if(Multiple)
         {
             r = (int)(FlxU.random()*tf);
             //if(BakedRotations > 0)
             //    s.loadRotatedGraphic(Graphics,BakedRotations,r);
             //else
             //{
                 s.loadGraphic(Graphics,true);
                 s.frame = r;
             //}
         }
         else
         {
             //if(BakedRotations > 0)
             //    s.loadRotatedGraphic(Graphics,BakedRotations);
             //else
                 s.loadGraphic(Graphics);
         }
         if(Collide > 0)
         {
             sw = s.width;
             sh = s.height;
             s.width = (int)(s.width * Collide);
             s.height = (int)(s.height * Collide);
             s.offset.X = (int)(sw-s.width)/2;
             s.offset.Y = (int)(sh-s.height)/2;
             s.solid = true;
         }
         else
             s.solid = false;
         s.exists = false;
         s.scrollFactor = scrollFactor;
         add(s);
         i++;
     }
     return this;
 }