本文整理汇总了C#中ScreenState类的典型用法代码示例。如果您正苦于以下问题:C# ScreenState类的具体用法?C# ScreenState怎么用?C# ScreenState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ScreenState类属于命名空间,在下文中一共展示了ScreenState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: ChangeScreen
private void ChangeScreen(ScreenState screenState)
{
switch (screenState)
{
case ScreenState.Title:
{
ChangeScreen(screenState, new CreateScreen(CreateTitleScreen));
break;
}
case ScreenState.Options:
{
ChangeScreen(screenState, new CreateScreen(CreateOptionScreen));
break;
}
case ScreenState.Gameplay:
{
ChangeScreen(screenState, new CreateScreen(CreateGameplayScreen));
break;
}
case ScreenState.GameOver:
{
ChangeScreen(screenState, new CreateScreen(CreateGameOverScreen));
break;
}
case ScreenState.GameWin:
{
ChangeScreen(screenState, new CreateScreen(CreateGameWinScreen));
break;
}
case ScreenState.PreviousScreen:
{
currentScreen = previousScreen;
currentScreen.Activate();
break;
}
case ScreenState.Exit:
{
game.Exit();
break;
}
}
}
开发者ID:chillerman91,项目名称:GameAiChrisDaniel,代码行数:49,代码来源:ScreenStateSwitchboard.cs
示例17: Bai04_Load
private void Bai04_Load(object sender, EventArgs e)
{
UserCT = new UserControl[4];
nUserCT = 4;
UserCT[0] = new Phan1.Bai4.BaiTap12();
UserCT[1] = new Phan1.Bai4.BaiTap34();
UserCT[2] = new Phan1.Bai4.LuyenTap();
UserCT[3] = new Phan1.Bai4.LyThuyet();
for (int i = 0; i < nUserCT; i++)
{
pnBai1.Controls.Add(UserCT[i]);
UserCT[i].Dock = DockStyle.Fill;
}
currentState = ScreenState.Temp;
UpdateScreen();
}
开发者ID:ahmedelsayed27,项目名称:xdpm-hk2-2010,代码行数:16,代码来源:Bai04.cs
示例18: ListenForScreenEvents
private void ListenForScreenEvents()
{
if(Keyboard.GetState().IsKeyDown(Keys.Escape) && mPreviousKeyboardState.IsKeyUp(Keys.Escape))
{
if(mScreenState == ScreenState.Playing)
{
mScreenState = ScreenState.Paused;
mCurrentScreen = mScreens.Where(s => s.GetType() == typeof(MenuScreen)).Select(s => s as MenuScreen).FirstOrDefault();
}
else if(mScreenState == ScreenState.Paused)
{
mScreenState = ScreenState.Playing;
mCurrentScreen = mScreens.Where(s => s.GetType() == typeof(GameScreen)).Select(s => s as GameScreen).FirstOrDefault();
}
}
mPreviousKeyboardState = Keyboard.GetState();
}
开发者ID:vdikun,项目名称:GGJ2013,代码行数:17,代码来源:ScreenManager.cs
示例19: Bai11_Load
private void Bai11_Load(object sender, EventArgs e)
{
nUsct = 4;
myUsercontrol = new UserControl[5];
myUsercontrol[0] = new Phan1.Bai_11.BaiTap1();
myUsercontrol[1] = new Phan1.Bai_11.BaiTap2();
myUsercontrol[2] = new Phan1.Bai_11.BaiTap3();
myUsercontrol[3] = new Phan1.Bai_11.BaiTap4();
for (int i = 0; i < nUsct; i++)
{
pnbai11.Controls.Add(myUsercontrol[i]);
myUsercontrol[i].Dock = DockStyle.Fill;
}
currentScreen = ScreenState.ChonBT;
UpdateScreen();
}
开发者ID:ahmedelsayed27,项目名称:xdpm-hk2-2010,代码行数:18,代码来源:Bai11.cs
示例20: Bai01_Load
private void Bai01_Load(object sender, EventArgs e)
{
UserCT = new UserControl[5];
nUserCT = 5;
UserCT[0] = new PHAN1.Bai1.BaiTap1();
UserCT[1] = new PHAN1.Bai1.BaiTap2();
UserCT[2] = new PHAN1.Bai1.BaiTap3();
UserCT[3] = new PHAN1.Bai1.BaiTap4();
UserCT[4] = new PHAN1.Bai1.BaiTap5();
for (int i = 0; i < nUserCT; i++)
{
pnBaiTap.Controls.Add(UserCT[i]);
UserCT[i].Dock = DockStyle.Fill;
}
currentState = ScreenState.Temp;
UpdateScreen();
}
开发者ID:ahmedelsayed27,项目名称:xdpm-hk2-2010,代码行数:18,代码来源:Bai01.cs
注:本文中的ScreenState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论