using System.Collections; using System.Collections.Generic; using UnityEngine; using NodeCanvas.Framework; using ParadoxNotion.Design; using KairoEngine.Core; using KairoEngine.Inventory; namespace KairoEngine.CharacterSystem { [Category("KairoEngine")] public class CharacteCheckDamageTaskAction : ActionTask { [BlackboardOnly] public BBParameter target; [BlackboardOnly] public BBParameter targetPosition; private float waitTime = 0f; private float counter = 0f; private ItemBaseFirearm firearm; private int burstCount = 0; protected override string info { get { return "Check for damage"; } } protected override void OnExecute() { DamageEvents.OnDamage += OnDamage; } private void OnDamage(DamageData damageData) { DamageEvents.OnDamage -= OnDamage; if(target != null) EndAction(true); targetPosition = damageData.sourcePosition; EndAction(true); } } }