本文整理汇总了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);
}
示例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;
}
}
示例3: SetScreenState
public void SetScreenState(ScreenState state)
{
if (state == ScreenState.WarningNext && _longWarningNext == null)
return;
if (state == ScreenState.WarningPrevious && _longWarningPrevious == null)
return;
_screenState = state;
}
示例4: GameScreen
public GameScreen()
{
screenState = ScreenState.TransitionOn;
transitionOnTime = TimeSpan.Zero;
transitionOffTime = TimeSpan.Zero;
transitionProgress = 0;
alwaysVisible = false;
isPopup = false;
isExiting = false;
}
示例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;
}
示例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;
}
示例7: Screen
protected Screen()
{
_state = ScreenState.FadingIn;
_isExiting = false;
_isCovered = false;
_hasInputFocus = false;
_transition = 1;
_transitionOnTime = TimeSpan.Zero;
_transitionOffTime = TimeSpan.Zero;
}
示例8: updateScreenState
private void updateScreenState()
{
if (State == ScreenState.Exiting && TransitionAlpha <= 0)
{
RemoveScreen();
}
else if (State == ScreenState.Entering && TransitionAlpha >= 1.0f)
{
State = ScreenState.Active;
}
}
示例9: OpenNewScreen
public void OpenNewScreen(ScreenState newState, bool clear = true)
{
previousState = screenState;
screenState = newState;
if (clear)
{
screenList[(int)previousState].Clear();
screenList[(int)screenState].Initialize();
}
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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);
}
}
示例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;
}