From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/AI/AIMsgTarget.cs | 16 + .../Scripts/XMainClient/AI/AIMsgTarget.cs.meta | 12 + .../Assets/Scripts/XMainClient/AI/AINodeFactory.cs | 668 +++++++++++++++++++++ .../Scripts/XMainClient/AI/AINodeFactory.cs.meta | 12 + .../XMainClient/AI/AIRunTimeBehaviorTree.cs | 151 +++++ .../XMainClient/AI/AIRunTimeBehaviorTree.cs.meta | 12 + .../XMainClient/AI/AIRunTimeBoolComparison.cs | 31 + .../XMainClient/AI/AIRunTimeBoolComparison.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeCalDistance.cs | 59 ++ .../XMainClient/AI/AIRunTimeCalDistance.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeCompareTo.cs | 54 ++ .../XMainClient/AI/AIRunTimeCompareTo.cs.meta | 12 + .../XMainClient/AI/AIRunTimeConditionMonsterNum.cs | 12 + .../AI/AIRunTimeConditionMonsterNum.cs.meta | 12 + .../XMainClient/AI/AIRunTimeConditionPlayerNum.cs | 123 ++++ .../AI/AIRunTimeConditionPlayerNum.cs.meta | 12 + .../AI/AIRunTimeConditionalEvaluator.cs | 67 +++ .../AI/AIRunTimeConditionalEvaluator.cs.meta | 12 + .../XMainClient/AI/AIRunTimeDecorationNode.cs | 20 + .../XMainClient/AI/AIRunTimeDecorationNode.cs.meta | 12 + .../XMainClient/AI/AIRunTimeDetectEnimyInSight.cs | 18 + .../AI/AIRunTimeDetectEnimyInSight.cs.meta | 12 + .../XMainClient/AI/AIRunTimeDoSelectFarthest.cs | 18 + .../AI/AIRunTimeDoSelectFarthest.cs.meta | 12 + .../XMainClient/AI/AIRunTimeDoSelectNearest.cs | 18 + .../AI/AIRunTimeDoSelectNearest.cs.meta | 12 + .../XMainClient/AI/AIRunTimeEntryTaskNode.cs | 62 ++ .../XMainClient/AI/AIRunTimeEntryTaskNode.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeFindNavPath.cs | 18 + .../XMainClient/AI/AIRunTimeFindNavPath.cs.meta | 12 + .../XMainClient/AI/AIRunTimeFindTargetByDist.cs | 53 ++ .../AI/AIRunTimeFindTargetByDist.cs.meta | 12 + .../AI/AIRunTimeFindTargetByHitLevel.cs | 24 + .../AI/AIRunTimeFindTargetByHitLevel.cs.meta | 12 + .../XMainClient/AI/AIRunTimeFloatComparison.cs | 78 +++ .../AI/AIRunTimeFloatComparison.cs.meta | 12 + .../XMainClient/AI/AIRunTimeFloatOperator.cs | 89 +++ .../XMainClient/AI/AIRunTimeFloatOperator.cs.meta | 12 + .../AI/AIRunTimeGetRealtimeSinceStartup.cs | 25 + .../AI/AIRunTimeGetRealtimeSinceStartup.cs.meta | 12 + .../XMainClient/AI/AIRunTimeIntComparison.cs | 78 +++ .../XMainClient/AI/AIRunTimeIntComparison.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeIntOperator.cs | 89 +++ .../XMainClient/AI/AIRunTimeIntOperator.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeInverter.cs | 18 + .../XMainClient/AI/AIRunTimeInverter.cs.meta | 12 + .../XMainClient/AI/AIRunTimeIsCastingSkill.cs | 17 + .../XMainClient/AI/AIRunTimeIsCastingSkill.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeIsFighting.cs | 17 + .../XMainClient/AI/AIRunTimeIsFighting.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeIsFixedInCd.cs | 17 + .../XMainClient/AI/AIRunTimeIsFixedInCd.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeIsHurtOppo.cs | 17 + .../XMainClient/AI/AIRunTimeIsHurtOppo.cs.meta | 12 + .../XMainClient/AI/AIRunTimeIsOppoCastingSkill.cs | 17 + .../AI/AIRunTimeIsOppoCastingSkill.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeIsQTEState.cs | 25 + .../XMainClient/AI/AIRunTimeIsQTEState.cs.meta | 12 + .../XMainClient/AI/AIRunTimeIsTargetImmortal.cs | 23 + .../AI/AIRunTimeIsTargetImmortal.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeIsWander.cs | 17 + .../XMainClient/AI/AIRunTimeIsWander.cs.meta | 12 + .../Assets/Scripts/XMainClient/AI/AIRunTimeLog.cs | 17 + .../Scripts/XMainClient/AI/AIRunTimeLog.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeLogicNode.cs | 21 + .../XMainClient/AI/AIRunTimeLogicNode.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeNodeAction.cs | 13 + .../XMainClient/AI/AIRunTimeNodeAction.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeNodeBase.cs | 33 + .../XMainClient/AI/AIRunTimeNodeBase.cs.meta | 12 + .../XMainClient/AI/AIRunTimeNodeCondition.cs | 18 + .../XMainClient/AI/AIRunTimeNodeCondition.cs.meta | 12 + .../XMainClient/AI/AIRunTimeRandomEntityPos.cs | 17 + .../AI/AIRunTimeRandomEntityPos.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeRandomFloat.cs | 37 ++ .../XMainClient/AI/AIRunTimeRandomFloat.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeRandomIndex.cs | 50 ++ .../XMainClient/AI/AIRunTimeRandomIndex.cs.meta | 12 + .../XMainClient/AI/AIRunTimeRandomSelectorNode.cs | 35 ++ .../AI/AIRunTimeRandomSelectorNode.cs.meta | 12 + .../XMainClient/AI/AIRunTimeRandomSequenceNode.cs | 35 ++ .../AI/AIRunTimeRandomSequenceNode.cs.meta | 12 + .../XMainClient/AI/AIRunTimeResetHartedList.cs | 18 + .../AI/AIRunTimeResetHartedList.cs.meta | 12 + .../XMainClient/AI/AIRunTimeResetTargets.cs | 19 + .../XMainClient/AI/AIRunTimeResetTargets.cs.meta | 12 + .../XMainClient/AI/AIRunTimeReturnFailure.cs | 22 + .../XMainClient/AI/AIRunTimeReturnFailure.cs.meta | 12 + .../XMainClient/AI/AIRunTimeReturnSuccess.cs | 22 + .../XMainClient/AI/AIRunTimeReturnSuccess.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeRootNode.cs | 37 ++ .../XMainClient/AI/AIRunTimeRootNode.cs.meta | 12 + .../XMainClient/AI/AIRunTimeSelectBuffTarget.cs | 34 ++ .../AI/AIRunTimeSelectBuffTarget.cs.meta | 12 + .../XMainClient/AI/AIRunTimeSelectItemTarget.cs | 34 ++ .../AI/AIRunTimeSelectItemTarget.cs.meta | 12 + .../AI/AIRunTimeSelectMoveTargetById.cs | 36 ++ .../AI/AIRunTimeSelectMoveTargetById.cs.meta | 12 + .../XMainClient/AI/AIRunTimeSelectNonHartedList.cs | 17 + .../AI/AIRunTimeSelectNonHartedList.cs.meta | 12 + .../AI/AIRunTimeSelectTargetBySkillCircle.cs | 18 + .../AI/AIRunTimeSelectTargetBySkillCircle.cs.meta | 12 + .../XMainClient/AI/AIRunTimeSelectorNode.cs | 25 + .../XMainClient/AI/AIRunTimeSelectorNode.cs.meta | 12 + .../XMainClient/AI/AIRunTimeSequenceNode.cs | 25 + .../XMainClient/AI/AIRunTimeSequenceNode.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeSetBool.cs | 28 + .../XMainClient/AI/AIRunTimeSetBool.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeSetEnmity.cs | 17 + .../XMainClient/AI/AIRunTimeSetEnmity.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeSetFloat.cs | 28 + .../XMainClient/AI/AIRunTimeSetFloat.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeSetInt.cs | 28 + .../Scripts/XMainClient/AI/AIRunTimeSetInt.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeStatusIdle.cs | 17 + .../XMainClient/AI/AIRunTimeStatusIdle.cs.meta | 12 + .../XMainClient/AI/AIRunTimeTargetByHatredList.cs | 22 + .../AI/AIRunTimeTargetByHatredList.cs.meta | 12 + .../XMainClient/AI/AIRunTimeTargetQTEState.cs | 26 + .../XMainClient/AI/AIRunTimeTargetQTEState.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeTreeMgr.cs | 70 +++ .../XMainClient/AI/AIRunTimeTreeMgr.cs.meta | 12 + .../XMainClient/AI/AIRunTimeValueDistance.cs | 30 + .../XMainClient/AI/AIRunTimeValueDistance.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeValueFP.cs | 17 + .../XMainClient/AI/AIRunTimeValueFP.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeValueHP.cs | 24 + .../XMainClient/AI/AIRunTimeValueHP.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeValueMP.cs | 17 + .../XMainClient/AI/AIRunTimeValueMP.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRunTimeValueTarget.cs | 39 ++ .../XMainClient/AI/AIRunTimeValueTarget.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeActionMove.cs | 42 ++ .../XMainClient/AI/AIRuntimeActionMove.cs.meta | 12 + .../XMainClient/AI/AIRuntimeActionNavigation.cs | 25 + .../AI/AIRuntimeActionNavigation.cs.meta | 12 + .../XMainClient/AI/AIRuntimeActionRotate.cs | 27 + .../XMainClient/AI/AIRuntimeActionRotate.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeAddBuff.cs | 39 ++ .../XMainClient/AI/AIRuntimeAddBuff.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeCallMonster.cs | 111 ++++ .../XMainClient/AI/AIRuntimeCallMonster.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeCallScript.cs | 25 + .../XMainClient/AI/AIRuntimeCallScript.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeCancelSkill.cs | 17 + .../XMainClient/AI/AIRuntimeCancelSkill.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeCastDash.cs | 18 + .../XMainClient/AI/AIRuntimeCastDash.cs.meta | 12 + .../XMainClient/AI/AIRuntimeDetectEnemyInRange.cs | 17 + .../AI/AIRuntimeDetectEnemyInRange.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeDoCastSkill.cs | 21 + .../XMainClient/AI/AIRuntimeDoCastSkill.cs.meta | 12 + .../AI/AIRuntimeDoSelectSkillInOrder.cs | 18 + .../AI/AIRuntimeDoSelectSkillInOrder.cs.meta | 12 + .../XMainClient/AI/AIRuntimeDoSelectSkillRandom.cs | 18 + .../AI/AIRuntimeDoSelectSkillRandom.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeFilterSkill.cs | 82 +++ .../XMainClient/AI/AIRuntimeFilterSkill.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeKillMonster.cs | 12 + .../XMainClient/AI/AIRuntimeKillMonster.cs.meta | 12 + .../XMainClient/AI/AIRuntimeMixMonsterPos.cs | 12 + .../XMainClient/AI/AIRuntimeMixMonsterPos.cs.meta | 12 + .../XMainClient/AI/AIRuntimeMoveStratage.cs | 17 + .../XMainClient/AI/AIRuntimeMoveStratage.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeNavToTarget.cs | 74 +++ .../XMainClient/AI/AIRuntimeNavToTarget.cs.meta | 12 + .../XMainClient/AI/AIRuntimePhysicalAttack.cs | 21 + .../XMainClient/AI/AIRuntimePhysicalAttack.cs.meta | 12 + .../XMainClient/AI/AIRuntimeReceiveAIEvent.cs | 104 ++++ .../XMainClient/AI/AIRuntimeReceiveAIEvent.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeRemoveBuff.cs | 12 + .../XMainClient/AI/AIRuntimeRemoveBuff.cs.meta | 12 + .../XMainClient/AI/AIRuntimeRemoveSceneBuff.cs | 17 + .../AI/AIRuntimeRemoveSceneBuff.cs.meta | 12 + .../XMainClient/AI/AIRuntimeRotateToTarget.cs | 18 + .../XMainClient/AI/AIRuntimeRotateToTarget.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeSendAIEvent.cs | 45 ++ .../XMainClient/AI/AIRuntimeSendAIEvent.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeSetDest.cs | 170 ++++++ .../XMainClient/AI/AIRuntimeSetDest.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeTryCastQTE.cs | 18 + .../XMainClient/AI/AIRuntimeTryCastQTE.cs.meta | 12 + .../Scripts/XMainClient/AI/AIRuntimeXHashFunc.cs | 17 + .../XMainClient/AI/AIRuntimeXHashFunc.cs.meta | 12 + 184 files changed, 4986 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIMsgTarget.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIMsgTarget.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeBoolComparison.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeBoolComparison.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeCalDistance.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeCalDistance.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeCompareTo.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeCompareTo.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionMonsterNum.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionMonsterNum.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionPlayerNum.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionPlayerNum.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionalEvaluator.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionalEvaluator.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeDecorationNode.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeDecorationNode.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeDetectEnimyInSight.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeDetectEnimyInSight.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectFarthest.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectFarthest.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectNearest.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectNearest.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindNavPath.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindNavPath.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByDist.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByDist.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByHitLevel.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByHitLevel.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatComparison.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatComparison.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatOperator.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatOperator.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeGetRealtimeSinceStartup.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeGetRealtimeSinceStartup.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntComparison.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntComparison.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntOperator.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntOperator.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeInverter.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeInverter.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsCastingSkill.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsCastingSkill.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFighting.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFighting.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFixedInCd.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFixedInCd.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsHurtOppo.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsHurtOppo.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsOppoCastingSkill.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsOppoCastingSkill.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsQTEState.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsQTEState.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsTargetImmortal.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsTargetImmortal.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsWander.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsWander.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeLog.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeLog.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeLogicNode.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeLogicNode.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeAction.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeAction.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeBase.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeBase.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeCondition.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeCondition.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomEntityPos.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomEntityPos.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomFloat.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomFloat.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomIndex.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomIndex.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSelectorNode.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSelectorNode.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSequenceNode.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSequenceNode.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetHartedList.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetHartedList.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetTargets.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetTargets.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnFailure.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnFailure.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnSuccess.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnSuccess.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRootNode.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeRootNode.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectBuffTarget.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectBuffTarget.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectItemTarget.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectItemTarget.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectNonHartedList.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectNonHartedList.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectTargetBySkillCircle.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectTargetBySkillCircle.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectorNode.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectorNode.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSequenceNode.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSequenceNode.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetBool.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetBool.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetEnmity.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetEnmity.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetFloat.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetFloat.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetInt.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetInt.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeStatusIdle.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeStatusIdle.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetByHatredList.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetByHatredList.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetQTEState.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetQTEState.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeTreeMgr.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeTreeMgr.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueDistance.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueDistance.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueFP.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueFP.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueHP.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueHP.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueMP.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueMP.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueTarget.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueTarget.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionMove.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionMove.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionNavigation.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionNavigation.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionRotate.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionRotate.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallMonster.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallMonster.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallScript.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallScript.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeCancelSkill.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeCancelSkill.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeCastDash.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeCastDash.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeDetectEnemyInRange.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeDetectEnemyInRange.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoCastSkill.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoCastSkill.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillInOrder.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillInOrder.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillRandom.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillRandom.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeFilterSkill.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeFilterSkill.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeKillMonster.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeKillMonster.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeMixMonsterPos.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeMixMonsterPos.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeMoveStratage.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeMoveStratage.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeNavToTarget.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeNavToTarget.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimePhysicalAttack.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimePhysicalAttack.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeReceiveAIEvent.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeReceiveAIEvent.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveBuff.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveBuff.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveSceneBuff.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveSceneBuff.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeRotateToTarget.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeRotateToTarget.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeSendAIEvent.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeSendAIEvent.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeSetDest.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeSetDest.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeTryCastQTE.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeTryCastQTE.cs.meta create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeXHashFunc.cs create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeXHashFunc.cs.meta (limited to 'Client/Assets/Scripts/XMainClient/AI') diff --git a/Client/Assets/Scripts/XMainClient/AI/AIMsgTarget.cs b/Client/Assets/Scripts/XMainClient/AI/AIMsgTarget.cs new file mode 100644 index 00000000..49a1f483 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIMsgTarget.cs @@ -0,0 +1,16 @@ +using System; + +namespace XMainClient +{ + public enum AIMsgTarget + { + Ally, + Role, + Boss, + Monster, + Enemy, + All, + LevelMgr, + GlobalAI + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIMsgTarget.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIMsgTarget.cs.meta new file mode 100644 index 00000000..0b186672 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIMsgTarget.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bcead96d163952f49b0886ce9ac3ab02 +timeCreated: 1611404449 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs b/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs new file mode 100644 index 00000000..525f4e19 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs @@ -0,0 +1,668 @@ +using System; +using System.Collections.Generic; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AINodeFactory + { + private static Dictionary _node_dic = new Dictionary(); + + public static AIRunTimeNodeBase CreateAINodeByName(string nodeName, XmlElement xmlNode) + { + bool flag = nodeName == "Selector"; + AIRunTimeNodeBase result; + if (flag) + { + result = new AIRunTimeSelectorNode(xmlNode); + } + else + { + bool flag2 = nodeName == "Sequence"; + if (flag2) + { + result = new AIRunTimeSequenceNode(xmlNode); + } + else + { + bool flag3 = nodeName == "RandomSequence"; + if (flag3) + { + result = new AIRunTimeRandomSequenceNode(xmlNode); + } + else + { + bool flag4 = nodeName == "RandomSelector"; + if (flag4) + { + result = new AIRunTimeRandomSelectorNode(xmlNode); + } + else + { + bool flag5 = nodeName == "Inverter"; + if (flag5) + { + result = new AIRunTimeInverter(xmlNode); + } + else + { + bool flag6 = nodeName == "EntryTask"; + if (flag6) + { + result = new AIRunTimeEntryTaskNode(xmlNode); + } + else + { + bool flag7 = nodeName == "ReturnSuccess"; + if (flag7) + { + result = new AIRunTimeReturnSuccess(xmlNode); + } + else + { + bool flag8 = nodeName == "ReturnFailure"; + if (flag8) + { + result = new AIRunTimeReturnFailure(xmlNode); + } + else + { + bool flag9 = nodeName == "ConditionalEvaluator"; + if (flag9) + { + result = new AIRunTimeConditionalEvaluator(xmlNode); + } + else + { + bool flag10 = nodeName == "Log"; + if (flag10) + { + result = new AIRunTimeLog(xmlNode); + } + else + { + bool flag11 = nodeName == "RandomFloat"; + if (flag11) + { + result = new AIRunTimeRandomFloat(xmlNode); + } + else + { + bool flag12 = nodeName == "FloatOperator"; + if (flag12) + { + result = new AIRunTimeFloatOperator(xmlNode); + } + else + { + bool flag13 = nodeName == "FloatComparison"; + if (flag13) + { + result = new AIRunTimeFloatComparison(xmlNode); + } + else + { + bool flag14 = nodeName == "SetFloat"; + if (flag14) + { + result = new AIRunTimeSetFloat(xmlNode); + } + else + { + bool flag15 = nodeName == "SetBool"; + if (flag15) + { + result = new AIRunTimeSetBool(xmlNode); + } + else + { + bool flag16 = nodeName == "CompareTo"; + if (flag16) + { + result = new AIRunTimeCompareTo(xmlNode); + } + else + { + bool flag17 = nodeName == "SetInt"; + if (flag17) + { + result = new AIRunTimeSetInt(xmlNode); + } + else + { + bool flag18 = nodeName == "IntComparison"; + if (flag18) + { + result = new AIRunTimeIntComparison(xmlNode); + } + else + { + bool flag19 = nodeName == "IntOperator"; + if (flag19) + { + result = new AIRunTimeIntOperator(xmlNode); + } + else + { + bool flag20 = nodeName == "BoolComparison"; + if (flag20) + { + result = new AIRunTimeBoolComparison(xmlNode); + } + else + { + bool flag21 = nodeName == "ValueTarget"; + if (flag21) + { + result = new AIRunTimeValueTarget(xmlNode); + } + else + { + bool flag22 = nodeName == "ValueDistance"; + if (flag22) + { + result = new AIRunTimeValueDistance(xmlNode); + } + else + { + bool flag23 = nodeName == "ValueHP"; + if (flag23) + { + result = new AIRunTimeValueHP(xmlNode); + } + else + { + bool flag24 = nodeName == "ValueMP"; + if (flag24) + { + result = new AIRunTimeValueMP(xmlNode); + } + else + { + bool flag25 = nodeName == "ValueFP"; + if (flag25) + { + result = new AIRunTimeValueFP(xmlNode); + } + else + { + bool flag26 = nodeName == "StatusIdle"; + if (flag26) + { + result = new AIRunTimeStatusIdle(xmlNode); + } + else + { + bool flag27 = nodeName == "NavToTarget"; + if (flag27) + { + result = new AIRuntimeNavToTarget(xmlNode); + } + else + { + bool flag28 = nodeName == "PhysicalAttack"; + if (flag28) + { + result = new AIRuntimePhysicalAttack(xmlNode); + } + else + { + bool flag29 = nodeName == "TargetByHatredList"; + if (flag29) + { + result = new AIRunTimeTargetByHatredList(xmlNode); + } + else + { + bool flag30 = nodeName == "FindTargetByDistance"; + if (flag30) + { + result = new AIRunTimeFindTargetByDist(xmlNode); + } + else + { + bool flag31 = nodeName == "TryCastQTE"; + if (flag31) + { + result = new AIRuntimeTryCastQTE(xmlNode); + } + else + { + bool flag32 = nodeName == "CastDash"; + if (flag32) + { + result = new AIRuntimeCastDash(xmlNode); + } + else + { + bool flag33 = nodeName == "IsOppoCastingSkill"; + if (flag33) + { + result = new AIRunTimeIsOppoCastingSkill(xmlNode); + } + else + { + bool flag34 = nodeName == "IsHurtOppo"; + if (flag34) + { + result = new AIRunTimeIsHurtOppo(xmlNode); + } + else + { + bool flag35 = nodeName == "IsFixedInCd"; + if (flag35) + { + result = new AIRunTimeIsFixedInCd(xmlNode); + } + else + { + bool flag36 = nodeName == "IsWander"; + if (flag36) + { + result = new AIRunTimeIsWander(xmlNode); + } + else + { + bool flag37 = nodeName == "IsCastingSkill"; + if (flag37) + { + result = new AIRunTimeIsCastingSkill(xmlNode); + } + else + { + bool flag38 = nodeName == "IsQTEState"; + if (flag38) + { + result = new AIRunTimeIsQTEState(xmlNode); + } + else + { + bool flag39 = nodeName == "DetectEnimyInSight"; + if (flag39) + { + result = new AIRunTimeDetectEnimyInSight(xmlNode); + } + else + { + bool flag40 = nodeName == "FindTargetByHitLevel"; + if (flag40) + { + result = new AIRunTimeFindTargetByHitLevel(xmlNode); + } + else + { + bool flag41 = nodeName == "IsFighting"; + if (flag41) + { + result = new AIRunTimeIsFighting(xmlNode); + } + else + { + bool flag42 = nodeName == "DoSelectNearest"; + if (flag42) + { + result = new AIRunTimeDoSelectNearest(xmlNode); + } + else + { + bool flag43 = nodeName == "FilterSkill"; + if (flag43) + { + result = new AIRuntimeFilterSkill(xmlNode); + } + else + { + bool flag44 = nodeName == "DoSelectSkillInOrder"; + if (flag44) + { + result = new AIRuntimeDoSelectSkillInOrder(xmlNode); + } + else + { + bool flag45 = nodeName == "DoSelectSkillRandom"; + if (flag45) + { + result = new AIRuntimeDoSelectSkillRandom(xmlNode); + } + else + { + bool flag46 = nodeName == "DoCastSkill"; + if (flag46) + { + result = new AIRuntimeDoCastSkill(xmlNode); + } + else + { + bool flag47 = nodeName == "SetDest"; + if (flag47) + { + result = new AIRuntimeSetDest(xmlNode); + } + else + { + bool flag48 = nodeName == "ActionMove"; + if (flag48) + { + result = new AIRuntimeActionMove(xmlNode); + } + else + { + bool flag49 = nodeName == "ActionRotate"; + if (flag49) + { + result = new AIRuntimeActionRotate(xmlNode); + } + else + { + bool flag50 = nodeName == "FindNavPath"; + if (flag50) + { + result = new AIRunTimeFindNavPath(xmlNode); + } + else + { + bool flag51 = nodeName == "ReceiveAIEvent"; + if (flag51) + { + result = new AIRuntimeReceiveAIEvent(xmlNode); + } + else + { + bool flag52 = nodeName == "SendAIEvent"; + if (flag52) + { + result = new AIRuntimeSendAIEvent(xmlNode); + } + else + { + bool flag53 = nodeName == "SelectMoveTargetById"; + if (flag53) + { + result = new AIRunTimeSelectMoveTargetById(xmlNode); + } + else + { + bool flag54 = nodeName == "SelectItemTarget"; + if (flag54) + { + result = new AIRunTimeSelectItemTarget(xmlNode); + } + else + { + bool flag55 = nodeName == "SelectBuffTarget"; + if (flag55) + { + result = new AIRunTimeSelectBuffTarget(xmlNode); + } + else + { + bool flag56 = nodeName == "SelectTargetBySkillCircle"; + if (flag56) + { + result = new AIRunTimeSelectTargetBySkillCircle(xmlNode); + } + else + { + bool flag57 = nodeName == "SelectNonHartedList"; + if (flag57) + { + result = new AIRunTimeSelectNonHartedList(xmlNode); + } + else + { + bool flag58 = nodeName == "TargetQTEState"; + if (flag58) + { + result = new AIRunTimeTargetQTEState(xmlNode); + } + else + { + bool flag59 = nodeName == "ResetTargets"; + if (flag59) + { + result = new AIRunTimeResetTargets(xmlNode); + } + else + { + bool flag60 = nodeName == "CallMonster"; + if (flag60) + { + result = new AIRuntimeCallMonster(xmlNode); + } + else + { + bool flag61 = nodeName == "MixMonsterPos"; + if (flag61) + { + result = new AIRuntimeMixMonsterPos(xmlNode); + } + else + { + bool flag62 = nodeName == "KillMonster"; + if (flag62) + { + result = new AIRuntimeKillMonster(xmlNode); + } + else + { + bool flag63 = nodeName == "ConditionMonsterNum"; + if (flag63) + { + result = new AIRunTimeConditionMonsterNum(xmlNode); + } + else + { + bool flag64 = nodeName == "AddBuff"; + if (flag64) + { + result = new AIRuntimeAddBuff(xmlNode); + } + else + { + bool flag65 = nodeName == "RemoveBuff"; + if (flag65) + { + result = new AIRuntimeRemoveBuff(xmlNode); + } + else + { + bool flag66 = nodeName == "CallScript"; + if (flag66) + { + result = new AIRuntimeCallScript(xmlNode); + } + else + { + bool flag67 = nodeName == "IsTargetImmortal"; + if (flag67) + { + result = new AIRunTimeIsTargetImmortal(xmlNode); + } + else + { + bool flag68 = nodeName == "DetectEnemyInRange"; + if (flag68) + { + result = new AIRuntimeDetectEnemyInRange(xmlNode); + } + else + { + bool flag69 = nodeName == "StopCastingSkill"; + if (flag69) + { + result = new AIRuntimeCancelSkill(xmlNode); + } + else + { + bool flag70 = nodeName == "XHashFunc"; + if (flag70) + { + result = new AIRuntimeXHashFunc(xmlNode); + } + else + { + bool flag71 = nodeName == "RemoveSceneBuff"; + if (flag71) + { + result = new AIRuntimeRemoveSceneBuff(xmlNode); + } + else + { + bool flag72 = nodeName == "CalDistance"; + if (flag72) + { + result = new AIRunTimeCalDistance(xmlNode); + } + else + { + bool flag73 = nodeName == "Navigation"; + if (flag73) + { + result = new AIRuntimeActionNavigation(xmlNode); + } + else + { + bool flag74 = nodeName == "RotateToTarget"; + if (flag74) + { + result = new AIRuntimeRotateToTarget(xmlNode); + } + else + { + bool flag75 = nodeName == "MoveStratage"; + if (flag75) + { + result = new AIRuntimeMoveStratage(xmlNode); + } + else + { + bool flag76 = nodeName == "GetRealtimeSinceStartup"; + if (flag76) + { + result = new AIRunTimeGetRealtimeSinceStartup(xmlNode); + } + else + { + bool flag77 = nodeName == "RandomEntityPos"; + if (flag77) + { + result = new AIRunTimeRandomEntityPos(xmlNode); + } + else + { + bool flag78 = nodeName == "ConditionPlayerNum"; + if (flag78) + { + result = new AIRunTimeConditionPlayerNum(xmlNode); + } + else + { + bool flag79 = nodeName == "DoSelectFarthest"; + if (flag79) + { + result = new AIRunTimeDoSelectFarthest(xmlNode); + } + else + { + bool flag80 = nodeName == "SelectPlayerFromList"; + if (flag80) + { + result = new SelectPlayerFromList(xmlNode); + } + else + { + bool flag81 = nodeName == "SetEnmity"; + if (flag81) + { + result = new AIRunTimeSetEnmity(xmlNode); + } + else + { + XSingleton.singleton.AddErrorLog("Can't find node: ", nodeName, null, null, null, null); + result = new AIRunTimeNodeBase(xmlNode); + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs.meta new file mode 100644 index 00000000..b7a336cd --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 88360f2f162677a4386c1650b9b9b881 +timeCreated: 1611404083 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs new file mode 100644 index 00000000..56b54daa --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs @@ -0,0 +1,151 @@ +using System; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeBehaviorTree : IXBehaviorTree, IXInterface + { + public XEntity Host + { + get + { + return this._host; + } + set + { + this._host = value; + } + } + + public AIRunTimeRootNode Root + { + get + { + return this._root; + } + set + { + this._root = value; + } + } + + public SharedData Data + { + get + { + return this._data; + } + } + + public bool Deprecated { get; set; } + + private AIRunTimeRootNode _root = null; + + private SharedData _data = null; + + private string _tree_name; + + private XEntity _host = null; + + private bool _enable = false; + + public bool SetBehaviorTree(string name) + { + bool flag = string.IsNullOrEmpty(name); + bool result; + if (flag) + { + result = false; + } + else + { + this._tree_name = name; + this._root = XSingleton.singleton.GetBehavior(name); + this._data = this.DeepClone(this._root.Data); + this._data.SetBoolByName("IsFighting", true); + this._data.SetBoolByName("HitStatus", true); + result = true; + } + return result; + } + + public SharedData DeepClone(SharedData source) + { + return new SharedData(source); + } + + public void OnStartSkill(uint skillid) + { + } + + public void OnEndSkill(uint skillid) + { + } + + public void OnSkillHurt() + { + } + + public void EnableBehaviorTree(bool enable) + { + this._enable = enable; + } + + public void SetManual(bool enable) + { + } + + public float OnGetHeartRate() + { + return this._data.GetFloatByName("heartrate", 0f); + } + + public void TickBehaviorTree() + { + bool enable = this._enable; + if (enable) + { + this._root.Update(this._host); + } + } + + public void SetNavPoint(Transform navpoint) + { + } + + public void SetIntByName(string name, int value) + { + this._data.SetIntByName(name, value); + } + + public void SetFloatByName(string name, float value) + { + this._data.SetFloatByName(name, value); + } + + public void SetBoolByName(string name, bool value) + { + this._data.SetBoolByName(name, value); + } + + public void SetVector3ByName(string name, Vector3 value) + { + this._data.SetVector3ByName(name, value); + } + + public void SetTransformByName(string name, Transform value) + { + this._data.SetTransformByName(name, value); + } + + public void SetXGameObjectByName(string name, XGameObject value) + { + this._data.SetXGameObjectByName(name, value); + } + + public void SetVariable(string name, object value) + { + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs.meta new file mode 100644 index 00000000..bc595340 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 23cc5c8c54a394241b4c64501c9a0a41 +timeCreated: 1611403457 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBoolComparison.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBoolComparison.cs new file mode 100644 index 00000000..d84db026 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBoolComparison.cs @@ -0,0 +1,31 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeBoolComparison : AIRunTimeNodeAction + { + private string _bool_name1; + + private bool _bool_value1; + + private string _bool_name2; + + private bool _bool_value2; + + public AIRunTimeBoolComparison(XmlElement node) : base(node) + { + this._bool_name1 = node.GetAttribute("Shared_Bool1Name"); + this._bool_value1 = (node.GetAttribute("bool1Value") != "0"); + this._bool_name2 = node.GetAttribute("Shared_Bool2Name"); + this._bool_value2 = (node.GetAttribute("bool2Value") != "0"); + } + + public override bool Update(XEntity entity) + { + bool boolByName = entity.AI.AIData.GetBoolByName(this._bool_name1, this._bool_value1); + bool boolByName2 = entity.AI.AIData.GetBoolByName(this._bool_name2, this._bool_value2); + return boolByName == boolByName2; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBoolComparison.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBoolComparison.cs.meta new file mode 100644 index 00000000..9e47d62f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBoolComparison.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c68533b8667ddfc46ae784e96a85ad7f +timeCreated: 1611404509 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCalDistance.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCalDistance.cs new file mode 100644 index 00000000..15128c30 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCalDistance.cs @@ -0,0 +1,59 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeCalDistance : AIRunTimeNodeAction + { + private string _target_name; + + private float _distance; + + private string _distance_name; + + private Vector3 _dest_point; + + private string _dest_name; + + public AIRunTimeCalDistance(XmlElement node) : base(node) + { + this._target_name = node.GetAttribute("Shared_ObjectName"); + this._distance = float.Parse(node.GetAttribute("Shared_DistancemValue")); + this._distance_name = node.GetAttribute("Shared_DistanceName"); + this._dest_name = node.GetAttribute("Shared_DestPointName"); + string attribute = node.GetAttribute("Shared_DestPointmValue"); + float num = float.Parse(attribute.Split(new char[] + { + ':' + })[0]); + float num2 = float.Parse(attribute.Split(new char[] + { + ':' + })[1]); + float num3 = float.Parse(attribute.Split(new char[] + { + ':' + })[2]); + this._dest_point = new Vector3(num, num2, num3); + } + + public override bool Update(XEntity entity) + { + XGameObject xgameObjectByName = entity.AI.AIData.GetXGameObjectByName(this._target_name); + bool flag = xgameObjectByName != null; + float magnitude; + if (flag) + { + magnitude = (entity.EngineObject.Position - xgameObjectByName.Position).magnitude; + } + else + { + magnitude = (entity.EngineObject.Position - this._dest_point).magnitude; + } + entity.AI.AIData.SetFloatByName(this._distance_name, magnitude); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCalDistance.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCalDistance.cs.meta new file mode 100644 index 00000000..157366eb --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCalDistance.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 080193f69eb7cb74b8fc1b601805e911 +timeCreated: 1611402969 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCompareTo.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCompareTo.cs new file mode 100644 index 00000000..5724d626 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCompareTo.cs @@ -0,0 +1,54 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeCompareTo : AIRunTimeNodeAction + { + private string _first_string_name; + + private string _first_string_value; + + private string _second_string_name; + + private string _second_string_value; + + private string _store_result_name; + + public AIRunTimeCompareTo(XmlElement node) : base(node) + { + this._first_string_name = node.GetAttribute("Shared_FirstStringName"); + this._first_string_value = node.GetAttribute("firstString"); + this._second_string_name = node.GetAttribute("Shared_SecondStringName"); + this._second_string_value = node.GetAttribute("secondString"); + this._store_result_name = node.GetAttribute("Shared_ResultName"); + } + + public override bool Update(XEntity entity) + { + string stringByName = entity.AI.AIData.GetStringByName(this._first_string_name, this._first_string_value); + string stringByName2 = entity.AI.AIData.GetStringByName(this._second_string_name, this._second_string_value); + int num = stringByName.CompareTo(stringByName2); + bool flag = num > 0; + int para; + if (flag) + { + para = 1; + } + else + { + bool flag2 = num < 0; + if (flag2) + { + para = -1; + } + else + { + para = 0; + } + } + entity.AI.AIData.SetIntByName(this._store_result_name, para); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCompareTo.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCompareTo.cs.meta new file mode 100644 index 00000000..8a933e17 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeCompareTo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e1b49121526163f408d649cba844b5bc +timeCreated: 1611404703 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionMonsterNum.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionMonsterNum.cs new file mode 100644 index 00000000..2cbb02bf --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionMonsterNum.cs @@ -0,0 +1,12 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeConditionMonsterNum : AIRunTimeNodeCondition + { + public AIRunTimeConditionMonsterNum(XmlElement node) : base(node) + { + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionMonsterNum.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionMonsterNum.cs.meta new file mode 100644 index 00000000..7d8db337 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionMonsterNum.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d4eaebbdafc8cfc41863f3d553ea0455 +timeCreated: 1611404605 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionPlayerNum.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionPlayerNum.cs new file mode 100644 index 00000000..b16a75ee --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionPlayerNum.cs @@ -0,0 +1,123 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeConditionPlayerNum : AIRunTimeNodeCondition + { + private int _base_prof; + + private int _detail_prof; + + private string _num_name; + + private int _num; + + private int _way; + + private Vector3 _center; + + private float _sqrRadius; + + public AIRunTimeConditionPlayerNum(XmlElement node) : base(node) + { + this._base_prof = int.Parse(node.GetAttribute("PlayerBaseProf")); + this._detail_prof = int.Parse(node.GetAttribute("PlayerDetailProf")); + this._num_name = node.GetAttribute("Shared_NumName"); + this._num = int.Parse(node.GetAttribute("Shared_NummValue")); + string attribute = node.GetAttribute("Way"); + bool flag = string.IsNullOrEmpty(attribute); + if (flag) + { + this._way = 0; + } + else + { + this._way = int.Parse(attribute); + } + attribute = node.GetAttribute("Center"); + bool flag2 = string.IsNullOrEmpty(attribute); + if (flag2) + { + this._center = Vector3.zero; + } + else + { + string[] array = attribute.Split(new char[] + { + ':' + }); + this._center = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); + } + attribute = node.GetAttribute("Radius"); + bool flag3 = string.IsNullOrEmpty(attribute); + if (flag3) + { + this._sqrRadius = 0f; + } + else + { + this._sqrRadius = float.Parse(attribute); + this._sqrRadius *= this._sqrRadius; + } + } + + public override bool Update(XEntity entity) + { + int playerProf = XSingleton.singleton.GetPlayerProf(); + entity.AI.AIData.SetIntByName(this._num_name, 0); + bool flag = this._base_prof != 0 || this._detail_prof != 0; + if (flag) + { + bool flag2 = this._base_prof != 0 && playerProf % 10 != this._base_prof; + if (flag2) + { + return true; + } + bool flag3 = this._detail_prof != 0 && playerProf != this._detail_prof; + if (flag3) + { + return true; + } + } + bool flag4 = this._way != 0; + if (flag4) + { + bool flag5 = XSingleton.singleton.Player == null; + if (flag5) + { + return true; + } + bool flag6 = this._way == 1 && XSingleton.singleton.Player.IsDead; + if (flag6) + { + return true; + } + bool flag7 = this._way == 2 && !XSingleton.singleton.Player.IsDead; + if (flag7) + { + return true; + } + } + bool flag8 = this._sqrRadius > 0f; + if (flag8) + { + bool flag9 = XSingleton.singleton.Player == null; + if (flag9) + { + return true; + } + float sqrMagnitude = (XSingleton.singleton.Player.MoveObj.Position - this._center).sqrMagnitude; + bool flag10 = sqrMagnitude > this._sqrRadius; + if (flag10) + { + return true; + } + } + entity.AI.AIData.SetIntByName(this._num_name, 1); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionPlayerNum.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionPlayerNum.cs.meta new file mode 100644 index 00000000..0196efe0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionPlayerNum.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 190e3e8a2a7f618468f6bf00c249bbb9 +timeCreated: 1611403299 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionalEvaluator.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionalEvaluator.cs new file mode 100644 index 00000000..2a657e57 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionalEvaluator.cs @@ -0,0 +1,67 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeConditionalEvaluator : AIRunTimeDecorationNode + { + public string ConditionNodeName + { + get + { + return this._condition_node_name; + } + } + + private string _condition_node_name; + + private AIRunTimeNodeBase _condition_node; + + public AIRunTimeConditionalEvaluator(XmlElement node) : base(node) + { + this._condition_node_name = node.GetAttribute("ConditionalTask"); + } + + public bool AddConditionNode(AIRunTimeNodeBase node) + { + bool flag = this._condition_node != null; + bool result; + if (flag) + { + XSingleton.singleton.AddErrorLog("ConditionNode already contain condition node", null, null, null, null, null); + result = false; + } + else + { + this._condition_node = node; + result = true; + } + return result; + } + + public override bool Update(XEntity entity) + { + bool flag = this._condition_node != null; + bool result; + if (flag) + { + bool flag2 = !this._condition_node.Update(entity); + if (flag2) + { + result = false; + } + else + { + bool flag3 = this._child_node != null; + result = (flag3 && this._child_node.Update(entity)); + } + } + else + { + result = false; + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionalEvaluator.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionalEvaluator.cs.meta new file mode 100644 index 00000000..c96ef18c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeConditionalEvaluator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0d198048312d1dd479fe41d6edb17f18 +timeCreated: 1611403192 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDecorationNode.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDecorationNode.cs new file mode 100644 index 00000000..ce4b3d5e --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDecorationNode.cs @@ -0,0 +1,20 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeDecorationNode : AIRunTimeNodeBase + { + protected AIRunTimeNodeBase _child_node = null; + + public AIRunTimeDecorationNode(XmlElement node) : base(node) + { + this._type = NodeType.NODE_TYPE_DECORATION; + } + + public override void AddChild(AIRunTimeNodeBase child) + { + this._child_node = child; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDecorationNode.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDecorationNode.cs.meta new file mode 100644 index 00000000..ee1323c9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDecorationNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 36c7ddac0b928554788beadda2945c02 +timeCreated: 1611403563 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDetectEnimyInSight.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDetectEnimyInSight.cs new file mode 100644 index 00000000..ef420dbb --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDetectEnimyInSight.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeDetectEnimyInSight : AIRunTimeNodeAction + { + public AIRunTimeDetectEnimyInSight(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.DetectEnimyInSight(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDetectEnimyInSight.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDetectEnimyInSight.cs.meta new file mode 100644 index 00000000..4177fe27 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDetectEnimyInSight.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 288b240e348eed848a814754bd69a5c6 +timeCreated: 1611403475 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectFarthest.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectFarthest.cs new file mode 100644 index 00000000..9673e693 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectFarthest.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeDoSelectFarthest : AIRunTimeNodeAction + { + public AIRunTimeDoSelectFarthest(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.DoSelectFarthest(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectFarthest.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectFarthest.cs.meta new file mode 100644 index 00000000..2ea7cda0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectFarthest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1d7d8d7c50a64934593204cdc0c8bdda +timeCreated: 1611403354 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectNearest.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectNearest.cs new file mode 100644 index 00000000..6f7edd87 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectNearest.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeDoSelectNearest : AIRunTimeNodeAction + { + public AIRunTimeDoSelectNearest(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.DoSelectNearest(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectNearest.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectNearest.cs.meta new file mode 100644 index 00000000..7ecf680e --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeDoSelectNearest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bdbdd3f6dd308954a98f32d01285e7ec +timeCreated: 1611404456 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs new file mode 100644 index 00000000..1dddd659 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs @@ -0,0 +1,62 @@ +using System; +using System.Xml; +using UnityEngine; + +namespace XMainClient +{ + internal class AIRunTimeEntryTaskNode : AIRunTimeRootNode + { + public AIRunTimeEntryTaskNode(XmlElement node) : base(node) + { + for (int i = 0; i < node.Attributes.Count; i++) + { + bool flag = node.Attributes[i].Name.Length >= 3; + if (flag) + { + string name = node.Attributes[i].Name.Substring(2); + bool flag2 = node.Attributes[i].Name.StartsWith("F_"); + if (flag2) + { + base.Data.SetFloatByName(name, float.Parse(node.Attributes[i].Value)); + } + else + { + bool flag3 = node.Attributes[i].Name.StartsWith("S_"); + if (flag3) + { + base.Data.SetStringByName(name, node.Attributes[i].Value); + } + else + { + bool flag4 = node.Attributes[i].Name.StartsWith("I_"); + if (flag4) + { + base.Data.SetIntByName(name, int.Parse(node.Attributes[i].Value)); + } + else + { + bool flag5 = node.Attributes[i].Name.StartsWith("B_"); + if (flag5) + { + base.Data.SetBoolByName(name, node.Attributes[i].Value != "0"); + } + else + { + bool flag6 = node.Attributes[i].Name.StartsWith("V_"); + if (flag6) + { + string[] array = node.Attributes[i].Value.Split(new char[] + { + ':' + }); + base.Data.SetVector3ByName(name, new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2]))); + } + } + } + } + } + } + } + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs.meta new file mode 100644 index 00000000..74387868 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e4bf201d138731540bf5b3b66ab303f0 +timeCreated: 1611404740 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindNavPath.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindNavPath.cs new file mode 100644 index 00000000..bc166ad1 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindNavPath.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeFindNavPath : AIRunTimeNodeAction + { + public AIRunTimeFindNavPath(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.FindNavPath(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindNavPath.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindNavPath.cs.meta new file mode 100644 index 00000000..42bd20d8 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindNavPath.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3000ba2725ee3114e9615685784015c9 +timeCreated: 1611403520 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByDist.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByDist.cs new file mode 100644 index 00000000..ad5a6af4 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByDist.cs @@ -0,0 +1,53 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeFindTargetByDist : AIRunTimeNodeAction + { + private string _distance_name; + + private float _distance; + + private bool _filter_immortal; + + private float _angle; + + private float _delta; + + private int _targettype; + + public AIRunTimeFindTargetByDist(XmlElement node) : base(node) + { + this._distance_name = node.GetAttribute("Shared_DistanceName"); + this._distance = float.Parse(node.GetAttribute("Shared_DistancemValue")); + string attribute = node.GetAttribute("FilterImmortal"); + string attribute2 = node.GetAttribute("TargetType"); + string attribute3 = node.GetAttribute("Angle"); + bool flag = !float.TryParse(attribute3, out this._angle); + if (flag) + { + this._angle = 180f; + } + string attribute4 = node.GetAttribute("Delta"); + bool flag2 = !float.TryParse(attribute4, out this._delta); + if (flag2) + { + this._delta = 0f; + } + bool.TryParse(attribute, out this._filter_immortal); + bool flag3 = !int.TryParse(attribute2, out this._targettype); + if (flag3) + { + this._targettype = 0; + } + } + + public override bool Update(XEntity entity) + { + float floatByName = entity.AI.AIData.GetFloatByName(this._distance_name, this._distance); + return XSingleton.singleton.FindTargetByDistance(entity, floatByName, this._filter_immortal, this._angle, this._delta, this._targettype); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByDist.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByDist.cs.meta new file mode 100644 index 00000000..f91fe9a0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByDist.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: caa96f3df28a96f439f885b8b6aeb071 +timeCreated: 1611404543 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByHitLevel.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByHitLevel.cs new file mode 100644 index 00000000..efc2e28d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByHitLevel.cs @@ -0,0 +1,24 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeFindTargetByHitLevel : AIRunTimeNodeAction + { + private bool _filter_immortal; + + public AIRunTimeFindTargetByHitLevel(XmlElement node) : base(node) + { + string attribute = node.GetAttribute("FilterImmortal"); + int num = 0; + int.TryParse(attribute, out num); + this._filter_immortal = (num != 0); + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.FindTargetByHitLevel(entity, this._filter_immortal); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByHitLevel.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByHitLevel.cs.meta new file mode 100644 index 00000000..a372a735 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFindTargetByHitLevel.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b32869c15955a1440980cf3f09f02f66 +timeCreated: 1611404388 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatComparison.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatComparison.cs new file mode 100644 index 00000000..1e7bcc3b --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatComparison.cs @@ -0,0 +1,78 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeFloatComparison : AIRunTimeNodeAction + { + private int _comp_type; + + private string _float_name1; + + private float _float_value1; + + private string _float_name2; + + private float _float_value2; + + public AIRunTimeFloatComparison(XmlElement node) : base(node) + { + this._float_name1 = node.GetAttribute("Shared_Float1Name"); + this._float_value1 = float.Parse(node.GetAttribute("float1Value")); + this._float_name2 = node.GetAttribute("Shared_Float2Name"); + this._float_value2 = float.Parse(node.GetAttribute("float2Value")); + this._comp_type = int.Parse(node.GetAttribute("type")); + } + + public override bool Update(XEntity entity) + { + float floatByName = entity.AI.AIData.GetFloatByName(this._float_name1, this._float_value1); + float floatByName2 = entity.AI.AIData.GetFloatByName(this._float_name2, this._float_value2); + bool flag = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_LESS_THAN); + bool result; + if (flag) + { + result = (floatByName < floatByName2); + } + else + { + bool flag2 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_LESS_OR_EQUAL_TO); + if (flag2) + { + result = (floatByName <= floatByName2); + } + else + { + bool flag3 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_EQUAL_TO); + if (flag3) + { + result = (floatByName == floatByName2); + } + else + { + bool flag4 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_NOT_EQUAL_TO); + if (flag4) + { + result = (floatByName != floatByName2); + } + else + { + bool flag5 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_GREATER_THAN); + if (flag5) + { + result = (floatByName > floatByName2); + } + else + { + bool flag6 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_GREATER_THAN_OR_EQUAL_TO); + result = (flag6 && floatByName >= floatByName2); + } + } + } + } + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatComparison.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatComparison.cs.meta new file mode 100644 index 00000000..b0211399 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatComparison.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b9a45942021e83d4c8fcca802e121534 +timeCreated: 1611404411 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatOperator.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatOperator.cs new file mode 100644 index 00000000..cbf2d1a1 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatOperator.cs @@ -0,0 +1,89 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeFloatOperator : AIRunTimeNodeAction + { + private int _operator_type; + + private string _float_name1; + + private float _float_value1; + + private string _float_name2; + + private float _float_value2; + + private string _stored_result_name; + + public AIRunTimeFloatOperator(XmlElement node) : base(node) + { + this._operator_type = int.Parse(node.GetAttribute("type")); + this._float_name1 = node.GetAttribute("Shared_Float1Name"); + this._float_value1 = float.Parse(node.GetAttribute("float1Value")); + this._float_name2 = node.GetAttribute("Shared_Float2Name"); + this._float_value2 = float.Parse(node.GetAttribute("float2Value")); + this._stored_result_name = node.GetAttribute("Shared_StoredResultName"); + } + + public override bool Update(XEntity entity) + { + float floatByName = entity.AI.AIData.GetFloatByName(this._float_name1, this._float_value1); + float floatByName2 = entity.AI.AIData.GetFloatByName(this._float_name2, this._float_value2); + float para = 0f; + bool flag = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_ADD); + if (flag) + { + para = floatByName + floatByName2; + } + else + { + bool flag2 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_SUBTRACT); + if (flag2) + { + para = floatByName - floatByName2; + } + else + { + bool flag3 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_MULTIPLY); + if (flag3) + { + para = floatByName * floatByName2; + } + else + { + bool flag4 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_DIVIDE); + if (flag4) + { + bool flag5 = floatByName2 != 0f; + if (flag5) + { + para = floatByName / floatByName2; + } + } + else + { + bool flag6 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_MIN); + if (flag6) + { + para = ((floatByName < floatByName2) ? floatByName : floatByName2); + } + else + { + bool flag7 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_MAX); + if (flag7) + { + para = ((floatByName > floatByName2) ? floatByName : floatByName2); + } + } + } + } + } + } + entity.AI.AIData.SetFloatByName(this._stored_result_name, para); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatOperator.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatOperator.cs.meta new file mode 100644 index 00000000..0d1abad0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeFloatOperator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4dfe754e451cad74ea8a3161f2b57e2e +timeCreated: 1611403697 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeGetRealtimeSinceStartup.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeGetRealtimeSinceStartup.cs new file mode 100644 index 00000000..5278a761 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeGetRealtimeSinceStartup.cs @@ -0,0 +1,25 @@ +using System; +using System.Xml; +using UnityEngine; + +namespace XMainClient +{ + internal class AIRunTimeGetRealtimeSinceStartup : AIRunTimeNodeAction + { + private string _store_res_name; + + private float _store_res; + + public AIRunTimeGetRealtimeSinceStartup(XmlElement node) : base(node) + { + this._store_res_name = node.GetAttribute("Shared_FloatstoreResultName"); + } + + public override bool Update(XEntity entity) + { + this._store_res = Time.realtimeSinceStartup; + entity.AI.AIData.SetFloatByName(this._store_res_name, this._store_res); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeGetRealtimeSinceStartup.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeGetRealtimeSinceStartup.cs.meta new file mode 100644 index 00000000..6365fd54 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeGetRealtimeSinceStartup.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fde7289be5c02cb4eac2bf7134d21d2a +timeCreated: 1611404938 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntComparison.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntComparison.cs new file mode 100644 index 00000000..137fbbf7 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntComparison.cs @@ -0,0 +1,78 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeIntComparison : AIRunTimeNodeAction + { + private int _comp_type = 0; + + private string _int_name1; + + private int _int_value1; + + private string _int_name2; + + private int _int_value2; + + public AIRunTimeIntComparison(XmlElement node) : base(node) + { + this._comp_type = int.Parse(node.GetAttribute("type")); + this._int_name1 = node.GetAttribute("Shared_Int1Name"); + this._int_value1 = int.Parse(node.GetAttribute("int1Value")); + this._int_name2 = node.GetAttribute("Shared_Int2Name"); + this._int_value2 = int.Parse(node.GetAttribute("int2Value")); + } + + public override bool Update(XEntity entity) + { + int intByName = entity.AI.AIData.GetIntByName(this._int_name1, this._int_value1); + int intByName2 = entity.AI.AIData.GetIntByName(this._int_name2, this._int_value2); + bool flag = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_LESS_THAN); + bool result; + if (flag) + { + result = (intByName < intByName2); + } + else + { + bool flag2 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_LESS_OR_EQUAL_TO); + if (flag2) + { + result = (intByName <= intByName2); + } + else + { + bool flag3 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_EQUAL_TO); + if (flag3) + { + result = (intByName == intByName2); + } + else + { + bool flag4 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_NOT_EQUAL_TO); + if (flag4) + { + result = (intByName != intByName2); + } + else + { + bool flag5 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_GREATER_THAN); + if (flag5) + { + result = (intByName > intByName2); + } + else + { + bool flag6 = this._comp_type == XFastEnumIntEqualityComparer.ToInt(ComparisonType.FCTYPE_GREATER_THAN_OR_EQUAL_TO); + result = (flag6 && intByName >= intByName2); + } + } + } + } + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntComparison.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntComparison.cs.meta new file mode 100644 index 00000000..4a1fb853 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntComparison.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 391862b8c08ec36459f35f0a94a4d408 +timeCreated: 1611403591 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntOperator.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntOperator.cs new file mode 100644 index 00000000..e2843714 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntOperator.cs @@ -0,0 +1,89 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeIntOperator : AIRunTimeNodeAction + { + private int _operator_type; + + private string _int_name1; + + private int _int_value1; + + private string _int_name2; + + private int _int_value2; + + private string _stored_result_name; + + public AIRunTimeIntOperator(XmlElement node) : base(node) + { + this._operator_type = int.Parse(node.GetAttribute("type")); + this._int_name1 = node.GetAttribute("Shared_Int1Name"); + this._int_value1 = int.Parse(node.GetAttribute("int1Value")); + this._int_name2 = node.GetAttribute("Shared_Int2Name"); + this._int_value2 = int.Parse(node.GetAttribute("int2Value")); + this._stored_result_name = node.GetAttribute("Shared_StoredResultName"); + } + + public override bool Update(XEntity entity) + { + int intByName = entity.AI.AIData.GetIntByName(this._int_name1, this._int_value1); + int intByName2 = entity.AI.AIData.GetIntByName(this._int_name2, this._int_value2); + int para = 0; + bool flag = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_ADD); + if (flag) + { + para = intByName + intByName2; + } + else + { + bool flag2 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_SUBTRACT); + if (flag2) + { + para = intByName - intByName2; + } + else + { + bool flag3 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_MULTIPLY); + if (flag3) + { + para = intByName * intByName2; + } + else + { + bool flag4 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_DIVIDE); + if (flag4) + { + bool flag5 = (float)intByName2 != 0f; + if (flag5) + { + para = intByName / intByName2; + } + else + { + bool flag6 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_MIN); + if (flag6) + { + para = ((intByName < intByName2) ? intByName : intByName2); + } + else + { + bool flag7 = this._operator_type == XFastEnumIntEqualityComparer.ToInt(FloatOperatorType.FOTYPE_MAX); + if (flag7) + { + para = ((intByName > intByName2) ? intByName : intByName2); + } + } + } + } + } + } + } + entity.AI.AIData.SetIntByName(this._stored_result_name, para); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntOperator.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntOperator.cs.meta new file mode 100644 index 00000000..a9e2bfcc --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIntOperator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 36ec3289bad67954189751ea5b89c8ae +timeCreated: 1611403563 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeInverter.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeInverter.cs new file mode 100644 index 00000000..a2b15a1c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeInverter.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeInverter : AIRunTimeDecorationNode + { + public AIRunTimeInverter(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + bool flag = this._child_node != null; + return flag && !this._child_node.Update(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeInverter.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeInverter.cs.meta new file mode 100644 index 00000000..b565f8ad --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeInverter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bad48954cf04f494f905ebcfadbfc17c +timeCreated: 1611404438 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsCastingSkill.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsCastingSkill.cs new file mode 100644 index 00000000..3c6b2ea4 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsCastingSkill.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeIsCastingSkill : AIRunTimeNodeCondition + { + public AIRunTimeIsCastingSkill(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return entity.AI.IsCastingSkill; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsCastingSkill.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsCastingSkill.cs.meta new file mode 100644 index 00000000..d09fa267 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsCastingSkill.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fdbc12c015f21ba41978e34cd4a26e36 +timeCreated: 1611404937 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFighting.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFighting.cs new file mode 100644 index 00000000..a93174b0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFighting.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeIsFighting : AIRunTimeNodeCondition + { + public AIRunTimeIsFighting(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return entity.AI.IsFighting; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFighting.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFighting.cs.meta new file mode 100644 index 00000000..e6a1a15e --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFighting.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4858b22fc9346a24fa294c5c6389e521 +timeCreated: 1611403657 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFixedInCd.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFixedInCd.cs new file mode 100644 index 00000000..9bacfde9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFixedInCd.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeIsFixedInCd : AIRunTimeNodeCondition + { + public AIRunTimeIsFixedInCd(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return entity.AI.IsFixedInCd; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFixedInCd.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFixedInCd.cs.meta new file mode 100644 index 00000000..d09f9deb --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsFixedInCd.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d29cdeaf2b223a841abb3be0bc7a18ae +timeCreated: 1611404596 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsHurtOppo.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsHurtOppo.cs new file mode 100644 index 00000000..e423f6e7 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsHurtOppo.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeIsHurtOppo : AIRunTimeNodeCondition + { + public AIRunTimeIsHurtOppo(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return entity.AI.IsHurtOppo; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsHurtOppo.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsHurtOppo.cs.meta new file mode 100644 index 00000000..3c8701fe --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsHurtOppo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9521588597a301043b36f4025e7e6f2b +timeCreated: 1611404180 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsOppoCastingSkill.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsOppoCastingSkill.cs new file mode 100644 index 00000000..1542f1ac --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsOppoCastingSkill.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeIsOppoCastingSkill : AIRunTimeNodeCondition + { + public AIRunTimeIsOppoCastingSkill(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return entity.AI.IsOppoCastingSkill; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsOppoCastingSkill.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsOppoCastingSkill.cs.meta new file mode 100644 index 00000000..5dcd88b1 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsOppoCastingSkill.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a46a0085403ba14438a595840a2ab222 +timeCreated: 1611404282 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsQTEState.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsQTEState.cs new file mode 100644 index 00000000..0972c47c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsQTEState.cs @@ -0,0 +1,25 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeIsQTEState : AIRunTimeNodeCondition + { + private int _qte_state = 0; + + public AIRunTimeIsQTEState(XmlElement node) : base(node) + { + bool flag = node.GetAttribute("QTEState") != ""; + if (flag) + { + this._qte_state = int.Parse(node.GetAttribute("QTEState")); + } + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.HasQTE(entity.ID, this._qte_state); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsQTEState.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsQTEState.cs.meta new file mode 100644 index 00000000..e5273c3d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsQTEState.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5f48a6418208d1e4fad342ab31fbeff1 +timeCreated: 1611403811 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsTargetImmortal.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsTargetImmortal.cs new file mode 100644 index 00000000..218f099d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsTargetImmortal.cs @@ -0,0 +1,23 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeIsTargetImmortal : AIRunTimeNodeCondition + { + private string _target_name; + + public AIRunTimeIsTargetImmortal(XmlElement node) : base(node) + { + this._target_name = node.GetAttribute("Shared_TargetName"); + } + + public override bool Update(XEntity entity) + { + XGameObject xgameObjectByName = entity.AI.AIData.GetXGameObjectByName(this._target_name); + bool flag = xgameObjectByName != null; + return flag && XSingleton.singleton.IsTargetImmortal(xgameObjectByName.UID); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsTargetImmortal.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsTargetImmortal.cs.meta new file mode 100644 index 00000000..e74533a1 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsTargetImmortal.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4599e2113b007a948b91ac357706162d +timeCreated: 1611403648 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsWander.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsWander.cs new file mode 100644 index 00000000..2331eac5 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsWander.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeIsWander : AIRunTimeNodeCondition + { + public AIRunTimeIsWander(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return entity.AI.IsWander; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsWander.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsWander.cs.meta new file mode 100644 index 00000000..2fc2d923 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeIsWander.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6cb032bf6b488484dbc6098943512cfe +timeCreated: 1611403899 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLog.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLog.cs new file mode 100644 index 00000000..243b2592 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLog.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeLog : AIRunTimeNodeAction + { + public AIRunTimeLog(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLog.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLog.cs.meta new file mode 100644 index 00000000..44be3424 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLog.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1d4475169f139c947974ee98dbb73977 +timeCreated: 1611403352 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLogicNode.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLogicNode.cs new file mode 100644 index 00000000..7f78dc4f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLogicNode.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeLogicNode : AIRunTimeNodeBase + { + protected List _list_node = new List(); + + public AIRunTimeLogicNode(XmlElement node) : base(node) + { + this._type = NodeType.NODE_TYPE_LOGIC; + } + + public override void AddChild(AIRunTimeNodeBase child) + { + this._list_node.Add(child); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLogicNode.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLogicNode.cs.meta new file mode 100644 index 00000000..90578b97 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeLogicNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3458a248869fb664a8b44306bddbc9eb +timeCreated: 1611403555 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeAction.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeAction.cs new file mode 100644 index 00000000..20b5f4fd --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeAction.cs @@ -0,0 +1,13 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeNodeAction : AIRunTimeNodeBase + { + public AIRunTimeNodeAction(XmlElement node) : base(node) + { + this._type = NodeType.NODE_TYPE_ACTION; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeAction.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeAction.cs.meta new file mode 100644 index 00000000..ad1b4306 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeAction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4fb76b52f3c63fe41bd781220389e96e +timeCreated: 1611403701 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeBase.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeBase.cs new file mode 100644 index 00000000..758ecbe0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeBase.cs @@ -0,0 +1,33 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeNodeBase + { + protected NodeType _type; + + public AIRunTimeNodeBase(XmlElement node) + { + this._type = NodeType.NODE_TYPE_BASE; + } + + public virtual bool Update(XEntity entity) + { + return true; + } + + public virtual void AddChild(AIRunTimeNodeBase child) + { + } + + public NodeType GetNodeType() + { + return this._type; + } + + public virtual void Print() + { + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeBase.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeBase.cs.meta new file mode 100644 index 00000000..7c596574 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6aa731744fa7f7c4691bd62d2acf1103 +timeCreated: 1611403889 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeCondition.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeCondition.cs new file mode 100644 index 00000000..6d54a94a --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeCondition.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeNodeCondition : AIRunTimeNodeBase + { + public AIRunTimeNodeCondition(XmlElement node) : base(node) + { + this._type = NodeType.NODE_TYPE_CONDITION; + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeCondition.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeCondition.cs.meta new file mode 100644 index 00000000..115f2b82 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeNodeCondition.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9336e97198032b34094863d5d7498d1d +timeCreated: 1611404150 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomEntityPos.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomEntityPos.cs new file mode 100644 index 00000000..d26c0df7 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomEntityPos.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeRandomEntityPos : AIRunTimeNodeAction + { + public AIRunTimeRandomEntityPos(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomEntityPos.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomEntityPos.cs.meta new file mode 100644 index 00000000..92714130 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomEntityPos.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bffd14c39d12dcd41a2e5dc16789b716 +timeCreated: 1611404485 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomFloat.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomFloat.cs new file mode 100644 index 00000000..e65d035e --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomFloat.cs @@ -0,0 +1,37 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeRandomFloat : AIRunTimeNodeAction + { + private float _min_value; + + private string _min_name; + + private float _max_value; + + private string _max_name; + + private string _store_result_name; + + public AIRunTimeRandomFloat(XmlElement node) : base(node) + { + this._min_value = float.Parse(node.GetAttribute("minValue")); + this._min_name = node.GetAttribute("Shared_MinName"); + this._max_value = float.Parse(node.GetAttribute("maxValue")); + this._max_name = node.GetAttribute("Shared_MaxName"); + this._store_result_name = node.GetAttribute("Shared_StoredResultName"); + } + + public override bool Update(XEntity entity) + { + float floatByName = entity.AI.AIData.GetFloatByName(this._min_name, this._min_value); + float floatByName2 = entity.AI.AIData.GetFloatByName(this._max_name, this._max_value); + float para = XSingleton.singleton.RandomFloat(floatByName, floatByName2); + entity.AI.AIData.SetFloatByName(this._store_result_name, para); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomFloat.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomFloat.cs.meta new file mode 100644 index 00000000..59df0cf9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomFloat.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fdfbaf4c5decf9749ac6a5895e64efe2 +timeCreated: 1611404938 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomIndex.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomIndex.cs new file mode 100644 index 00000000..f71486ce --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomIndex.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeRandomIndex + { + public int this[int index] + { + get + { + bool flag = index < 0 || index >= this.m_IndexList.Count; + int result; + if (flag) + { + XSingleton.singleton.AddErrorLog("Random index out of range, try get ", index.ToString(), " but length = ", this.m_IndexList.Count.ToString(), null, null); + result = 0; + } + else + { + result = this.m_IndexList[index]; + } + return result; + } + } + + private List m_IndexList = new List(); + + public void AppendIndex() + { + this.m_IndexList.Add(this.m_IndexList.Count); + } + + public void Rand() + { + for (int i = this.m_IndexList.Count - 1; i > 0; i--) + { + int num = XSingleton.singleton.RandomInt(i + 1); + bool flag = num == i; + if (!flag) + { + int value = this.m_IndexList[num]; + this.m_IndexList[num] = this.m_IndexList[i]; + this.m_IndexList[i] = value; + } + } + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomIndex.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomIndex.cs.meta new file mode 100644 index 00000000..ea1b0199 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomIndex.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2ae936f1e3cb61e4fbeb91d433d02576 +timeCreated: 1611403497 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSelectorNode.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSelectorNode.cs new file mode 100644 index 00000000..d0dd80d5 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSelectorNode.cs @@ -0,0 +1,35 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeRandomSelectorNode : AIRunTimeLogicNode + { + protected AIRunTimeRandomIndex _random_index = null; + + public AIRunTimeRandomSelectorNode(XmlElement node) : base(node) + { + this._random_index = new AIRunTimeRandomIndex(); + } + + public override void AddChild(AIRunTimeNodeBase child) + { + base.AddChild(child); + this._random_index.AppendIndex(); + } + + public override bool Update(XEntity entity) + { + this._random_index.Rand(); + for (int i = 0; i < this._list_node.Count; i++) + { + bool flag = this._list_node[this._random_index[i]].Update(entity); + if (flag) + { + return true; + } + } + return false; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSelectorNode.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSelectorNode.cs.meta new file mode 100644 index 00000000..07af77b2 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSelectorNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1cda279f03dd8704ea58c73609405c1a +timeCreated: 1611403349 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSequenceNode.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSequenceNode.cs new file mode 100644 index 00000000..c0bd2d0b --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSequenceNode.cs @@ -0,0 +1,35 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeRandomSequenceNode : AIRunTimeLogicNode + { + protected AIRunTimeRandomIndex _random_index = null; + + public AIRunTimeRandomSequenceNode(XmlElement node) : base(node) + { + this._random_index = new AIRunTimeRandomIndex(); + } + + public override void AddChild(AIRunTimeNodeBase child) + { + base.AddChild(child); + this._random_index.AppendIndex(); + } + + public override bool Update(XEntity entity) + { + this._random_index.Rand(); + for (int i = 0; i < this._list_node.Count; i++) + { + bool flag = this._list_node[this._random_index[i]].Update(entity); + if (flag) + { + return true; + } + } + return false; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSequenceNode.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSequenceNode.cs.meta new file mode 100644 index 00000000..9a5327ce --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRandomSequenceNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e86661861243edb4ebeb72acbe747f66 +timeCreated: 1611404753 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetHartedList.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetHartedList.cs new file mode 100644 index 00000000..f4ae56ec --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetHartedList.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeResetHartedList : AIRunTimeNodeAction + { + public AIRunTimeResetHartedList(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.ResetHartedList(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetHartedList.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetHartedList.cs.meta new file mode 100644 index 00000000..41852981 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetHartedList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8faf27c6f3913d847a8adf94c53dfa47 +timeCreated: 1611404136 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetTargets.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetTargets.cs new file mode 100644 index 00000000..ec444f62 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetTargets.cs @@ -0,0 +1,19 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeResetTargets : AIRunTimeNodeAction + { + public AIRunTimeResetTargets(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + XSingleton.singleton.ResetTargets(entity); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetTargets.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetTargets.cs.meta new file mode 100644 index 00000000..f5ed8761 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeResetTargets.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 82c87256ae303b84bbdaa6c40f846847 +timeCreated: 1611404041 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnFailure.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnFailure.cs new file mode 100644 index 00000000..1043db16 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnFailure.cs @@ -0,0 +1,22 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeReturnFailure : AIRunTimeDecorationNode + { + public AIRunTimeReturnFailure(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + bool flag = this._child_node != null; + if (flag) + { + this._child_node.Update(entity); + } + return false; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnFailure.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnFailure.cs.meta new file mode 100644 index 00000000..a0624d48 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnFailure.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c8895158ffc5ddb4f816dd7f380c1d76 +timeCreated: 1611404535 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnSuccess.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnSuccess.cs new file mode 100644 index 00000000..bddc41cd --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnSuccess.cs @@ -0,0 +1,22 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeReturnSuccess : AIRunTimeDecorationNode + { + public AIRunTimeReturnSuccess(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + bool flag = this._child_node != null; + if (flag) + { + this._child_node.Update(entity); + } + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnSuccess.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnSuccess.cs.meta new file mode 100644 index 00000000..43987235 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeReturnSuccess.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 03c8bbff5a97927498fbcdb381078648 +timeCreated: 1611402959 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRootNode.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRootNode.cs new file mode 100644 index 00000000..efedd412 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRootNode.cs @@ -0,0 +1,37 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeRootNode : AIRunTimeNodeBase + { + public SharedData Data + { + get + { + return this._shared_data; + } + } + + private AIRunTimeNodeBase _child; + + private SharedData _shared_data; + + public AIRunTimeRootNode(XmlElement node) : base(node) + { + this._child = null; + this._type = NodeType.NODE_TYPE_ROOT; + this._shared_data = new SharedData(); + } + + public override void AddChild(AIRunTimeNodeBase child) + { + this._child = child; + } + + public override bool Update(XEntity entity) + { + return this._child.Update(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRootNode.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRootNode.cs.meta new file mode 100644 index 00000000..fd631a81 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeRootNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bc56e107cf6baeb4f8de75b52ef8951b +timeCreated: 1611404445 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectBuffTarget.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectBuffTarget.cs new file mode 100644 index 00000000..9e91d1a6 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectBuffTarget.cs @@ -0,0 +1,34 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeSelectBuffTarget : AIRunTimeNodeAction + { + private string _buff_target; + + public AIRunTimeSelectBuffTarget(XmlElement node) : base(node) + { + this._buff_target = node.GetAttribute("Shared_BuffTargetName"); + } + + public override bool Update(XEntity entity) + { + Transform transform = XSingleton.singleton.SelectDoodaTarget(entity, XDoodadType.Buff); + bool flag = transform == null; + bool result; + if (flag) + { + result = false; + } + else + { + entity.AI.AIData.SetTransformByName(this._buff_target, transform); + result = true; + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectBuffTarget.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectBuffTarget.cs.meta new file mode 100644 index 00000000..120b77c2 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectBuffTarget.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a706db289b004534b8cc4398fe16055f +timeCreated: 1611404291 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectItemTarget.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectItemTarget.cs new file mode 100644 index 00000000..4db79d6c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectItemTarget.cs @@ -0,0 +1,34 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeSelectItemTarget : AIRunTimeNodeAction + { + private string _item_target; + + public AIRunTimeSelectItemTarget(XmlElement node) : base(node) + { + this._item_target = node.GetAttribute("Shared_ItemTargetName"); + } + + public override bool Update(XEntity entity) + { + Transform transform = XSingleton.singleton.SelectDoodaTarget(entity, XDoodadType.Item); + bool flag = transform == null; + bool result; + if (flag) + { + result = false; + } + else + { + entity.AI.AIData.SetTransformByName(this._item_target, transform); + result = true; + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectItemTarget.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectItemTarget.cs.meta new file mode 100644 index 00000000..5ef77177 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectItemTarget.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c9899caf2e4988a47b19dc22bc4d09c2 +timeCreated: 1611404539 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs new file mode 100644 index 00000000..18151d0f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs @@ -0,0 +1,36 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeSelectMoveTargetById : AIRunTimeNodeAction + { + private int _object_id; + + private string _target_name; + + public AIRunTimeSelectMoveTargetById(XmlElement node) : base(node) + { + this._object_id = int.Parse(node.GetAttribute("ObjectId")); + this._target_name = node.GetAttribute("Shared_MoveTarget"); + } + + public override bool Update(XEntity entity) + { + XGameObject xgameObject = XSingleton.singleton.SelectMoveTargetById(entity, this._object_id); + bool flag = xgameObject == null; + bool result; + if (flag) + { + result = false; + } + else + { + entity.AI.AIData.SetXGameObjectByName(this._target_name, xgameObject); + result = true; + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs.meta new file mode 100644 index 00000000..30a3c506 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bfcdef92789f742409098851ec0e6400 +timeCreated: 1611404484 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectNonHartedList.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectNonHartedList.cs new file mode 100644 index 00000000..11f140ca --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectNonHartedList.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeSelectNonHartedList : AIRunTimeNodeAction + { + public AIRunTimeSelectNonHartedList(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectNonHartedList.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectNonHartedList.cs.meta new file mode 100644 index 00000000..34ec1043 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectNonHartedList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7963482293f41234da7ad767f6db5fe6 +timeCreated: 1611403985 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectTargetBySkillCircle.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectTargetBySkillCircle.cs new file mode 100644 index 00000000..a9bf8a72 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectTargetBySkillCircle.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeSelectTargetBySkillCircle : AIRunTimeNodeAction + { + public AIRunTimeSelectTargetBySkillCircle(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.SelectTargetBySkillCircle(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectTargetBySkillCircle.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectTargetBySkillCircle.cs.meta new file mode 100644 index 00000000..a1372ad8 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectTargetBySkillCircle.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f4612fa3b293e5c42a42bf83fe863a2e +timeCreated: 1611404854 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectorNode.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectorNode.cs new file mode 100644 index 00000000..d5adc4b9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectorNode.cs @@ -0,0 +1,25 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeSelectorNode : AIRunTimeLogicNode + { + public AIRunTimeSelectorNode(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + for (int i = 0; i < this._list_node.Count; i++) + { + bool flag = this._list_node[i].Update(entity); + if (flag) + { + return true; + } + } + return false; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectorNode.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectorNode.cs.meta new file mode 100644 index 00000000..8e18b1e5 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectorNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e0955444c79f2bf4aa7e661a37fee192 +timeCreated: 1611404698 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSequenceNode.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSequenceNode.cs new file mode 100644 index 00000000..d2998f02 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSequenceNode.cs @@ -0,0 +1,25 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeSequenceNode : AIRunTimeLogicNode + { + public AIRunTimeSequenceNode(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + for (int i = 0; i < this._list_node.Count; i++) + { + bool flag = !this._list_node[i].Update(entity); + if (flag) + { + return false; + } + } + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSequenceNode.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSequenceNode.cs.meta new file mode 100644 index 00000000..9eff67ba --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSequenceNode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ffb15463e80ddce4a93e97e26e8902fb +timeCreated: 1611404947 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetBool.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetBool.cs new file mode 100644 index 00000000..b2d5bc00 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetBool.cs @@ -0,0 +1,28 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeSetBool : AIRunTimeNodeAction + { + private string _value_name; + + private bool _value; + + private string _store_name; + + public AIRunTimeSetBool(XmlElement node) : base(node) + { + this._value_name = node.GetAttribute("Shared_ValueName"); + this._value = (node.GetAttribute("value") != "0"); + this._store_name = node.GetAttribute("Shared_StoredResultName"); + } + + public override bool Update(XEntity entity) + { + bool boolByName = entity.AI.AIData.GetBoolByName(this._value_name, this._value); + entity.AI.AIData.SetBoolByName(this._store_name, boolByName); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetBool.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetBool.cs.meta new file mode 100644 index 00000000..6d0d1f9c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetBool.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6c5ed103b2e544e4ebb1421c78a0e10a +timeCreated: 1611403895 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetEnmity.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetEnmity.cs new file mode 100644 index 00000000..d4ece667 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetEnmity.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeSetEnmity : AIRunTimeNodeAction + { + public AIRunTimeSetEnmity(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetEnmity.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetEnmity.cs.meta new file mode 100644 index 00000000..a0dcc117 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetEnmity.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 570d81252c640414fad2c3d54c63118f +timeCreated: 1611403747 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetFloat.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetFloat.cs new file mode 100644 index 00000000..e3315b9d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetFloat.cs @@ -0,0 +1,28 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeSetFloat : AIRunTimeNodeAction + { + private string _value_name; + + private float _value; + + private string _store_name; + + public AIRunTimeSetFloat(XmlElement node) : base(node) + { + this._value_name = node.GetAttribute("Shared_ValueName"); + this._value = float.Parse(node.GetAttribute("value")); + this._store_name = node.GetAttribute("Shared_StoredResultName"); + } + + public override bool Update(XEntity entity) + { + float floatByName = entity.AI.AIData.GetFloatByName(this._value_name, this._value); + entity.AI.AIData.SetFloatByName(this._store_name, floatByName); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetFloat.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetFloat.cs.meta new file mode 100644 index 00000000..0f291654 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetFloat.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dfd011bb15383624a92f65db1e3e798c +timeCreated: 1611404694 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetInt.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetInt.cs new file mode 100644 index 00000000..2796d033 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetInt.cs @@ -0,0 +1,28 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeSetInt : AIRunTimeNodeAction + { + private string _value_name; + + private int _value; + + private string _store_name; + + public AIRunTimeSetInt(XmlElement node) : base(node) + { + this._value_name = node.GetAttribute("Shared_ValueName"); + this._value = int.Parse(node.GetAttribute("value")); + this._store_name = node.GetAttribute("Shared_StoredResultName"); + } + + public override bool Update(XEntity entity) + { + int intByName = entity.AI.AIData.GetIntByName(this._value_name, this._value); + entity.AI.AIData.SetIntByName(this._store_name, intByName); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetInt.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetInt.cs.meta new file mode 100644 index 00000000..1196f577 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSetInt.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dd6d9b1d40b78be44af4199b6fb521e1 +timeCreated: 1611404682 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeStatusIdle.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeStatusIdle.cs new file mode 100644 index 00000000..a67fc094 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeStatusIdle.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeStatusIdle : AIRunTimeNodeCondition + { + public AIRunTimeStatusIdle(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeStatusIdle.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeStatusIdle.cs.meta new file mode 100644 index 00000000..e98060ba --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeStatusIdle.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 672ca7de6e1e04b4190f6294194fe502 +timeCreated: 1611403857 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetByHatredList.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetByHatredList.cs new file mode 100644 index 00000000..9945c51f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetByHatredList.cs @@ -0,0 +1,22 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeTargetByHatredList : AIRunTimeNodeAction + { + private bool _filter_immortal; + + public AIRunTimeTargetByHatredList(XmlElement node) : base(node) + { + string attribute = node.GetAttribute("FilterImmortal"); + bool.TryParse(attribute, out this._filter_immortal); + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.FindTargetByHartedList(entity, this._filter_immortal); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetByHatredList.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetByHatredList.cs.meta new file mode 100644 index 00000000..beec53e2 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetByHatredList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 73e3a4bcca8e36646af4b2e23d93bf91 +timeCreated: 1611403941 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetQTEState.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetQTEState.cs new file mode 100644 index 00000000..4d663e4d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetQTEState.cs @@ -0,0 +1,26 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeTargetQTEState : AIRunTimeNodeCondition + { + private string _target_name; + + private int _qte_state; + + public AIRunTimeTargetQTEState(XmlElement node) : base(node) + { + this._target_name = node.GetAttribute("Shared_TargetName"); + this._qte_state = int.Parse(node.GetAttribute("QTEState")); + } + + public override bool Update(XEntity entity) + { + XGameObject xgameObjectByName = entity.AI.AIData.GetXGameObjectByName(this._target_name); + bool flag = xgameObjectByName != null; + return flag && XSingleton.singleton.HasQTE(xgameObjectByName.UID, this._qte_state); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetQTEState.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetQTEState.cs.meta new file mode 100644 index 00000000..c8fb1ccb --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTargetQTEState.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 65895e7702341554f9fdf1ca55eaa51a +timeCreated: 1611403850 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTreeMgr.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTreeMgr.cs new file mode 100644 index 00000000..d93b0db6 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTreeMgr.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeTreeMgr : XSingleton + { + private Dictionary _behavior_tree = new Dictionary(); + + private AIRunTimeRootNode LoadAITree(Stream content, string key) + { + XmlDocument xmlDocument = new XmlDocument(); + xmlDocument.Load(content); + XSingleton.singleton.ClearStream(content); + XmlElement documentElement = xmlDocument.DocumentElement; + AIRunTimeRootNode airunTimeRootNode = this.LoadOneNode(documentElement.FirstChild as XmlElement) as AIRunTimeRootNode; + this._behavior_tree[key] = airunTimeRootNode; + return airunTimeRootNode; + } + + public AIRunTimeRootNode GetBehavior(string name) + { + AIRunTimeRootNode result = null; + bool flag = !this._behavior_tree.TryGetValue(name, out result); + if (flag) + { + result = this.LoadAITree(XSingleton.singleton.ReadText("Table/AITree/" + name, ".xml", true), name); + } + return result; + } + + private AIRunTimeNodeBase LoadOneNode(XmlElement element) + { + bool flag = element == null; + AIRunTimeNodeBase result; + if (flag) + { + result = null; + } + else + { + AIRunTimeNodeBase airunTimeNodeBase = AINodeFactory.CreateAINodeByName(element.Name, element); + bool flag2 = element.Name == "ConditionalEvaluator"; + if (flag2) + { + AIRunTimeNodeBase airunTimeNodeBase2 = AINodeFactory.CreateAINodeByName((airunTimeNodeBase as AIRunTimeConditionalEvaluator).ConditionNodeName, element); + bool flag3 = airunTimeNodeBase2 != null; + if (flag3) + { + (airunTimeNodeBase as AIRunTimeConditionalEvaluator).AddConditionNode(airunTimeNodeBase2); + } + } + for (int i = 0; i < element.ChildNodes.Count; i++) + { + AIRunTimeNodeBase airunTimeNodeBase3 = this.LoadOneNode(element.ChildNodes[i] as XmlElement); + bool flag4 = airunTimeNodeBase3 != null; + if (flag4) + { + airunTimeNodeBase.AddChild(airunTimeNodeBase3); + } + } + result = airunTimeNodeBase; + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTreeMgr.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTreeMgr.cs.meta new file mode 100644 index 00000000..c11c6fd3 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeTreeMgr.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d8d1933b270bd6d43a73f6866fe71958 +timeCreated: 1611404641 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueDistance.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueDistance.cs new file mode 100644 index 00000000..8ba9ca6d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueDistance.cs @@ -0,0 +1,30 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeValueDistance : AIRunTimeNodeCondition + { + private string _target_name; + + private string _distance_name; + + private float _distance = 0f; + + public AIRunTimeValueDistance(XmlElement node) : base(node) + { + this._target_name = node.GetAttribute("Shared_TargetName"); + this._distance_name = node.GetAttribute("Shared_MaxDistanceName"); + this._distance = float.Parse(node.GetAttribute("Shared_MaxDistancemValue")); + } + + public override bool Update(XEntity entity) + { + XGameObject xgameObjectByName = entity.AI.AIData.GetXGameObjectByName(this._target_name); + float floatByName = entity.AI.AIData.GetFloatByName(this._distance_name, this._distance); + bool flag = xgameObjectByName != null; + return flag && (entity.EngineObject.Position - xgameObjectByName.Position).magnitude <= floatByName; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueDistance.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueDistance.cs.meta new file mode 100644 index 00000000..28d158a0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueDistance.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b75043a402391a84d8d4639e0676c59b +timeCreated: 1611404402 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueFP.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueFP.cs new file mode 100644 index 00000000..85260a3c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueFP.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeValueFP : AIRunTimeNodeCondition + { + public AIRunTimeValueFP(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueFP.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueFP.cs.meta new file mode 100644 index 00000000..506eac42 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueFP.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 663e66b055c0e134994696b1c8c82521 +timeCreated: 1611403853 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueHP.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueHP.cs new file mode 100644 index 00000000..0b171d91 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueHP.cs @@ -0,0 +1,24 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeValueHP : AIRunTimeNodeCondition + { + private int _max_hp; + + private int _min_hp; + + public AIRunTimeValueHP(XmlElement node) : base(node) + { + this._max_hp = int.Parse(node.GetAttribute("MaxPercent")); + this._min_hp = int.Parse(node.GetAttribute("MinPercent")); + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.IsHPValue(entity.ID, this._min_hp, this._max_hp); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueHP.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueHP.cs.meta new file mode 100644 index 00000000..3c9249f9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueHP.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eec4c52297e6fdd4582e4d41e38e59d2 +timeCreated: 1611404799 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueMP.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueMP.cs new file mode 100644 index 00000000..407b6c81 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueMP.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRunTimeValueMP : AIRunTimeNodeCondition + { + public AIRunTimeValueMP(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueMP.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueMP.cs.meta new file mode 100644 index 00000000..e5039e78 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueMP.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 01b853641f6b4084eb0347a8bda9d3b2 +timeCreated: 1611402954 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueTarget.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueTarget.cs new file mode 100644 index 00000000..857d8635 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueTarget.cs @@ -0,0 +1,39 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRunTimeValueTarget : AIRunTimeNodeCondition + { + private string _shared_target_name; + + public AIRunTimeValueTarget(XmlElement node) : base(node) + { + this._shared_target_name = node.GetAttribute("Shared_TargetName"); + } + + public override bool Update(XEntity entity) + { + XGameObject xgameObjectByName = entity.AI.AIData.GetXGameObjectByName(this._shared_target_name); + XEntity xentity = null; + bool flag = xgameObjectByName != null; + if (flag) + { + xentity = XSingleton.singleton.GetEntity(xgameObjectByName.UID); + } + bool flag2 = xgameObjectByName != null && xentity != null && XEntity.ValideEntity(xentity); + bool result; + if (flag2) + { + result = true; + } + else + { + entity.AI.SetTarget(null); + result = false; + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueTarget.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueTarget.cs.meta new file mode 100644 index 00000000..7b4bfb0b --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeValueTarget.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9fb288a90f47f1f419e514945edbc91d +timeCreated: 1611404246 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionMove.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionMove.cs new file mode 100644 index 00000000..5912ec67 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionMove.cs @@ -0,0 +1,42 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeActionMove : AIRunTimeNodeAction + { + private string _move_dir; + + private string _move_dest; + + private string _move_speed; + + public AIRuntimeActionMove(XmlElement node) : base(node) + { + this._move_dir = node.GetAttribute("Shared_MoveDirName"); + this._move_dest = node.GetAttribute("Shared_MoveDestName"); + this._move_speed = node.GetAttribute("Shared_MoveSpeedName"); + } + + public override bool Update(XEntity entity) + { + Vector3 vector = entity.AI.AIData.GetVector3ByName(this._move_dir, Vector3.zero); + Vector3 vector2 = entity.AI.AIData.GetVector3ByName(this._move_dest, Vector3.zero); + bool flag = vector == Vector3.zero; + if (flag) + { + vector = (vector2 - entity.EngineObject.Position).normalized; + vector.Set(vector.x, 0f, vector.z); + } + bool flag2 = vector2 == Vector3.zero; + if (flag2) + { + vector2 = entity.EngineObject.Position + vector.normalized * 50f; + } + float floatByName = entity.AI.AIData.GetFloatByName(this._move_speed, 0f); + return XSingleton.singleton.ActionMove(entity, vector, vector2, floatByName); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionMove.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionMove.cs.meta new file mode 100644 index 00000000..44914bc8 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionMove.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f7b41388b7375fa4093b49146a778788 +timeCreated: 1611404889 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionNavigation.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionNavigation.cs new file mode 100644 index 00000000..be44c0bf --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionNavigation.cs @@ -0,0 +1,25 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeActionNavigation : AIRunTimeNodeAction + { + public string _move_dir_name; + + private int _old_move_dir = 1; + + public AIRuntimeActionNavigation(XmlElement node) : base(node) + { + this._move_dir_name = node.GetAttribute("Shared_MoveDirName"); + } + + public override bool Update(XEntity entity) + { + int old_move_dir = this._old_move_dir; + this._old_move_dir = entity.AI.AIData.GetIntByName(this._move_dir_name, 1); + return XSingleton.singleton.UpdateNavigation(entity, this._old_move_dir, old_move_dir); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionNavigation.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionNavigation.cs.meta new file mode 100644 index 00000000..3567486b --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionNavigation.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 76e38604b0771ed46a6c06fcc9bc7a30 +timeCreated: 1611403951 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionRotate.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionRotate.cs new file mode 100644 index 00000000..8ab44953 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionRotate.cs @@ -0,0 +1,27 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeActionRotate : AIRunTimeNodeAction + { + public float _rot_degree; + + public float _rot_speed; + + public int _rot_type; + + public AIRuntimeActionRotate(XmlElement node) : base(node) + { + this._rot_degree = float.Parse(node.GetAttribute("RotDegree")); + this._rot_speed = float.Parse(node.GetAttribute("RotSpeed")); + this._rot_type = int.Parse(node.GetAttribute("RotType")); + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.ActionRotate(entity, this._rot_degree, this._rot_speed, this._rot_type); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionRotate.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionRotate.cs.meta new file mode 100644 index 00000000..722b6293 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionRotate.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 19aa2e0ef78acab479307a7956a70c5f +timeCreated: 1611403304 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs new file mode 100644 index 00000000..011876af --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs @@ -0,0 +1,39 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeAddBuff : AIRunTimeNodeAction + { + private int BuffId; + + private int BuffId2; + + private string BuffIdName; + + private string BuffId2Name; + + private int MonsterId; + + private string MonsterIdName; + + public AIRuntimeAddBuff(XmlElement node) : base(node) + { + this.BuffId = int.Parse(node.GetAttribute("Shared_BuffIdmValue")); + this.BuffId2 = int.Parse(node.GetAttribute("Shared_BuffId2mValue")); + this.BuffIdName = node.GetAttribute("Shared_BuffIdName"); + this.BuffId2Name = node.GetAttribute("Shared_BuffId2Name"); + this.MonsterId = int.Parse(node.GetAttribute("Shared_MonsterIdmValue")); + this.MonsterIdName = node.GetAttribute("Shared_MonsterIdName"); + } + + public override bool Update(XEntity entity) + { + int intByName = entity.AI.AIData.GetIntByName(this.MonsterIdName, this.MonsterId); + int intByName2 = entity.AI.AIData.GetIntByName(this.BuffIdName, this.BuffId); + int intByName3 = entity.AI.AIData.GetIntByName(this.BuffId2Name, this.BuffId2); + return XSingleton.singleton.AddBuff(intByName, intByName2, intByName3); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs.meta new file mode 100644 index 00000000..e3fb6179 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 789dd9897234f66449b828feb9deb300 +timeCreated: 1611403982 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallMonster.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallMonster.cs new file mode 100644 index 00000000..2346e821 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallMonster.cs @@ -0,0 +1,111 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeCallMonster : AIRunTimeNodeAction + { + private float _dist; + + private string _dist_name; + + private float _angle; + + private string _angle_name; + + private string _monster_id_name; + + private int _monster_id; + + private int _copy_monster_id; + + private int _max_monster_num; + + private float _life_time; + + private float _delay_time; + + private Vector3 _pos; + + private string _pos_name; + + private int _born_type; + + private Vector3 _pos1; + + private Vector3 _pos2; + + private Vector3 _pos3; + + private Vector3 _pos4; + + private bool _force_place; + + private float _delta_arg; + + public AIRuntimeCallMonster(XmlElement node) : base(node) + { + this._dist = float.Parse(node.GetAttribute("Shared_DistmValue")); + this._dist_name = node.GetAttribute("Shared_DistName"); + this._angle = float.Parse(node.GetAttribute("Shared_AnglemValue")); + this._angle_name = node.GetAttribute("Shared_AngleName"); + this._monster_id_name = node.GetAttribute("MonsterId2Name"); + this._monster_id = int.Parse(node.GetAttribute("MonsterId")); + this._copy_monster_id = int.Parse(node.GetAttribute("CopyMonsterId")); + this._max_monster_num = int.Parse(node.GetAttribute("MaxMonsterNum")); + this._life_time = float.Parse(node.GetAttribute("LifeTime")); + this._delay_time = float.Parse(node.GetAttribute("DelayTime")); + string[] array = node.GetAttribute("Shared_PosmValue").Split(new char[] + { + ':' + }); + this._pos = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); + this._pos_name = node.GetAttribute("Shared_PosName"); + this._born_type = int.Parse(node.GetAttribute("BornType")); + array = node.GetAttribute("Pos1").Split(new char[] + { + ':' + }); + this._pos1 = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); + array = node.GetAttribute("Pos2").Split(new char[] + { + ':' + }); + this._pos2 = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); + array = node.GetAttribute("Pos3").Split(new char[] + { + ':' + }); + this._pos3 = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); + array = node.GetAttribute("Pos4").Split(new char[] + { + ':' + }); + this._pos4 = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); + this._force_place = (int.Parse(node.GetAttribute("ForcePlace")) != 0); + this._delta_arg = float.Parse(node.GetAttribute("DeltaArg")); + } + + public override bool Update(XEntity entity) + { + CallMonsterData callMonsterData = new CallMonsterData(); + callMonsterData.mAIArgDist = entity.AI.AIData.GetFloatByName(this._dist_name, this._dist); + callMonsterData.mAIArgAngle = entity.AI.AIData.GetFloatByName(this._angle_name, this._angle); + callMonsterData.mAIArgMonsterId = entity.AI.AIData.GetIntByName(this._monster_id_name, this._monster_id); + callMonsterData.mAIArgCopyMonsterId = this._copy_monster_id; + callMonsterData.mAIArgLifeTime = this._life_time; + callMonsterData.mAIArgDelayTime = this._delay_time; + callMonsterData.mAIArgPos = entity.AI.AIData.GetVector3ByName(this._pos_name, this._pos); + callMonsterData.mAIArgBornType = this._born_type; + callMonsterData.mAIArgPos1 = this._pos1; + callMonsterData.mAIArgPos2 = this._pos2; + callMonsterData.mAIArgPos3 = this._pos3; + callMonsterData.mAIArgPos4 = this._pos4; + callMonsterData.mAIArgForcePlace = this._force_place; + callMonsterData.mAIArgDeltaArg = this._delta_arg; + return XSingleton.singleton.CallMonster(entity, callMonsterData); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallMonster.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallMonster.cs.meta new file mode 100644 index 00000000..ddb0532f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallMonster.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 59ea1f821661b7947b12ce7667137b07 +timeCreated: 1611403789 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallScript.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallScript.cs new file mode 100644 index 00000000..afa36b8e --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallScript.cs @@ -0,0 +1,25 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeCallScript : AIRunTimeNodeAction + { + public float mAIArgDelayTime; + + public string mAIArgScriptName; + + public AIRuntimeCallScript(XmlElement node) : base(node) + { + this.mAIArgDelayTime = float.Parse(node.GetAttribute("DelayTime")); + this.mAIArgScriptName = node.GetAttribute("FuncName"); + } + + public override bool Update(XEntity entity) + { + XSingleton.singleton.CallScript(this.mAIArgScriptName, this.mAIArgDelayTime); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallScript.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallScript.cs.meta new file mode 100644 index 00000000..56ff8513 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallScript.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4ca397ebf33cf5d499d9e5ce73ed0dec +timeCreated: 1611403691 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCancelSkill.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCancelSkill.cs new file mode 100644 index 00000000..59340ea2 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCancelSkill.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRuntimeCancelSkill : AIRunTimeNodeAction + { + public AIRuntimeCancelSkill(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCancelSkill.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCancelSkill.cs.meta new file mode 100644 index 00000000..58f9d3b4 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCancelSkill.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 46d51d02a8e32724bae8559a61cfa774 +timeCreated: 1611403651 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCastDash.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCastDash.cs new file mode 100644 index 00000000..2885c232 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCastDash.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeCastDash : AIRunTimeNodeAction + { + public AIRuntimeCastDash(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.CastDashSkill(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCastDash.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCastDash.cs.meta new file mode 100644 index 00000000..154f9083 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCastDash.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 25853c7f1c82cfb46af147abed9e0357 +timeCreated: 1611403465 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDetectEnemyInRange.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDetectEnemyInRange.cs new file mode 100644 index 00000000..4a4b90c1 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDetectEnemyInRange.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRuntimeDetectEnemyInRange : AIRunTimeNodeAction + { + public AIRuntimeDetectEnemyInRange(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDetectEnemyInRange.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDetectEnemyInRange.cs.meta new file mode 100644 index 00000000..1c5217cc --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDetectEnemyInRange.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f69825eb0459e8e47bc087edc5a5532d +timeCreated: 1611404883 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoCastSkill.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoCastSkill.cs new file mode 100644 index 00000000..e5574097 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoCastSkill.cs @@ -0,0 +1,21 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeDoCastSkill : AIRunTimeNodeAction + { + private string _target_name; + + public AIRuntimeDoCastSkill(XmlElement node) : base(node) + { + this._target_name = node.GetAttribute("Shared_TargetName"); + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.DoCastSkill(entity, entity.AI.Target); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoCastSkill.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoCastSkill.cs.meta new file mode 100644 index 00000000..39d506a7 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoCastSkill.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: da5dcd4c85d90ad4f8a850772e3f41c1 +timeCreated: 1611404647 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillInOrder.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillInOrder.cs new file mode 100644 index 00000000..dc6522d7 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillInOrder.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeDoSelectSkillInOrder : AIRunTimeNodeAction + { + public AIRuntimeDoSelectSkillInOrder(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.DoSelectInOrder(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillInOrder.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillInOrder.cs.meta new file mode 100644 index 00000000..3147e02c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillInOrder.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 411ef6ae352cde64cb7b14b2bd762580 +timeCreated: 1611403616 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillRandom.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillRandom.cs new file mode 100644 index 00000000..11a3f462 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillRandom.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeDoSelectSkillRandom : AIRunTimeNodeAction + { + public AIRuntimeDoSelectSkillRandom(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.DoSelectRandom(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillRandom.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillRandom.cs.meta new file mode 100644 index 00000000..0afba3aa --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeDoSelectSkillRandom.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 94997400f024f544092662d21678f500 +timeCreated: 1611404155 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeFilterSkill.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeFilterSkill.cs new file mode 100644 index 00000000..6d808ef3 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeFilterSkill.cs @@ -0,0 +1,82 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeFilterSkill : AIRunTimeNodeAction + { + private string _target_name; + + private bool _use_mp; + + private bool _use_name; + + private bool _use_hp; + + private bool _use_cool_down; + + private bool _use_attack_field; + + private bool _use_combo; + + private bool _use_install = false; + + private int _skill_type; + + private string _skill_name; + + private bool _detect_all_attack_field; + + private int _max_skill_num; + + public AIRuntimeFilterSkill(XmlElement node) : base(node) + { + this._target_name = node.GetAttribute("Shared_TargetName"); + this._use_mp = (node.GetAttribute("UseMP") != "0"); + this._use_name = (node.GetAttribute("UseName") != "0"); + this._use_hp = (node.GetAttribute("UseHP") != "0"); + this._use_cool_down = (node.GetAttribute("UseCoolDown") != "0"); + this._use_attack_field = (node.GetAttribute("UseAttackField") != "0"); + this._use_combo = (node.GetAttribute("UseCombo") != "0"); + this._use_install = (node.GetAttribute("UseInstall") != "0"); + this._skill_type = int.Parse(node.GetAttribute("SkillType")); + this._skill_name = node.GetAttribute("SkillName"); + this._detect_all_attack_field = (node.GetAttribute("DetectAllPlayInAttackField") != "0"); + string attribute = node.GetAttribute("MaxSkillNum"); + bool flag = !string.IsNullOrEmpty(attribute); + if (flag) + { + this._max_skill_num = int.Parse(attribute); + } + else + { + this._max_skill_num = 0; + } + } + + public override bool Update(XEntity entity) + { + XGameObject xgameObjectByName = entity.AI.AIData.GetXGameObjectByName(this._target_name); + FilterSkillArg filterSkillArg = new FilterSkillArg(); + filterSkillArg.mAIArgUseMP = this._use_mp; + filterSkillArg.mAIArgUseName = this._use_name; + filterSkillArg.mAIArgUseHP = this._use_hp; + filterSkillArg.mAIArgUseCoolDown = this._use_cool_down; + filterSkillArg.mAIArgUseAttackField = this._use_attack_field; + filterSkillArg.mAIArgUseCombo = this._use_combo; + filterSkillArg.mAIArgUseInstall = this._use_install; + filterSkillArg.mAIArgSkillType = this._skill_type; + filterSkillArg.mAIArgSkillName = this._skill_name; + filterSkillArg.mAIArgDetectAllPlayInAttackField = this._detect_all_attack_field; + filterSkillArg.mAIArgMaxSkillNum = this._max_skill_num; + XEntity target = null; + bool flag = xgameObjectByName != null; + if (flag) + { + target = XSingleton.singleton.GetEntity(xgameObjectByName.UID); + } + return XSingleton.singleton.SelectSkill(entity, target, filterSkillArg); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeFilterSkill.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeFilterSkill.cs.meta new file mode 100644 index 00000000..634aaae5 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeFilterSkill.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 23696e1ef28836d48868db88eb58c01c +timeCreated: 1611403453 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeKillMonster.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeKillMonster.cs new file mode 100644 index 00000000..a330a20c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeKillMonster.cs @@ -0,0 +1,12 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRuntimeKillMonster : AIRunTimeNodeAction + { + public AIRuntimeKillMonster(XmlElement node) : base(node) + { + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeKillMonster.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeKillMonster.cs.meta new file mode 100644 index 00000000..d80e5a37 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeKillMonster.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2877a0b85c467ef45aff9d0353452fe4 +timeCreated: 1611403475 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMixMonsterPos.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMixMonsterPos.cs new file mode 100644 index 00000000..be2bfdf9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMixMonsterPos.cs @@ -0,0 +1,12 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRuntimeMixMonsterPos : AIRunTimeNodeAction + { + public AIRuntimeMixMonsterPos(XmlElement node) : base(node) + { + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMixMonsterPos.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMixMonsterPos.cs.meta new file mode 100644 index 00000000..80858c47 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMixMonsterPos.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e31e013644405a24bb3b23e9e824565d +timeCreated: 1611404731 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMoveStratage.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMoveStratage.cs new file mode 100644 index 00000000..58b36109 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMoveStratage.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRuntimeMoveStratage : AIRunTimeNodeAction + { + public AIRuntimeMoveStratage(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMoveStratage.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMoveStratage.cs.meta new file mode 100644 index 00000000..91ad4375 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeMoveStratage.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2d273e00d408eab4f83a372512d12f78 +timeCreated: 1611403505 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeNavToTarget.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeNavToTarget.cs new file mode 100644 index 00000000..96470513 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeNavToTarget.cs @@ -0,0 +1,74 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeNavToTarget : AIRunTimeNodeAction + { + private string _target_name; + + private string _nav_target_name; + + private Vector3 _nav_pos; + + private string _nav_pos_name; + + public AIRuntimeNavToTarget(XmlElement node) : base(node) + { + this._target_name = node.GetAttribute("Shared_TargetName"); + this._nav_target_name = node.GetAttribute("Shared_NavTargetName"); + this._nav_pos_name = node.GetAttribute("Shared_NavPosName"); + string attribute = node.GetAttribute("Shared_NavPosmValue"); + float num = float.Parse(attribute.Split(new char[] + { + ':' + })[0]); + float num2 = float.Parse(attribute.Split(new char[] + { + ':' + })[1]); + float num3 = float.Parse(attribute.Split(new char[] + { + ':' + })[2]); + this._nav_pos = new Vector3(num, num2, num3); + } + + public override bool Update(XEntity entity) + { + XGameObject xgameObjectByName = entity.AI.AIData.GetXGameObjectByName(this._target_name); + bool flag = xgameObjectByName == null; + bool result; + if (flag) + { + Transform transformByName = entity.AI.AIData.GetTransformByName(this._nav_target_name); + bool flag2 = transformByName == null; + if (flag2) + { + bool flag3 = string.IsNullOrEmpty(this._nav_pos_name); + if (flag3) + { + bool flag4 = this._nav_pos == Vector3.zero; + result = (!flag4 && XSingleton.singleton.ActionNav(entity.ID, this._nav_pos)); + } + else + { + Vector3 vector3ByName = entity.AI.AIData.GetVector3ByName(this._nav_pos_name, Vector3.zero); + result = XSingleton.singleton.ActionNav(entity.ID, vector3ByName); + } + } + else + { + result = XSingleton.singleton.NavToTarget(entity.ID, transformByName.gameObject); + } + } + else + { + result = XSingleton.singleton.NavToTarget(entity, xgameObjectByName.Position, entity.AI.MoveSpeed); + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeNavToTarget.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeNavToTarget.cs.meta new file mode 100644 index 00000000..efa233a1 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeNavToTarget.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5e144f56edfde284d8dea37862a2cbfe +timeCreated: 1611403809 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimePhysicalAttack.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimePhysicalAttack.cs new file mode 100644 index 00000000..b146892c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimePhysicalAttack.cs @@ -0,0 +1,21 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimePhysicalAttack : AIRunTimeNodeAction + { + private string _target_name; + + public AIRuntimePhysicalAttack(XmlElement node) : base(node) + { + this._target_name = node.GetAttribute("Shared_TargetName"); + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.TryCastPhysicalSkill(entity, entity.AI.Target); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimePhysicalAttack.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimePhysicalAttack.cs.meta new file mode 100644 index 00000000..1d17080b --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimePhysicalAttack.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 78e5a7bb643dfdd409a56aad3cd5f28c +timeCreated: 1611403982 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeReceiveAIEvent.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeReceiveAIEvent.cs new file mode 100644 index 00000000..5deda83a --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeReceiveAIEvent.cs @@ -0,0 +1,104 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeReceiveAIEvent : AIRunTimeNodeAction + { + private bool _deprecate; + + private int _msg_type; + + private string _msg_str; + + private int _type_id; + + private string _type_id_name; + + private Vector3 _pos; + + private string _pos_name; + + private int _skill_template_id; + + private string _skill_template_id_name; + + private int _skill_id; + + private string _skill_id_name; + + private float _float_arg; + + private string _float_arg_name; + + private string _sender_uid; + + private string _sender_uid_name; + + public AIRuntimeReceiveAIEvent(XmlElement node) : base(node) + { + this._msg_type = int.Parse(node.GetAttribute("MsgType")); + this._msg_str = node.GetAttribute("Shared_MsgStrName"); + this._deprecate = (node.GetAttribute("Deprecate") != "0"); + this._type_id = int.Parse(node.GetAttribute("Shared_TypeIdmValue")); + this._type_id_name = node.GetAttribute("Shared_TypeIdName"); + string[] array = node.GetAttribute("Shared_PosmValue").Split(new char[] + { + ':' + }); + this._pos = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); + this._pos_name = node.GetAttribute("Shared_PosName"); + this._skill_template_id = int.Parse(node.GetAttribute("Shared_SkillTemplateIdmValue")); + this._skill_template_id_name = node.GetAttribute("Shared_SkillTemplateIdName"); + this._skill_id = int.Parse(node.GetAttribute("Shared_SkillIdmValue")); + this._skill_id_name = node.GetAttribute("Shared_SkillIdName"); + this._float_arg = float.Parse(node.GetAttribute("Shared_FloatArgmValue")); + this._float_arg_name = node.GetAttribute("Shared_FloatArgName"); + this._sender_uid = node.GetAttribute("Shared_SenderUIDmValue"); + this._sender_uid_name = node.GetAttribute("Shared_SenderUIDName"); + } + + public override bool Update(XEntity entity) + { + string text = XSingleton.singleton.ReceiveAIEvent(entity, this._msg_type, this._deprecate); + bool flag = string.IsNullOrEmpty(text); + bool result; + if (flag) + { + result = false; + } + else + { + string[] array = text.Split(new char[] + { + ' ' + }); + entity.AI.AIData.SetStringByName(this._msg_str, array[0]); + bool flag2 = !string.IsNullOrEmpty(this._type_id_name); + if (flag2) + { + entity.AI.AIData.SetIntByName(this._type_id_name, int.Parse(array[1])); + } + bool flag3 = !string.IsNullOrEmpty(this._pos_name); + if (flag3) + { + entity.AI.AIData.SetVector3ByName(this._pos_name, new Vector3(float.Parse(array[2]), float.Parse(array[3]), float.Parse(array[4]))); + } + bool flag4 = !string.IsNullOrEmpty(this._skill_id_name); + if (flag4) + { + entity.AI.AIData.SetIntByName(this._skill_id_name, int.Parse(array[5])); + } + bool flag5 = !string.IsNullOrEmpty(this._sender_uid_name); + if (flag5) + { + entity.AI.AIData.SetStringByName(this._sender_uid_name, array[6]); + } + result = true; + } + return result; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeReceiveAIEvent.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeReceiveAIEvent.cs.meta new file mode 100644 index 00000000..943cc448 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeReceiveAIEvent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: de3ef589ada348141b254916c26d9aec +timeCreated: 1611404685 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveBuff.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveBuff.cs new file mode 100644 index 00000000..22fd8738 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveBuff.cs @@ -0,0 +1,12 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRuntimeRemoveBuff : AIRunTimeNodeAction + { + public AIRuntimeRemoveBuff(XmlElement node) : base(node) + { + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveBuff.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveBuff.cs.meta new file mode 100644 index 00000000..ff20f0b3 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveBuff.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dc341d1ee24f7dc4097d3e955a978fbf +timeCreated: 1611404677 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveSceneBuff.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveSceneBuff.cs new file mode 100644 index 00000000..7089b5e6 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveSceneBuff.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRuntimeRemoveSceneBuff : AIRunTimeNodeAction + { + public AIRuntimeRemoveSceneBuff(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveSceneBuff.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveSceneBuff.cs.meta new file mode 100644 index 00000000..2361ce76 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRemoveSceneBuff.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bd661c11d7721ca438589c366508808c +timeCreated: 1611404452 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRotateToTarget.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRotateToTarget.cs new file mode 100644 index 00000000..3779c06d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRotateToTarget.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeRotateToTarget : AIRunTimeNodeAction + { + public AIRuntimeRotateToTarget(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.RotateToTarget(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRotateToTarget.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRotateToTarget.cs.meta new file mode 100644 index 00000000..7611dda9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeRotateToTarget.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5e2df41f0d315024589b5ce5d8b3424a +timeCreated: 1611403810 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSendAIEvent.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSendAIEvent.cs new file mode 100644 index 00000000..1fe4d8c4 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSendAIEvent.cs @@ -0,0 +1,45 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeSendAIEvent : AIRunTimeNodeAction + { + private int _msg_to; + + private int _msg_type; + + private int _entity_type_id; + + private string _msg_str; + + private string _pos_name; + + private Vector3 _pos; + + private float _delay_time; + + public AIRuntimeSendAIEvent(XmlElement node) : base(node) + { + this._msg_to = int.Parse(node.GetAttribute("MsgTo")); + this._msg_type = int.Parse(node.GetAttribute("MsgType")); + this._entity_type_id = int.Parse(node.GetAttribute("EntityTypeId")); + this._msg_str = node.GetAttribute("MsgStr"); + this._pos_name = node.GetAttribute("Shared_PosName"); + this._delay_time = float.Parse(node.GetAttribute("DelayTime")); + string[] array = node.GetAttribute("Shared_PosmValue").Split(new char[] + { + ':' + }); + this._pos = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); + } + + public override bool Update(XEntity entity) + { + Vector3 vector3ByName = entity.AI.AIData.GetVector3ByName(this._pos_name, this._pos); + return XSingleton.singleton.SendAIEvent(entity, this._msg_to, this._msg_type, this._entity_type_id, this._msg_str, vector3ByName, this._delay_time); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSendAIEvent.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSendAIEvent.cs.meta new file mode 100644 index 00000000..6af5ba33 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSendAIEvent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c1c185ed54293d44fa085692dca0d12b +timeCreated: 1611404491 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSetDest.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSetDest.cs new file mode 100644 index 00000000..dcb0fee0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSetDest.cs @@ -0,0 +1,170 @@ +using System; +using System.Xml; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeSetDest : AIRunTimeNodeAction + { + private string _final_dest_name; + + private string _target_name; + + private string _nav_name; + + private string _born_pos_name; + + private Vector3 _born_pos; + + private string _tick_count_name; + + private float _random_max; + + private float _adjust_angle; + + private string _adjust_length_name; + + private float _adjust_value; + + private int _adjust_dir; + + private int _set_dest_type; + + public AIRuntimeSetDest(XmlElement node) : base(node) + { + this._final_dest_name = node.GetAttribute("Shared_FinalDestName"); + this._target_name = node.GetAttribute("Shared_TargetName"); + this._nav_name = node.GetAttribute("Shared_NavName"); + this._born_pos_name = node.GetAttribute("Shared_BornPosName"); + this._tick_count_name = node.GetAttribute("Shared_TickCountName"); + this._random_max = float.Parse(node.GetAttribute("RandomMax")); + this._adjust_angle = float.Parse(node.GetAttribute("AdjustAngle")); + this._adjust_length_name = node.GetAttribute("Shared_AdjustLengthName"); + this._adjust_value = float.Parse(node.GetAttribute("Shared_AdjustLengthmValue")); + this._adjust_dir = int.Parse(node.GetAttribute("AdjustDir")); + this._set_dest_type = int.Parse(node.GetAttribute("SetDestType")); + string attribute = node.GetAttribute("Shared_BornPosmValue"); + float num = float.Parse(attribute.Split(new char[] + { + ':' + })[0]); + float num2 = float.Parse(attribute.Split(new char[] + { + ':' + })[1]); + float num3 = float.Parse(attribute.Split(new char[] + { + ':' + })[2]); + this._born_pos = new Vector3(num, num2, num3); + } + + public override bool Update(XEntity entity) + { + Vector3 vector = entity.AI.AIData.GetVector3ByName(this._final_dest_name, Vector3.zero); + XGameObject xgameObjectByName = entity.AI.AIData.GetXGameObjectByName(this._target_name); + Transform transformByName = entity.AI.AIData.GetTransformByName(this._nav_name); + Vector3 vector2 = entity.AI.AIData.GetVector3ByName(this._born_pos_name, Vector3.zero); + int intByName = entity.AI.AIData.GetIntByName(this._tick_count_name, 0); + float floatByName = entity.AI.AIData.GetFloatByName(this._adjust_length_name, this._adjust_value); + bool flag = string.IsNullOrEmpty(this._born_pos_name); + if (flag) + { + vector2 = this._born_pos; + } + Vector3 vector3 = new Vector3(1f, 0f, 1f); + //vector3= new Vector3(1f, 0f, 1f); + int num = XFastEnumIntEqualityComparer.ToInt(SetDestWay.Target); + bool flag2 = this._set_dest_type == XFastEnumIntEqualityComparer.ToInt(SetDestWay.Target); + if (flag2) + { + bool flag3 = xgameObjectByName == null; + if (flag3) + { + return false; + } + vector = xgameObjectByName.Position; + } + else + { + bool flag4 = this._set_dest_type == XFastEnumIntEqualityComparer.ToInt(SetDestWay.BornPos); + if (flag4) + { + vector = vector2; + } + else + { + bool flag5 = this._set_dest_type == XFastEnumIntEqualityComparer.ToInt(SetDestWay.NavPos); + if (flag5) + { + bool flag6 = transformByName == null; + if (flag6) + { + return false; + } + vector = transformByName.position; + } + } + } + bool flag7 = floatByName != 0f; + if (flag7) + { + Vector3 vector4 = Vector3.zero; + bool flag8 = this._adjust_dir == XFastEnumIntEqualityComparer.ToInt(AdjustDirection.TargetDir); + if (flag8) + { + vector4 = entity.EngineObject.Position - vector; + } + else + { + bool flag9 = this._adjust_dir == XFastEnumIntEqualityComparer.ToInt(AdjustDirection.TargetFace) && xgameObjectByName != null; + if (flag9) + { + vector4 = xgameObjectByName.Forward.normalized; + } + else + { + bool flag10 = this._adjust_dir == XFastEnumIntEqualityComparer.ToInt(AdjustDirection.SelfFace); + if (flag10) + { + vector4 = entity.EngineObject.Forward.normalized; + } + } + } + Vector3 vector5 = vector + (Quaternion.Euler(new Vector3(0f, (float)(intByName % 2) * this._adjust_angle * 2f - this._adjust_angle, 0f)) * vector4).normalized * floatByName; + bool flag11 = !XSingleton.singleton.IsPointInMap(vector5); + if (flag11) + { + for (int i = 0; i < 18; i++) + { + float num2 = this._adjust_angle + (float)(i * 10); + vector5 = vector + (Quaternion.Euler(new Vector3(0f, (float)(intByName % 2) * num2 * 2f - num2, 0f)) * vector4).normalized * floatByName; + bool flag12 = XSingleton.singleton.IsPointInMap(vector5); + if (flag12) + { + break; + } + num2 = this._adjust_angle - (float)(i * 10); + vector5 = vector + (Quaternion.Euler(new Vector3(0f, (float)(intByName % 2) * num2 * 2f - num2, 0f)) * vector4).normalized * floatByName; + bool flag13 = XSingleton.singleton.IsPointInMap(vector5); + if (flag13) + { + break; + } + } + } + vector = vector5; + } + bool flag14 = this._random_max > 0f; + if (flag14) + { + vector3.x = XSingleton.singleton.RandomFloat(-0.5f, 0.5f); + vector3.z = XSingleton.singleton.RandomFloat(-0.5f, 0.5f); + vector += this._random_max * vector3.normalized; + } + entity.AI.AIData.SetVector3ByName(this._final_dest_name, vector); + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSetDest.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSetDest.cs.meta new file mode 100644 index 00000000..03f78e63 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeSetDest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a927696a82d4f0240a5e7fe647bfb782 +timeCreated: 1611404297 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeTryCastQTE.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeTryCastQTE.cs new file mode 100644 index 00000000..80f23ba2 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeTryCastQTE.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeTryCastQTE : AIRunTimeNodeAction + { + public AIRuntimeTryCastQTE(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return XSingleton.singleton.CastQTESkill(entity); + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeTryCastQTE.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeTryCastQTE.cs.meta new file mode 100644 index 00000000..d7c331e9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeTryCastQTE.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fbf1ddf79dd1da04682bbfda873d18d3 +timeCreated: 1611404933 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeXHashFunc.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeXHashFunc.cs new file mode 100644 index 00000000..82a88382 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeXHashFunc.cs @@ -0,0 +1,17 @@ +using System; +using System.Xml; + +namespace XMainClient +{ + internal class AIRuntimeXHashFunc : AIRunTimeNodeAction + { + public AIRuntimeXHashFunc(XmlElement node) : base(node) + { + } + + public override bool Update(XEntity entity) + { + return true; + } + } +} diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeXHashFunc.cs.meta b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeXHashFunc.cs.meta new file mode 100644 index 00000000..00a8120b --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeXHashFunc.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a0a19ff24b36d5742b0516da58419293 +timeCreated: 1611404250 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: -- cgit v1.1-26-g67d0