Exemplo n.º 1
0
        public ShopScreen(Screen s, bool sContinue)
        {
            loaded = false;

            #if XBOX
                Game1.gammgr.playerShip.visible = false;
            #endif

            for (int i = 0; i < (int)shopMenu.otherMenu + 1; i++)
            {
                menuSizes.Add(1);
                menuColors.Add(Color.White);
            }
            nextScreen = s;

            showContinue = sContinue;

            switch (Game1.gammgr.r.Next(11))
            {
                case 0:
                    holdTip = Strings.Tip1;
                    break;
                case 1:
                    holdTip = Strings.Tip2;
                    break;
                case 2:
                    holdTip = Strings.Tip3;
                    break;
                case 3:
                    holdTip = Strings.Tip4;
                    break;
                case 4:
                    holdTip = Strings.Tip5;
                    break;
                case 5:
                    holdTip = Strings.Tip6;
                    break;
                case 6:
                    holdTip = Strings.Tip7;
                    break;
                case 7:
                    holdTip = Strings.Tip8;
                    break;
                case 8:
                    holdTip = Strings.Tip9;
                    break;
                case 9:
                    holdTip = Strings.Tip10;
                    break;
                case 10:
                    holdTip = Strings.Tip11;
                    break;
            }

            tipString = holdTip;

            //Demo limits setup
            if (Game1.IS_DEMO)
            {
                playerBuffMaxSwitch = 6;//
                buffHealthMaxSwitch = 7;//
                buffSpeedMaxSwitch = 4;//
                shootSpeedMaxSwitch = 0.1f;//
                missileBankMaxSwitch = 70;//
                missileSplodeMaxSwitch = 0.45;//
                levelHealthMaxSwitch = 15;//
                pickUpRateMaxSwitch = 0.025;//

                maxString = " (demo limit)";//
            }
            else
            {
                playerBuffMaxSwitch = 15;
                buffHealthMaxSwitch = 15;
                buffSpeedMaxSwitch = 10;
                shootSpeedMaxSwitch = 0.2f;
                missileBankMaxSwitch = 200;
                missileSplodeMaxSwitch = 1;
                levelHealthMaxSwitch = 20;
                pickUpRateMaxSwitch = 0.04999;

                maxString = " (max)";
            }
        }
Exemplo n.º 2
0
        //public void updateScreenSize(Vector2 newScreenSize)
        //{
        //    screenSize = newScreenSize;
        //    screenSizeScale = ((screenSize / targetScreenSize).X + (screenSize / targetScreenSize).Y) / 2;
        //}
        public void Update(GameTime gameTime)
        {
            switch (screenState)
            {
                case ScreenState.normal:
                    currentScreen.Update(gameTime);
                    break;
                case ScreenState.fadeToLoad:
                    Game1.gammgr.isPlaying = false;
                    fullScreenFade += 0.03f;
                    if (fullScreenFade >= 1)
                    {
                        fullScreenFade = 1;
                        screenState = ScreenState.loadScreen;
                        currentScreen = null;
                        currentScreen = holdScreen;
                        holdScreen = null;
                        GC.Collect();
                        break;
                    }
                    currentScreen.Update(gameTime);
                    loadScreen.Update(gameTime);
                    break;
                case ScreenState.loadScreen:
                    if (loadScreenTimer > 500)
                    {
                        loadScreenTimer = 0;
                        loadScreen.Update(gameTime);
                        GC.Collect();
                    }
                    if (currentScreen.IsLoaded())
                    {
                        currentScreen.Update(gameTime);
                        screenState = ScreenState.fadeFromLoad;
                    }
                    break;
                case ScreenState.fadeFromLoad:
                    fullScreenFade -= 0.03f;
                    if (fullScreenFade <= 0)
                    {
                        fullScreenFade = 0;
                        screenState = ScreenState.normal;
                    }
                    currentScreen.Update(gameTime);
                    loadScreen.Update(gameTime);
                    break;
            }

            fadeColor = new Color(1, 1, 1, fullScreenFade);
        }
Exemplo n.º 3
0
 public ScreenManager(ScreenMode sm, bool fs)
 {
     holdScreen = null;
     //changeResolution(ScreenMode.WXGA, false);
     changeResolution(sm, fs);
 }
Exemplo n.º 4
0
 public void changeScreen(Screens.Screen inScreen)
 {
     holdScreen = inScreen;
     screenState = ScreenState.fadeToLoad;
 }
Exemplo n.º 5
0
 public ScreenManager()
 {
     holdScreen = null;
     //changeResolution(ScreenMode.WXGA, false);
     changeResolution(ScreenMode.XGA, false);
 }