本文整理汇总了C#中AudioManager.Pause方法的典型用法代码示例。如果您正苦于以下问题:C# AudioManager.Pause方法的具体用法?C# AudioManager.Pause怎么用?C# AudioManager.Pause使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioManager
的用法示例。
在下文中一共展示了AudioManager.Pause方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
//.........这里部分代码省略.........
leapCanvas = Instantiate(leapCanvasPrefab);
//Génération de terrain
float longueurTerrain = vitesseHeros * tempsMusique;
/*ter = Instantiate( terrain, new Vector3(0,0,0), Quaternion.identity) as GameObject;
ter.transform.Rotate (0, -90, 0);
ter.transform.localScale = new Vector3 (longueurTerrain, 1, 1);
*/
ter = Instantiate (terrain, new Vector3 (-100, -2, 0), Quaternion.identity) as Terrain;
//ter.terrainData.size = new Vector3 (1.0f, 1.0f, 1.0f);
//ter.terrainData.size = new Vector3 (200, 200, 1);
//génération des ennemis
npcList = new List<GameObject> ();
//Debug.Log (npcList);
//List<Thing> ennemies = parser.getEnnemies ();
List<Item> items = level.ItemList;
//Debug.Log ("FINAL ITEM LIST COUNT : " + items.Count);
foreach (Item item in items) {
GameObject go = null;
if (item.Type == "basicLancer")
go = basicLancer;
else if (item.Type == "fireLancer")
go = fireLancer;
else if (item.Type == "iceLancer")
go = iceLancer;
else if (item.Type == "basicDragonet")
go = basicDragonet;
else if (item.Type == "fireDragonet")
go = fireDragonet;
else if (item.Type == "iceDragonet")
go = iceDragonet;
else if (item.Type == "wall")
go = wall;
else if (item.Type == "cannon")
go = canon;
else if (item.Type == "assassin")
go = assassin;
else if (item.Type == "life")
go = lifePotion;
else if (item.Type == "power")
go = powerPotion;
else if (item.Type == "invincibility")
go = invincibilityPotion;
if (go != null){
GameObject instance = Instantiate(go, new Vector3(item.PositionInX, go.transform.localScale.y/2, vitesseHeros*item.PositionInSeconds), Quaternion.identity) as GameObject;
NPC npc = instance.GetComponent<NPC>();
if (npc != null)
GameModel.NPCsInGame.Add(npc);
//GameModel.NPCsInGame[GameModel.NPCsInGame.Count-1].transform.Rotate(0, 180, 0);
}
}
//Génération du HUD
hudMaster = Instantiate (hud).GetComponent<HudMaster>();
//Debug.Log ("hudMaster : " + hudMaster);
state = GameState.PLAY;
Camera.main.transform.parent = heroGameObject.transform;
Camera.main.transform.position = new Vector3 (0, 2.18f, 0);
//Camera.main.transform.Translate(new Vector3(0, 2.18f, 0));
pausedMenu = GameObject.Find("Canvas");
pausedMenu.SetActive(false);
paused = false;
Time.timeScale = 1.0f;
musicCanvas = Instantiate (musicCanvasPrefab);
audioManager = musicCanvas.GetComponent<AudioManager> ();
audioManager.SetMusicName (level.MusicPath);
audioManager.Init ();
//If leap is not connected, Pause game and show warning message
if ( !leapControl.IsConnected())
{
//pause()
audioManager.Pause();
Time.timeScale = 0.0f;
GameObject detectedCanvas = GameObject.Find("DetectedLeapCanvas");
detectedCanvas.GetComponent<Canvas>().enabled = true;
}
//Debug.Log ("END Start GameController");
//ADD TUTORIAL MANAGER
if (level.Tutorial) {
GameObject tutoGO = Resources.Load("prefabs/controllers/TutorialManager") as GameObject;
Instantiate (tutoGO);
}
}