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>(); }
public virtual void DealDamage() { Target.GetComponent <CharCombatValues>().TakeDamage(damage, attackType); }