private IEnumerator IASpawnRocket(float delay = 0f) { yield return(new WaitForSeconds(delay)); audioMgr.PlaySound(audioMgr.speedRunner_Start); rocket.SetPosition(15, 32); rocket.SetSprite(gm.spriteDB.speedRunner_rocket); for (int i = 0; i < 8; i++) { yield return(new WaitForSeconds(1f / 8)); rocket.Move(Direction.Up); } TextBoxBuilder tbStart = ScreenElement.BuildTextBox("Start", Parent, DFont.Small).SetText("START").SetSize(24, 5).SetPosition(9, 8); yield return(new WaitForSeconds(0.5f)); tbStart.SetActive(false); yield return(new WaitForSeconds(0.5f)); tbStart.SetActive(true); yield return(new WaitForSeconds(1f)); tbStart.SetActive(false); gameStarted = true; }
private IEnumerator IAElevateRocket() { gm.LockInput(); for (int i = 0; i < 32; i++) { rocket.Move(Direction.Up); yield return(new WaitForSeconds(1.5f / 32)); } foreach (SpriteBuilder sb in speedMarks) { sb.SetActive(false); } finishRow.SetActive(false); yield return(new WaitForSeconds(0.5f)); TextBoxBuilder tbGoal = ScreenElement.BuildTextBox("Goal", Parent, DFont.Small).SetText("GOAL!").SetSize(24, 5).SetPosition(9, 8); yield return(new WaitForSeconds(0.5f)); currentScreen = 1; gm.UnlockInput(); while (true) { tbGoal.SetActive(!tbGoal.Active); yield return(new WaitForSeconds(0.5f)); } }
private void UpdateScreen() { currentInputDisplay.Text = CurrentInputString; for (int i = 0; i < underscores.Length; i++) { if (i == currentInput.Count()) { if (underscores[i].FlickPeriod == 0) { underscores[i].SetFlickPeriod(0.4f, false); } } else { underscores[i].SetFlickPeriod(0f); } } if (!InputIsFull) { selectedInputDisplay.SetActive(true); selectedInputDisplay.Text = SelectedInputString; screenDisplay.sprite = gm.spriteDB.arrows; } else { selectedInputDisplay.SetActive(false); if (inputStatus == 1) { screenDisplay.sprite = gm.spriteDB.digits_ok; } else if (inputStatus == 2) { screenDisplay.sprite = gm.spriteDB.digits_error; } } }