private void setDefaultValues() { powerLeftTxt.text = "Power Left: " + PowerEffect.staticGetVarValue(); livesLeftTxt.text = "Lives Left: " + LivesEffect.staticGetLivesRemaining(); livesLostTxt.text = "Lives Lost: " + LivesEffect.staticGetLivesLost(); //TODO: Morale number interpreter moraleTxt.text = "Current Morale: " + MoraleEffect.staticGetMoraleValue(); jumpsLeftTxt.text = "Jumps until destination (estimate): " + WarpEffect.JumpsLeft; jumpsMadeTxt.text = "Jumps already made: " + WarpEffect.JumpsMade; }
// Update is called once per frame void Update() { if (PowerEffect.staticGetVarValue() <= 0 || MoraleEffect.staticGetMoraleValue() <= 0 || LivesEffect.staticGetLivesRemaining() <= 0) { gameOverScript.showGameOver(); } if (WarpEffect.JumpsLeft <= 0) { winText.SetActive(true); } if (!finalSpeechScript.isFinalEventConfirmed()) { if (eventIsOpen) { checkForInput(); } else { totalTime += Time.deltaTime; secBetweenEvents -= Time.deltaTime; secBetweenRGain -= Time.deltaTime; if (!shownFirstEvent) { fireEvent(); } if (secBetweenEvents < 0) { fireEvent(); secBetweenEvents = secBetweenEventsStore; } if (secBetweenRGain < 0) { addPower(); secBetweenRGain = secBetweenRGainStore; } } } }
public void updatePower() { powerLeftTxt.text = "Power Left: " + PowerEffect.staticGetVarValue(); }