Пример #1
0
    private void OnHurt()
    {
        AudioManager.Instance.PlaySound("playerHurt");
        ScreenshakeManager.Shake(ScreenshakeManager.EShakeType.shortSharp);

        UIManager.Instance.UpdatePlayerHealthBar(m_playerNumber, m_health.Health, m_health.MaxHealth);
        CurrentCombo = 0;
    }
Пример #2
0
    private void OnHurt()
    {
        AudioManager.Instance.PlaySound("hitBoss");
        ScreenshakeManager.Shake(ScreenshakeManager.EShakeType.small);

        float newFillAmount = Mathf.Clamp01(m_healthComp.Health / m_healthComp.MaxHealth);

        m_healthBar.FillAmount = newFillAmount;

        m_animator.SetTrigger("Damaged");
        // m_healthBar.fillAmount = newFillAmount;

        // DOTween.Kill(this);
        // DOTween.To(() => m_healthBarChase.fillAmount, x => m_healthBarChase.fillAmount = x, newFillAmount, 0.2f).SetEase(Ease.OutQuad);
    }