本文整理汇总了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";
}
示例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 ();
}
示例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 ();
}
示例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 ();
}