当前位置: 首页>>代码示例>>C#>>正文


C# GameManager.ResetNoteIndex方法代码示例

本文整理汇总了C#中GameManager.ResetNoteIndex方法的典型用法代码示例。如果您正苦于以下问题:C# GameManager.ResetNoteIndex方法的具体用法?C# GameManager.ResetNoteIndex怎么用?C# GameManager.ResetNoteIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameManager的用法示例。


在下文中一共展示了GameManager.ResetNoteIndex方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

	void Start ()
	{
		gameManager = GameObject.FindObjectOfType<GameManager> ();
        GameObject.Find("LevelFailed").GetComponent<Image>().color = new Color(1f, 1f, 1f, 0f);
		timerText = GameObject.Find ("TimerText").GetComponent<Text> ();
		scoreText = GameObject.Find ("Score").GetComponent<Text> ();
		HighScoreText = GameObject.Find ("HighScore").GetComponent<Text> ();
		gameOverUIAnim = GameObject.Find ("GameOverUI").GetComponent<Animator> ();

		if (gameManager.subLevelIndex == 1) {
			currentMode = ClassicMode.Mode25;
		} else if (gameManager.subLevelIndex == 2) {
			currentMode = ClassicMode.Mode50;
		} else if (gameManager.subLevelIndex == 3) {
			currentMode = ClassicMode.Pro;
		}
		if (gameManager.isSoundOn)
			GetComponent<AudioSource> ().volume = 1f;
		else
			GetComponent<AudioSource> ().volume = 0f;
		if (currentMode == ClassicMode.Mode25) {
			totalTap = 25;
		} else if (currentMode == ClassicMode.Mode50) {
			totalTap = 50;
		} else if (currentMode == ClassicMode.Pro) {
			totalTap = 50;
		}
        gameManager.ResetNoteIndex();
		GenerateFullGrid ();
		scoreText.text = timeCounter.ToString ("0.00") + " sec";
	}
开发者ID:nurfarazi,项目名称:musical-Piono-tiles-Unity3d,代码行数:31,代码来源:ClassicGameManager.cs

示例2: Start

	void Start ()
	{
		gameManager = GameObject.FindObjectOfType<GameManager> ();
		timerText = GameObject.Find ("TimerText").GetComponent<Text> ();
		scoreText = GameObject.Find ("Score").GetComponent<Text> ();
		timeSlider = GameObject.Find ("TimeSlider").GetComponent<Slider> ();
		gameOverUIAnim = GameObject.Find ("GameOverUI").GetComponent<Animator> ();
		if (gameManager.subLevelIndex == 1) {
			currentMode = ZenMode.Second15;
		} else if (gameManager.subLevelIndex == 2) {
			currentMode = ZenMode.Second30;
		} else if (gameManager.subLevelIndex == 3) {
			currentMode = ZenMode.Pro;
		}
		if (gameManager.isSoundOn)
			GetComponent<AudioSource> ().volume = 1f;
		else
			GetComponent<AudioSource> ().volume = 0f;
		if (currentMode == ZenMode.Second15) {
			//totalTap = 25;
			timeCounter = 15f;
		} else if (currentMode == ZenMode.Second30) {
			//totalTap = 50;
			timeCounter = 30f;
		} else if (currentMode == ZenMode.Pro) {
			//totalTap = 50;
			timeCounter = 50f;
		}
        gameManager.ResetNoteIndex();
		isGameStarted = false;
		timeSlider.minValue = 0f;
		timeSlider.maxValue = timeCounter;
		timeSlider.value = timeCounter;
		GenerateFullGrid ();
	}
开发者ID:nurfarazi,项目名称:musical-Piono-tiles-Unity3d,代码行数:35,代码来源:ZenGameManager.cs

示例3: Start

	void Start ()
	{
		gameManager = GameObject.FindObjectOfType<GameManager> ();
		timerText = GameObject.Find ("TimerText").GetComponent<Text> ();
		scoreText = GameObject.Find ("Score").GetComponent<Text> ();
		HighScoreText = GameObject.Find ("HighScore").GetComponent<Text> ();

		//timeSlider = GameObject.Find("TimeSlider").GetComponent<Slider>();
		gameOverUIAnim = GameObject.Find ("GameOverUI").GetComponent<Animator> ();

		if (gameManager.subLevelIndex == 1) {
			currentMode = ArcadeMode.Normal;
		} else if (gameManager.subLevelIndex == 2) {
			currentMode = ArcadeMode.Fast;
		} else if (gameManager.subLevelIndex == 3) {
			currentMode = ArcadeMode.Reverse;
		}
		if (gameManager.isSoundOn)
			GetComponent<AudioSource> ().volume = 1f;
		else
			GetComponent<AudioSource> ().volume = 0f;
		if (currentMode == ArcadeMode.Normal) {
			//totalTap = 25;
			//timeCounter = 15f;
			speed = 8;
		} else if (currentMode == ArcadeMode.Fast) {
			//totalTap = 50;
			//timeCounter = 30f;
			speed = 10;
		} else if (currentMode == ArcadeMode.Reverse) {
			//totalTap = 50;
			//timeCounter = 50f;
			speed = 8;
			Camera.main.transform.rotation = Quaternion.Euler (new Vector3 (0f, 0f, 180f));
		}
        gameManager.ResetNoteIndex();
		//timeSlider.minValue = 0f;
		//timeSlider.maxValue = timeCounter;
		GenerateFullGrid ();

	}
开发者ID:nurfarazi,项目名称:musical-Piono-tiles-Unity3d,代码行数:41,代码来源:ArcadeGameManager.cs

示例4: Start

	void Start ()
	{
		gameManager = GameObject.FindObjectOfType<GameManager> ();
		timerText = GameObject.Find ("TimerText").GetComponent<Text> ();
		scoreText = GameObject.Find ("Score").GetComponent<Text> ();
		HighScoreText = GameObject.Find ("HighScore").GetComponent<Text> ();

		//timeSlider = GameObject.Find("TimeSlider").GetComponent<Slider>();
		gameOverUIAnim = GameObject.Find ("GameOverUI").GetComponent<Animator> ();

		if (gameManager.subLevelIndex == 1) {
			currentMode = RelayMode.Second8;
		} else if (gameManager.subLevelIndex == 2) {
			currentMode = RelayMode.Second10;
		} else if (gameManager.subLevelIndex == 3) {
			currentMode = RelayMode.Second12;
		}
		if (gameManager.isSoundOn)
			GetComponent<AudioSource> ().volume = 1f;
		else
			GetComponent<AudioSource> ().volume = 0f;

		if (currentMode == RelayMode.Second8) {
			//totalTap = 25;
			timeCounter = 8f;
		} else if (currentMode == RelayMode.Second10) {
			//totalTap = 50;
			timeCounter = 10f;
		} else if (currentMode == RelayMode.Second12) {
			//totalTap = 50;
			timeCounter = 12f;
		}
        gameManager.ResetNoteIndex();
		//timeSlider.minValue = 0f;
		//timeSlider.maxValue = timeCounter;
		GenerateFullGrid ();
	}
开发者ID:nurfarazi,项目名称:musical-Piono-tiles-Unity3d,代码行数:37,代码来源:RelayGameManager.cs


注:本文中的GameManager.ResetNoteIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。