예제 #1
0
        public override void Update(GameTime dt)
        {
            if (!ChicksnVixensGame.Get.IsLocationUnlocked(worldLocations[curLocation]))
            {
                Vector4 col = locked.Colour.ToVector4();
                col.W         = JabMath.LinearMoveTowards(col.W, 1.0f, gttf(dt));
                locked.Colour = new Color(col.W, col.W, col.W, col.W);
            }
            else
            {
                Vector4 col = locked.Colour.ToVector4();
                col.W         = JabMath.LinearMoveTowards(col.W, 0.0f, gttf(dt));
                locked.Colour = new Color(col.W, col.W, col.W, col.W);
            }
            if (blank != null)
            {
                if (blank.StateFlag == Jabber.StateFlag.FADE_IN_COMPLETE)
                {
                    OnFadeOutComplete();
                }
            }
            if (IsTopScreen || ScreenManager.Get.TopScreen.CheckFlag(Flags.FADE_OUT))
            {
                /*
                 * if (Cam.TargetPos == Cam.Position)
                 * {
                 *  Cam.targetScale = 1.8f;
                 * }*/
                Cam.LevelSelect = false;
            }
            else if (!IsTopScreen)
            {
                Cam.LevelSelect = true;
                Cam.targetScale = 1.2f;
            }
            if (loadLocation)
            {
                LevelSelectScreen screen = new LevelSelectScreen(worldLocations[curLocation]);//  currentLocation.location);
                screen.Initialize(Content);
                ScreenManager.Get.AddScreen(screen);
                Cam.targetScale = 1.2f;
                Cam.LevelSelect = true;
                EventManager.Get.SendEvent(new ScreenFadeOutEvent(this));
                loadLocation = false;
                if (playLocationSetSFX)
                {
                    AudioManager.PlayOnce("Sounds/CountrySelect");
                }

                playLocationSetSFX = true;
            }
#if WINDOWS_PHONE
            AdSystem.TargetTop = false;
#endif
            base.Update(dt);
        }
예제 #2
0
        public override void Update(GameTime dt)
        {
            if(!ChicksnVixensGame.Get.IsLocationUnlocked(worldLocations[curLocation]))
            {
                Vector4 col = locked.Colour.ToVector4();
                col.W = JabMath.LinearMoveTowards(col.W, 1.0f, gttf(dt));
                locked.Colour = new Color(col.W, col.W, col.W, col.W);
            }
            else
            {
                Vector4 col = locked.Colour.ToVector4();
                col.W = JabMath.LinearMoveTowards(col.W, 0.0f, gttf(dt));
                locked.Colour = new Color(col.W, col.W, col.W, col.W);
            }
            if (blank != null)
            {
                if (blank.StateFlag == Jabber.StateFlag.FADE_IN_COMPLETE)
                {
                    OnFadeOutComplete();
                }
            }
            if (IsTopScreen || ScreenManager.Get.TopScreen.CheckFlag(Flags.FADE_OUT))
            {
                /*
                if (Cam.TargetPos == Cam.Position)
                {
                    Cam.targetScale = 1.8f;
                }*/
                Cam.LevelSelect = false;
            }
            else if (!IsTopScreen)
            {
                Cam.LevelSelect = true;
                Cam.targetScale = 1.2f;
            }
            if (loadLocation)
            {
                LevelSelectScreen screen = new LevelSelectScreen(worldLocations[curLocation]);//  currentLocation.location);
                screen.Initialize(Content);
                ScreenManager.Get.AddScreen(screen);
                Cam.targetScale = 1.2f;
                Cam.LevelSelect = true;
                EventManager.Get.SendEvent(new ScreenFadeOutEvent(this));
                loadLocation = false;
                if(playLocationSetSFX)
                    AudioManager.PlayOnce("Sounds/CountrySelect");

                playLocationSetSFX = true;
            }
            #if WINDOWS_PHONE
            AdSystem.TargetTop = false;
            #endif
            base.Update(dt);
        }