Пример #1
0
    //INPUT
    public void OnRess(InputValue action)
    {
        if (!bleedingOut && _playerToRess != null)
        {
            float value = action.Get <float>();

            if (value == 1)//Pressed
            {
                _resurrectingPlayer = true;
                Debug.Log("Total healing en 0");
                _totalHealing = 0;

                //Crear Barra de revivir
                _healingBar = Instantiate(_healingBarPrefab, _playerToRess.transform);
                _barFill    = _healingBar.GetComponent <FillerBar>();
            }
            else if (value == 0 && _resurrectingPlayer)//Unpressed
            {
                _resurrectingPlayer = false;

                ressPlayer();
            }
        }
        else
        {
            Debug.Log("No Players To Ress");
        }
    }
Пример #2
0
 public void Start()
 {
     Health    = maxHealth;
     healthBar = FillerBar.Instantiate(transform, Health, maxHealth, Color.green, Color.red, Color.black);
 }