本文整理汇总了C#中GameManager.SwitchState方法的典型用法代码示例。如果您正苦于以下问题:C# GameManager.SwitchState方法的具体用法?C# GameManager.SwitchState怎么用?C# GameManager.SwitchState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameManager
的用法示例。
在下文中一共展示了GameManager.SwitchState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LlamarEscena
public static void LlamarEscena(GameManager managerRef)
{
GameManager manager;
manager = managerRef;
if (FuncionCambioDeEscena.activarEscena == true)
{
switch (FuncionCambioDeEscena.irAEscena)
{
case Escenas.escenaPerfil:
manager.SwitchState(new StateProfile(manager));
break;
case Escenas.escenaHistorial:
manager.SwitchState(new StateHist(manager));
break;
case Escenas.escenaTienda:
manager.SwitchState(new StateStore(manager));
break;
case Escenas.escenaCofiguracion:
manager.SwitchState(new StateMenu(manager));
break;
case Escenas.escenaPlay:
manager.SwitchState(new StatePlay(manager));
break;
case Escenas.escenaHome:
manager.SwitchState(new StateHome(manager));
break;
case Escenas.escenaInformacion:
manager.SwitchState(new StateInformacion(manager));
break;
case Escenas.escenaCupones:
manager.SwitchState(new StateCupones(manager));
break;
case Escenas.escenaPujas:
manager.SwitchState(new StatePujas(manager));
break;
/* case Escenas.escenaEstdistocas:
manager.SwitchState(new stateEstadisticas(manager));
break;
*/
default:
break;
}
FuncionCambioDeEscena.activarEscena = false;
}
}
示例2: Pause
IEnumerator Pause()
{
print("Before Waiting 5 seconds");
//Switch GameManager State
gameManager = GameObject.FindObjectOfType<GameManager>();
gameManager.SwitchState (GameState.Completed);
gameManager.ChangeText ("You Win :)");
FinishTime = gameManager.formattedTime;
Debug.Log("Took "+FinishTime+ " to finish the game");
yield return new WaitForSeconds(5);
//Reload Main Menu
LoadScene (0);
print("After Waiting 5 Seconds went to main menu");
}
示例3: Pause
IEnumerator Pause()
{
print("Before Waiting 2 seconds");
//Switch GameManager State
gameManager = GameObject.FindObjectOfType<GameManager>();
gameManager.SwitchState (GameState.Failed);
//gameManager.ChangeText ("You Lose :(");
//enable the restart and main menu buttons
gameManager.EnableButtons();
yield return new WaitForSeconds(2);
//Find the ball and reset game start
//ball = GameObject.FindObjectOfType<Ball>();
//ball.gameStarted = false;
//Reload level
//Application.LoadLevel(Application.loadedLevel);
print("After Waiting 2 Seconds");
}