예제 #1
0
    /*
     * /// <summary>
     * /// 공격자의 무기에 적용되어 있던 effects를 이 대상에게 적용합니다.
     * /// </summary>
     * /// <param name="effects"></param>
     * public void DamagedWithEffects(ItemManager.Effect effects)
     * {
     *  if (effects != null && effects.GetInvocationList().Length > 0)
     *      effects(this);
     * }
     *
     * /// <summary>
     * /// 턴이 끝난 캐릭터의 방어구에 적용되어 있던 effects를 자기 자신에게 적용합니다.
     * /// </summary>
     * /// <param name="effects"></param>
     * public void DefendWithEffects(ItemManager.Effect effects)
     * {
     *  if (effects != null && effects.GetInvocationList().Length > 0)
     *  {
     *      effects(this);
     *  }
     * }
     */

    /// <summary>
    /// 대미지 계산이 완료된 후, 피격 애니메이션을 재생하기 위해 호출됩니다.
    /// </summary>
    public void DamagedAnimation()
    {
        if (hasDamaged)
        {
            hasDamaged = false;
            StartCoroutine(Mover.DamagedAnimation(oldHealth, healthBar, statusUI, damagedDirection, isCriticalDamage));
            damagedDirection = new Vector3();
        }
    }