예제 #1
0
    public void TakeDamage(float damage)
    {
        FloatValue res = BlackBoard.GetFloatVariableValue(VariableType.Health);

        if (res)
        {
            res.Value -= damage;
        }
        AISelector.EvaluateBehaviours();
    }
예제 #2
0
    public void TakeDamage(float damage)
    {
        health -= damage;

        AISelector.EvaluateBehaviours();

        if (health < 0)
        {
            Destroy(this);
        }
    }