Beispiel #1
0
        void Update()
        {
            if (Mathf.Approximately(health.GetFreaction(), 0) || Mathf.Approximately(health.GetFreaction(), 1))
            {
                rootCanvas.enabled = false;
                return;
            }

            rootCanvas.enabled    = true;
            foreground.localScale = new Vector3(health.GetFreaction(), 1, 1);
        }