예제 #1
0
    public void UpdatePlayerUI(PM_PlayerSettings _playerStats)
    {
        if (!IsValidUIPlayer)
        {
            return;
        }
        pLeftBar.fillAmount  = _playerStats.Life / 100f;
        pRightBar.fillAmount = _playerStats.Power / 100f;

        Color alpha = damageBar.color;//opacity

        alpha.a         = (1 - pLeftBar.fillAmount);
        damageBar.color = alpha;
        if (_playerStats.IsDead())
        {
            deathMenu.SetActive(true);
        }
    }