예제 #1
0
 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;
 }
예제 #2
0
 public void updateLivesLeft()
 {
     livesLeftTxt.text = "Lives Left: " + LivesEffect.staticGetLivesRemaining();
 }
예제 #3
0
    // 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;
                }
            }
        }
    }