local FuncNode_IsInCamera = class("FuncNode_IsInCamera") --[[ 初始化 --]] function FuncNode_IsInCamera:initialize(entity) self.LimitChildCount = 0 self.Type = LuaConst.ConditionFuncType.IsInCamera end --[[ 执行 --]] function FuncNode_IsInCamera:Run(conditionDataNode, entity, missile) if not LevelManager.ShouldKeepSyncLevel() then local pos = entity:GetLogicPos() local isInCamera = UIUtils.IsInViewPort(FP.tonumberV1(pos.x), FP.tonumberV1(entity.components.move:GetLogicPosY()), FP.tonumberV1(pos.z)) return isInCamera and FP.Const.One or FP.Const.Zero else if LevelManager.IsSyncLevel() then logging.error(LTAG.ERROR, "HYW : 致命错误! 在联机玩法调用了FuncNode_IsInCamera!!! CharacterID : ", entity:GetCharacterID(), " 关卡ID : ", LevelManager.GetCurLevelID()) else logging.error(LTAG.ERROR, "HYW : 致命错误! 在单机校验玩法里调用了FuncNode_IsInCamera!!! CharacterID : ", entity:GetCharacterID(), " 关卡ID : ", LevelManager.GetCurLevelID()) end return FP.Const.Zero end end return FuncNode_IsInCamera