Exemple #1
0
    private void HealhtChangedListener(object source, int oldhealth, int newhealth)
    {
        if (!(source is PatzerRule))
        {
            _soundArrow.PlaySound();
        }
        //ToDo: fancy stuff here
        if (oldhealth > newhealth)
        {
            GameManager.Instance.PlayAudioSound(_targetSound.GetAudioClipRandom());
        }
        else
        {
            _soundHealFeedback.PlaySound();
        }

        SetText(newhealth, _currentPlayer.PlayerStats.MaxHealth);
    }