示例#1
0
    // Update is called once per frame
    void Update()
    {
        float value = torch.GetEnergy() / Torch.MAX_ENERGY;

        lightBar.fillAmount = Mathf.Clamp(value, 0f, 1f);
    }