当前位置: 首页>>代码示例>>C#>>正文


C# ScreenState类代码示例

本文整理汇总了C#中ScreenState的典型用法代码示例。如果您正苦于以下问题:C# ScreenState类的具体用法?C# ScreenState怎么用?C# ScreenState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ScreenState类属于命名空间,在下文中一共展示了ScreenState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OpenTitleScreen

 protected void OpenTitleScreen()
 {
     CurrentScreen = ScreenState.Title;
     SearchButton.MoveToStart();
     StartButton.MoveToStart();
     Title.MoveTo(CenterPos);
 }
开发者ID:LeagueOfDevelopers,项目名称:Imaginarium,代码行数:7,代码来源:MenuHandler.cs

示例2: Update

        /* Layer Update - control transition percentage
         * call via base.Update 
         */
        public virtual void Update(float ms)
        {
            switch (state)
            {
                // TransitioningOn : update transition progress, if complete, switch to active
                case ScreenState.TransitioningOn:
                    if (UpdateTransition(ms, transitionOnTime, 1))
                    {
                        state = ScreenState.TransitioningOn;                        
                    }
                    else
                    {                        
                        state = ScreenState.Active;
                        if (fadeInCompleteCallback != null) fadeInCompleteCallback();
                    }
                    break;

                case ScreenState.Active:
                    break;

                case ScreenState.TransitioningOff:
                    if (UpdateTransition(ms, transitionOffTime, -1))
                    {
                        state = ScreenState.TransitioningOff;
                    }
                    else
                    {
                        state = ScreenState.Hidden;
                        if (fadeOutCompleteCallback != null) fadeOutCompleteCallback();
                        //mustExit = true;
                        //Globals.screenManager.Pop();
                    }
                    break;
            }
        }
开发者ID:justshiv,项目名称:LightSavers,代码行数:38,代码来源:ScreenLayer.cs

示例3: SetScreenState

        public void SetScreenState(ScreenState state)
        {
            if (state == ScreenState.WarningNext && _longWarningNext == null)
                return;
            if (state == ScreenState.WarningPrevious && _longWarningPrevious == null)
                return;
            _screenState = state;

        }
开发者ID:Royih,项目名称:BrewMatic.HW,代码行数:9,代码来源:Screen.cs

示例4: GameScreen

 public GameScreen()
 {
     screenState = ScreenState.TransitionOn;
     transitionOnTime = TimeSpan.Zero;
     transitionOffTime = TimeSpan.Zero;
     transitionProgress = 0;
     alwaysVisible = false;
     isPopup = false;
     isExiting = false;
 }
开发者ID:deltasquad451,项目名称:xna-volumetric-renderer,代码行数:10,代码来源:GameScreen.cs

示例5: LoadingScreen

        /// <summary>
        /// Initialize a new instance of the ExerciseScreen class.
        /// </summary>
        /// <param name="game">The related game object.</param>
        /// <param name="viewableArea">The desired canvas size to draw on.</param>
        /// <param name="startingState">The desired starting Screen State</param>
        public LoadingScreen(Game game, Rectangle viewableArea, ScreenState startingState)
            : base(game)
        {
            ScreenState = startingState;
            _viewableArea = viewableArea;

            Title = "Loading";

            _isInitialized = false;
        }
开发者ID:slowbump,项目名称:KinectTherapyTest,代码行数:16,代码来源:LoadingScreen.cs

示例6: ScreenManager

 public ScreenManager()
 {
     mScreens = new List<Screen>();
     GameScreen gameScreen = new GameScreen();
     MenuScreen menuScreen = new MenuScreen();
     mCurrentScreen = gameScreen;
     AddScreen(menuScreen);
     AddScreen(gameScreen);
     mScreenState = ScreenState.Playing;
 }
开发者ID:vdikun,项目名称:GGJ2013,代码行数:10,代码来源:ScreenManager.cs

示例7: Screen

 protected Screen()
 {
     _state = ScreenState.FadingIn;
     _isExiting = false;
     _isCovered = false;
     _hasInputFocus = false;
     _transition = 1;
     _transitionOnTime = TimeSpan.Zero;
     _transitionOffTime = TimeSpan.Zero;
 }
开发者ID:patriksvensson,项目名称:ld29,代码行数:10,代码来源:Screen.cs

示例8: updateScreenState

 private void updateScreenState()
 {
     if (State == ScreenState.Exiting && TransitionAlpha <= 0)
     {
         RemoveScreen();
     }
     else if (State == ScreenState.Entering && TransitionAlpha >= 1.0f)
     {
         State = ScreenState.Active;
     }
 }
开发者ID:nymo1,项目名称:XDarts,代码行数:11,代码来源:GameScreen.cs

示例9: OpenNewScreen

        public void OpenNewScreen(ScreenState newState, bool clear = true)
        {
            previousState = screenState;
            screenState = newState;

            if (clear)
            {
                screenList[(int)previousState].Clear();
                screenList[(int)screenState].Initialize();
            }
        }
开发者ID:TevenxD,项目名称:Portfolio,代码行数:11,代码来源:ScreenManager.cs

示例10: EnterCreditsCoroutine

 IEnumerator EnterCreditsCoroutine()
 {
     screenState = ScreenState.CREDITS;
     yield return StartCoroutine(SceneManager.instance.fade_black());
     yield return StartCoroutine(SoundManager.instance.FadeOutAudioSource(soundtrack(), rate: 0.1f));
     Application.LoadLevel(SceneManager.SCENE_CREDITS);
     yield return StartCoroutine(SceneManager.instance.fade_out());
     yield return null;
     GameManager.instance.Play();
     yield break;
 }
开发者ID:yjao,项目名称:CapstoneProject,代码行数:11,代码来源:MainMenu.cs

示例11: EnterGameCoroutine

    IEnumerator EnterGameCoroutine()
    {
        screenState = ScreenState.GAME;
        GameManager.instance.SetTime(GameManager.TimeType.SET, startTime);
        StartCoroutine(SoundManager.instance.FadeOutAudioSource(soundtrack(), rate: 0.1f));
        GameManager.instance.LoadPlayerData();
        yield return StartCoroutine(SceneManager.instance.LoadSceneCoroutine(startScene));
        GameManager.instance.MenuLayout.GetComponent<Menu_Layout>().GameMenus(true);

        Destroy(this.gameObject);
        yield break;
    }
开发者ID:yjao,项目名称:CapstoneProject,代码行数:12,代码来源:MainMenu.cs

示例12: ChangeScreen

        private void ChangeScreen(ScreenState screenState, CreateScreen createScreen)
        {
            previousScreen = currentScreen;

            if (!screens.ContainsKey(screenState))
            {
                screens.Add(screenState, createScreen());
                screens[screenState].LoadContent();
            }
            currentScreen = screens[screenState];
            currentScreen.Activate();
        }
开发者ID:chillerman91,项目名称:GameAiChrisDaniel,代码行数:12,代码来源:ScreenStateSwitchboard.cs

示例13: EnterAlfredCoroutine

    IEnumerator EnterAlfredCoroutine()
    {
        screenState = ScreenState.GAME;
        GameManager.instance.SetTime(GameManager.TimeType.SET, 20);
        GameManager.instance.playerData.daysPassed = 1;
        StartCoroutine(SoundManager.instance.FadeOutAudioSource(soundtrack(), rate: 0.1f));
        yield return StartCoroutine(SceneManager.instance.LoadSceneCoroutine("G_MainStreet"));
        GameManager.instance.MenuLayout.GetComponent<Menu_Layout>().GameMenus(true);

        Destroy(this.gameObject);
        yield break;
    }
开发者ID:yjao,项目名称:CapstoneProject,代码行数:12,代码来源:MainMenu.cs

示例14: LevelSelect

        SpriteFont text; // font for level select

        #endregion Fields

        #region Constructors

        public LevelSelect(Dictionary<string, Texture2D> imgs, SpriteFont txt, int cLV, int mLV)
        {
            images = imgs;
            text = txt;
            currentLevel = cLV;
            maxLevel= mLV;
            screenState = new ScreenState();
            screenState = ScreenState.Select;
            cleared = new Dictionary<int, bool>();
            for (int i = 0; i < maxLevel; i++)
            {
                cleared.Add((i + 1), false);
            }
        }
开发者ID:rbVessal,项目名称:SparkCrasher,代码行数:20,代码来源:LevelSelect.cs

示例15: Start

    void Start()
    {
        spRender = gameObject.GetComponent<SpriteRenderer>();
        screenMap = new Dictionary<MenuState, ScreenState>();

        screenMap.Add( MenuState.Main		 , new MenuScreen( skin, spRender, this ) );
        screenMap.Add( MenuState.PlayMode	 , new PlayModeScreen( skin, spRender, this ) );
        screenMap.Add( MenuState.Credits	 , new CreditScreen( skin, spRender, this ) );
        screenMap.Add( MenuState.Instructions, new InstructionScreen( skin, spRender, this ) );

        currentScreen = screenMap[ MenuState.Main ];

        spRender.sprite = currentScreen.Background;
    }
开发者ID:JamesZinger,项目名称:Axon-TOJam9,代码行数:14,代码来源:MainMenu.cs


注:本文中的ScreenState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。