From 65ed53a40f990e895305ff17a5e48e3cd6b8785b Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 24 Oct 2020 17:30:07 +0800 Subject: =?UTF-8?q?*=E7=89=A9=E7=90=86=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Conditions/Interactive/ConditionHurt.cs | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'Assets/Scripts/AbilitySystem/Conditions/Interactive/ConditionHurt.cs') diff --git a/Assets/Scripts/AbilitySystem/Conditions/Interactive/ConditionHurt.cs b/Assets/Scripts/AbilitySystem/Conditions/Interactive/ConditionHurt.cs index b4acd71a..8a76528d 100644 --- a/Assets/Scripts/AbilitySystem/Conditions/Interactive/ConditionHurt.cs +++ b/Assets/Scripts/AbilitySystem/Conditions/Interactive/ConditionHurt.cs @@ -2,17 +2,19 @@ using System.Collections.Generic; using UnityEngine; -public class ConditionHurt : MonoBehaviour +// hurtbox被击中 +public class ConditionHurt : ConditionBase { - // Start is called before the first frame update - void Start() - { - - } + IInteractable m_Obj; - // Update is called once per frame - void Update() - { - - } + public ConditionHurt(IInteractable obj) + { + m_Obj = obj; + } + + public override bool Evaluate() + { + bool isHit = m_Obj.IsHit(); + return isHit; + } } -- cgit v1.1-26-g67d0