Пример #1
0
 public void SetEnergyProgress(float progress)
 {
     EnergyProgressBar.SetTransparent(1);
     BackGroundEnergyProgressBar.SetTransparent(1);
     EnergyProgressBar.SetProgress(progress);
     _curEnergyPBTime = 0;
 }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.I) && InterfaceSwitch_enabled)
        {
            SetInterfaceVisible(!CurVisible);
            CharacterFPC.transform.GetComponent <ItemManager> ().HideItems = CurVisible;
        }


        //-------------------------- EnergyProgresBar ------------------------//
        if (_curEnergyPBTime <= EnergyProgressBarDyingDelay)
        {
            _curEnergyPBTime += Time.deltaTime;
        }
        else
        {
            EnergyProgressBar.SetTransparent(0);
            BackGroundEnergyProgressBar.SetTransparent(0);
        }
    }