Example #1
0
 protected virtual CycBackground AddBackground(string bgName, float bgSpeed)
 {
     CycBackground bg = new CycBackground(Game, bgName);
     bg.ScrollSpeed = bgSpeed;
     bg.View = View;
     backgrounds.Add(bg);
     return bg;
 }
Example #2
0
        public override void Initialize()
        {
            AddBackground("space background", ParallaxSpeeds[0]);
            whiteZodiac = AddBackground("zodiac", ParallaxSpeeds[1]);
            superZodiac = AddBackground("zodiacSuper", ParallaxSpeeds[2]);
            superZodiac.TargetAlpha = 0.0f;
            superZodiac.BlendDuration = 0.0f;
            AddBackground("galaxy", ParallaxSpeeds[3]);
            AddBackground("nebula", ParallaxSpeeds[4]);
            AddBackground("stars", ParallaxSpeeds[5]);

            ship = new Ship(Game, this);
            ship.CrushPool = CrushBeams;
            skim = new ShipCircle(Game, ship, "skimRing");
            AddSprite(skim);
            crushRecovery = 0;
            skim.ResizeTo(DefaultSkimRadius, 0);
            AddSprite(ship);
            skimParticles = new SkimPS(Game);
            Game.Components.Add(skimParticles);
            //            debugRadius = new ShipCircle(Game, ship, "crushRing");
            //            AddSprite(debugRadius);
            base.Initialize();
        }
Example #3
0
        public override void Initialize()
        {
            AddBackground("pixel city sky", ParallaxSpeeds[0]);
            lowSunset = AddBackground("pixel city sunset low saturation", ParallaxSpeeds[1]);
            midSunset = AddBackground("pixel city sunset med saturation", ParallaxSpeeds[2]);
            midSunset.TargetAlpha = 0.0f;
            midSunset.BlendDuration = 0.0f;
            highSunset = AddBackground("pixel city sunset high saturation", ParallaxSpeeds[3]);
            highSunset.TargetAlpha = 0.0f;
            highSunset.BlendDuration = 0.0f;
            AddBackground("pixel city skyline", ParallaxSpeeds[4]);
            AddBackground("pixel city middleground", ParallaxSpeeds[5]);
            AddBackground("pixel city foreground", ParallaxSpeeds[6]);
            AddBackground("pixel city road", ParallaxSpeeds[7]);

            jg = new JetpackGirl((Game1)Game, this);
            AddSprite(jg);

            base.Initialize();
        }