예제 #1
0
 void ZeroGraph()
 {
     for (int i = 0; i < graphBars.Length; i++)
     {
         GraphBar g = graphBars[i];
         g.TweenToScale(0.1f);
     }
 }
예제 #2
0
    // Update is called once per frame
    void Update()
    {
        if (exhaling)
        {
            float realtimeSinceStartup = Time.realtimeSinceStartup;

            if (realtimeSinceStartup - startTime >= maxTime)
            {
                startTime = realtimeSinceStartup;
            }

            float    delta = realtimeSinceStartup - startTime;
            int      i     = (int)((delta / maxTime) * (dataPoints));
            GraphBar g     = graphBars[i];
            g.TweenToScale(FizzyoFramework.Instance.Device.Pressure() * 50.0f);
        }
    }