Ejemplo n.º 1
0
    // Update is called once per frame
    public void Update()
    {
        if (downTime > 0)
        {
            // Control Info Bar
            pressTime = Time.time - downTime;
            breakBar.SetBarValue(pressTime * (100 / maxPressTime)); // We're passing percentage

            if (pressTime >= maxPressTime)
            {
                stopSpeedingUp();
            }
        }
    }
Ejemplo n.º 2
0
    public void Update()
    {
        // Control Info Bar
        if (0 != downTime)
        {
            pressTime = Time.time - downTime;
            fireForceBar.SetBarValue(pressTime * (100 / maxPressTime)); // We're passing percentage

            // Release key, fire bullet
            if (pressTime >= maxPressTime)
            {
                shoot();
            }
        }
    }