local FuncNode_CurrentHp = class("FuncNode_CurrentHp") --[[ 初始化 --]] function FuncNode_CurrentHp:initialize(entity) self.LimitChildCount = 1 self.Type = LuaConst.ConditionFuncType.CurrentHp end --[[ 执行 --]] function FuncNode_CurrentHp:Run(conditionDataNode, entity, missile) local type = conditionDataNode.FirstNode:Run(entity, missile) local tempEntity if type == FP.Const.Zero then --自己 tempEntity = entity elseif type == FP.Const.One then --目标 tempEntity = entity.components.target.Target end if tempEntity then return tempEntity.components.attr:HitPointPercents() else return FP.Const.Zero end end return FuncNode_CurrentHp