local FuncNode_AngleCheck = class("FuncNode_AngleCheck") --[[ 初始化 --]] function FuncNode_AngleCheck:initialize(entity) self.LimitChildCount = 0 self.Type = LuaConst.ConditionFuncType.AngleCheck end --[[ 执行 --]] function FuncNode_AngleCheck:Run(conditionDataNode, entity, missile) local target = entity.components.target.Target if not target then return FP.Const.Zero end local myForward = entity.components.move.LogicRotateDir local targetForward = FP.V2.Normalized(target.components.move.LogicPos - entity.components.move.LogicPos) return FP.V2.Angle(myForward,targetForward) end return FuncNode_AngleCheck