本文整理汇总了C#中BaseGame.WaitTime方法的典型用法代码示例。如果您正苦于以下问题:C# BaseGame.WaitTime方法的具体用法?C# BaseGame.WaitTime怎么用?C# BaseGame.WaitTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseGame
的用法示例。
在下文中一共展示了BaseGame.WaitTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public void Execute(BaseGame game, long tick)
{
if (m_time <= tick && game.GetWaitTimer() < tick)
{
PVEGame pve = game as PVEGame;
if (pve != null)
{
switch (pve.GameState)
{
case eGameState.Inited:
pve.Prepare();
break;
case eGameState.Prepared:
pve.PrepareNewSession();
break;
case eGameState.SessionPrepared:
if (pve.CanStartNewSession())
{
pve.StartLoading();
}
else
{
game.WaitTime(1000);
}
break;
case eGameState.Loading:
if (pve.IsAllComplete())
{
pve.StartGame();
}
else
{
game.WaitTime(1000);
}
break;
//TODO
case eGameState.GameStartMovie:
if (game.CurrentActionCount <= 1)
{
pve.StartGame();
}
else
{
pve.StartGameMovie();
}
break;
case eGameState.GameStart:
pve.PrepareNewGame();
break;
case eGameState.Playing:
if ((pve.CurrentLiving == null || pve.CurrentLiving.IsAttacking == false) && game.CurrentActionCount <= 1)
{
if (pve.CanGameOver())
{
pve.GameOver();
}
else
{
pve.NextTurn();
}
}
break;
case eGameState.GameOver:
if (pve.HasNextSession())
{
pve.PrepareNewSession();
}
else
{
pve.GameOverAllSession();
}
break;
case eGameState.ALLSessionStopped:
if (pve.PlayerCount == 0 || pve.WantTryAgain == 0)
{
pve.Stop();
}
else if (pve.WantTryAgain == 1)
{
pve.SessionId--;
pve.PrepareNewSession();
}
else
{
game.WaitTime(1000);
}
break;
}
}
m_isFinished = true;
}
}