示例#1
0
    public virtual void Act(GameObject go = null)
    {
        Attacker = FindObjectOfType <BattleSystem_v2>().GetUnitTurn();
        var isPlayer = Attacker.GetComponent <BattleUnitPlayer>();

        if (isPlayer != null)
        {
            if (attackType == ItemWeapon.WeaponType.Slash)
            {
                damage = isPlayer.SlashWeapon.damage;
            }
            else
            {
                damage = isPlayer.CrushWeapon.damage;
            }
        }
        else
        {
            damage = Attacker.CombatValues.CurrentAP;
        }
        Target             = go.GetComponent <BattleUnitBase>();
        battleUnitAnimator = Attacker.GetComponent <Animator>();
    }
示例#2
0
 public virtual void DealDamage()
 {
     Target.GetComponent <CharCombatValues>().TakeDamage(damage, attackType);
 }