Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 public void updateLivesLeft()
 {
     livesLeftTxt.text = "Lives Left: " + LivesEffect.staticGetLivesRemaining();
 }
Ejemplo n.º 3
0
 public void updateLivesLost()
 {
     livesLostTxt.text = "Lives Lost: " + LivesEffect.staticGetLivesLost();
 }
Ejemplo n.º 4
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;
                }
            }
        }
    }