Beispiel #1
0
    protected virtual void BleedDmg()
    {
        Hitpoints -= Time.deltaTime / 2;

        if (Hitpoints < 0)
        {
            EmotionalState = NpcEmotion.Death;
        }
    }
Beispiel #2
0
    public virtual void DoDmg()
    {
        Hitpoints -= 25;

        if (Hitpoints < 0)
        {
            EmotionalState = NpcEmotion.Death;
        }

        var criticalPain = Random.value;

        if (criticalPain < 0.2)
        {
            EmotionalState = NpcEmotion.Death;
        }
        else if (criticalPain < 0.5)
        {
            IsBleedingToDeath = true;
        }
    }