예제 #1
0
    void UpdateProgress(float deltaTime)
    {
        if (m_AttemptTimer)
        {
            m_CurrentAtemptTimer -= deltaTime;

            m_Progress.SetProgress(m_CurrentAtemptTimer / LevelLogic.GetUnlockAttempTime());

            if (m_CurrentAtemptTimer < 0)
            {
                m_AttemptTimer = false;
            }
        }

        if (m_MoveNextTimer)
        {
            m_CurrMoveNextTime -= deltaTime;

            if (m_CurrMoveNextTime < 0)
            {
                m_MoveNextTimer = false;

                AskForNext();
            }
        }

        m_CurrBag.UpdateMe(deltaTime);
    }
예제 #2
0
        private void Update()
        {
            var healthRatio  = (float)_player.Health / _player.MaxHealth;
            var staminaRatio = (float)_player.Stamina / _player.MaxStamina;

            _healthBar.SetProgress(healthRatio);
            _staminaBar.SetProgress(staminaRatio);
        }