Exemplo n.º 1
0
    void Update()
    {
        if (m_flashLight.m_hasBeenPickedUp && m_flashLight.GetState() == FlashLightState.ON)
        {
            Increase(m_regenerateStep * Time.deltaTime); // will increase by negative value ==> decrease

            if (m_current <= 0.0f)
            {
                // Disable FlashLight
                m_flashLight.SetState(FlashLightState.OFF);
            }
        }

        if (m_current <= 0.0f)
        {
            SingletonManager.Minimap.SetEnableState(false);
        }
    }