Exemple #1
0
    // Method
    public float GetDamage(float ap)
    {
        float damage = ap - shieldPoint;

        if (damage < 0)
        {
            damage = 1;
        }
        healthPoint -= damage;
        if (healthPoint <= 0)
        {
            healthPoint = 0;
            Controller.CharacterDeath();
        }
        changedStatusCallback();
        return(damage);
    }