Exemplo n.º 1
0
    void MeasureBarShake()
    {
        Vector3 barAngle = bar.transform.rotation.eulerAngles;
        float   diff     = Vector3.Distance(prevBarAngle, barAngle);

        loadingBarScript.AddFillPercent(diff * shakeModifier * Time.deltaTime);
        prevBarAngle = barAngle;
    }
Exemplo n.º 2
0
    void FillBar()
    {
        if (fell)
        {
            return;
        }

        loadingBarScript.AddFillPercent(fillVariable * Time.deltaTime);
    }
Exemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     if (countCount > 0)
     {
         if (connectedPipe.IsEnergized())
         {
             loadingBarScript.AddFillPercent(fillRatio * Time.deltaTime);
         }
     }
 }
Exemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        if (!initializedBar && loadingBarScript && loadingBarScript.gameObject.activeSelf)
        {
            loadingBarScript.SetFillPercent(10);
            initializedBar = true;
        }

        if (hasBeenGrabbed)
        {
            float mouseScroll = -Input.mouseScrollDelta.y * mouseScrollScale;
            loadingBarScript.AddFillPercent(mouseScroll * 10);
            transform.position            += Vector3.right * (mouseScroll);
            handlePivot.transform.rotation = Quaternion.Slerp(handlePivot.transform.rotation, handlePivot.transform.rotation * quaternion.Euler(0, 0, mouseScroll * -100), Time.deltaTime * 30f);
            //transform.rotation = Quaternion.Slerp(transform);

            //loadingBarScript.AddFillPercent();
        }
    }