Heal() public method

public Heal ( float healAmount ) : void
healAmount float
return void
コード例 #1
0
    protected IEnumerator Hit(BoardCreator board, UnitStats target, Tile source)
    {
        if (data.Damage > 0)
        {
            target.TakeDamage(unit.GetComponent <UnitStats>().GetAttack(board, data));
        }
        if (data.Heal > 0)
        {
            target.Heal(data.Heal);
        }

        if (!target.IsDead())
        {
            if (data.hasKnockback && target.GetComponent <Unit>().KnockbackAble())
            {
                Point direction = source.pos - target.GetComponent <Unit>().tile.pos;
                yield return(StartCoroutine(target.ApplyKnockback(board, direction)));
            }

            if (data.status != StatusEffects.NONE)
            {
                target.AddStatus(data.status);
            }
        }
    }
コード例 #2
0
 public void Heal(float healAmount, UnitStats healTarget)
 {
     if (healTarget != null)
     {
         healTarget.Heal(healAmount);
     }
 }
コード例 #3
0
ファイル: PlayerAction.cs プロジェクト: MaddJhin/Holdout
 public void Heal(float healAmount, UnitStats healTarget)
 {
     if (healTarget != null)
     {
         Debug.Log("Applying Heal");
         healTarget.Heal(healAmount);
     }
 }
コード例 #4
0
ファイル: UnitController.cs プロジェクト: jessekwong/WIP2020
    public virtual void HitTarget(GameObject target)
    {
        //  Debug.Log("hit: " + target.name);
        statController.DealDamage(target, currentSkill.Amount);
        statController.Heal(currentSkill.HealthOnHit);

        statController.BleedTarget(target, currentSkill.Bleed);
        statController.GainEnergy(currentSkill.EnergyOnHit);
    }