コード例 #1
0
        ///////prototipo
        public override void fadeFinished(Fade fadeObject)
        {
            if (fadeObject.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE)
            {
                //restartTimer(1);
            }
            else
            if (fadeObject.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
            {
                /*
                 * mBackgroundCounter++;
                 * if (mBackgroundCounter < cMAX_BG_COUNTER)
                 * {
                 *  mCurrentBackground = mList.ElementAt(mBackgroundCounter);
                 *  restartTimer(1);
                 * }
                 * else
                 * {
                 *  restartTimer(1);
                 * }
                 */
            }

            //GC.KeepAlive(aTimer);
        }
コード例 #2
0
 ///////prototipo
 public override void fadeFinished(Fade fadeObject)
 {
     if (fadeObject.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE)
     {
     }
     else
     if (fadeObject.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
     {
         Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_MAIN_MENU, true);
     }
 }
コード例 #3
0
 public override void fadeFinished(Fade fadeObject)
 {
     if (fadeObject.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE)
     {
         restartTimer();
     }
     else
     if (fadeObject.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
     {
         goToMainMenu();
     }
 }
コード例 #4
0
        //qualquer coisa mete static aqui que funciona
        private void OnTimedEvent(object source, ElapsedEventArgs e)
        {
            mTimer.Stop();
            mTimer.Enabled = false;

            if (mCurrentFade.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE)
            {
                executeFade(mFadeIn, Fade.sFADE_OUT_EFFECT_GRADATIVE);
            }
            else

            if (mCurrentFade.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
            {
                executeFade(mFadeIn, Fade.sFADE_IN_EFFECT_GRADATIVE);
            }
        }
コード例 #5
0
 public override void fadeFinished(Fade fadeObject)
 {
     //if(fadeObject.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE){
     //}else
     if (fadeObject.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
     {
         //SoundManager.stopMusic();
         if (mFadeParam == FADE_PARAM.START_GAME)
         {
             //Game1.progressObject.setCurrentStage(1);
             //ExtraFunctions.saveProgress(Game1.progressObject);
             SoundManager.stopMusic();
             Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_HISTORY, false);
         }
         if (mFadeParam == FADE_PARAM.CONTINUE_GAME)
         {
             SoundManager.stopMusic();
             //ExtraFunctions.saveProgress(Game1.progressObject);
             Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_MACROMAP, false);
         }
         if (mFadeParam == FADE_PARAM.EXIT_GAME)
         {
             SoundManager.stopMusic();
             Game1.getInstance().Exit();
         }
     }
 }
コード例 #6
0
        public override void fadeFinished(Fade fadeObject)
        {
            if (fadeObject.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
            {
                //SoundManager.stopMusic();
                //Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_HISTORY, true);
                //Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_MAIN_MENU, false);

                //owner.cSCREEN = MainMenuScreen.SCREENS.MAINMENU_SCREEN;
            }
        }
コード例 #7
0
 public override void fadeFinished(Fade fadeObject)
 {
     //if(fadeObject.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE){
     //}else
     if (fadeObject.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
     {
         //SoundManager.stopMusic();
         //Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_HISTORY, true);
         //Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_MAIN_MENU, false);
         Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_MACROMAP, false);
     }
 }
コード例 #8
0
        public override void update(GameTime gameTime)
        {
            mCurrentBackground.update();

            mFadeIn.update(gameTime);

            timer -= gameTime.ElapsedGameTime.TotalMilliseconds;
            if (timer <= 0)
            {
                if (mCurrentFade.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE)
                {
                    executeFade(mFadeIn, Fade.sFADE_OUT_EFFECT_GRADATIVE);
                }
                else

                if (mCurrentFade.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
                {
                    executeFade(mFadeIn, Fade.sFADE_IN_EFFECT_GRADATIVE);
                }
                timer = double.MaxValue;
            }
        }
コード例 #9
0
        ///////prototipo
        public override void fadeFinished(Fade fadeObject)
        {
            if (fadeObject.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE)
            {
                restartTimer(2);
            }
            else
            if (fadeObject.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
            {
                mBackgroundCounter++;
                if (mBackgroundCounter < cMAX_BG_COUNTER)
                {
                    mCurrentBackground = mList.ElementAt(mBackgroundCounter);
                    restartTimer(2);
                }
                else
                {
                    Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_SPLASHSCREEN, true);
                }
            }

            //GC.KeepAlive(aTimer);
        }
コード例 #10
0
        public override void fadeFinished(Fade fadeObject)
        {
            if (fadeObject.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE)
            {
                mAuthorizeUpdate = true;
                restartTimer();

                mFade = null;
            }
            else
            if (fadeObject.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
            {
                //goToGameScreen();
                SoundManager.StopMusic();
                if (mCurrentMacroMapState != MacroMapState.Finish)
                {
                    Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_GAMEPLAY, true, true);
                }
                else
                {
                    Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_ENDING_SCREEN, true, true);
                }
            }
        }
コード例 #11
0
 public override void fadeFinished(Fade fadeObject)
 {
     //if(fadeObject.getEffect() == Fade.sFADE_IN_EFFECT_GRADATIVE){
     //}else
     if (fadeObject.getEffect() == Fade.sFADE_OUT_EFFECT_GRADATIVE)
     {
         if (owner != null)
         {
             owner.cSCREEN = MainMenuScreen.SCREENS.MAINMENU_SCREEN;
         }
         else if (owner2 != null)
         {
             owner2.bHelpScreen = false;
         }
     }
 }