From 7dd83d84d3ecbb92d8cc1da968e5fc3944c22bed Mon Sep 17 00:00:00 2001 From: Peter Klooster Date: Wed, 26 Jun 2024 14:36:04 +0200 Subject: [PATCH 1/6] Start of agent project split --- .../Demos/Complex/Actions/CreateItemAction.cs | 2 +- .../GOAP/Demos/Complex/Actions/EatAction.cs | 2 +- .../Demos/Complex/Actions/GatherItemAction.cs | 2 +- .../Demos/Complex/Actions/HaulItemAction.cs | 2 +- .../Demos/Complex/Actions/PickupItemAction.cs | 2 +- .../Demos/Complex/Actions/WanderAction.cs | 2 +- .../Complex/Behaviours/AgentSpawnBehaviour.cs | 2 +- .../Complex/Behaviours/ComplexAgentBrain.cs | 4 +- .../Behaviours/ComplexTextBehaviour.cs | 8 +- .../Demos/Complex/Prefabs/ComplexAgent.prefab | 15 +- .../com.crashkonijn.goap.demos.complex.asmdef | 4 +- .../GOAP/Demos/Shared/Actions/WanderAction.cs | 2 +- .../Simple/Behaviours/SettingsBehaviour.cs | 2 +- .../Simple/Behaviours/SimpleAgentBrain.cs | 4 +- .../Simple/Behaviours/SimpleTextBehaviour.cs | 8 +- .../GOAP/Demos/Simple/Extensions.cs | 3 + .../Simple/Goap/Actions/EatAppleAction.cs | 3 +- .../Simple/Goap/Actions/PickupAppleAction.cs | 4 +- .../Simple/Goap/Actions/PluckAppleAction.cs | 2 +- .../Demos/Simple/Goap/Actions/WanderAction.cs | 4 +- .../GOAP/Demos/Simple/Prefabs/Agent.prefab | 27 +++- .../GOAP/Demos/Simple/{Goap => }/Scenes.meta | 0 .../{Goap => }/Scenes/SimpleDemoScene.unity | 115 +++++++++++++--- .../Scenes/SimpleDemoScene.unity.meta | 0 .../com.crashkonijn.goap.demos.simple.asmdef | 4 +- Demo/Assets/CrashKonijn/GOAP/Test.meta | 8 -- .../Assets/CrashKonijn/GOAP/Test/Actions.meta | 8 -- .../GOAP/Test/Actions/BegForMoneyAction.cs | 38 ------ .../Test/Actions/BegForMoneyAction.cs.meta | 11 -- .../GOAP/Test/Actions/BuyAppleAction.cs | 39 ------ .../GOAP/Test/Actions/BuyAppleAction.cs.meta | 11 -- .../GOAP/Test/Actions/BuyPieAction.cs | 39 ------ .../GOAP/Test/Actions/BuyPieAction.cs.meta | 11 -- .../GOAP/Test/Actions/EatFoodAction.cs | 39 ------ .../GOAP/Test/Actions/EatFoodAction.cs.meta | 11 -- .../GOAP/Test/Actions/PickupAppleAction.cs | 39 ------ .../Test/Actions/PickupAppleAction.cs.meta | 11 -- .../Test/Actions/PickupCutleriesAction.cs | 39 ------ .../Actions/PickupCutleriesAction.cs.meta | 11 -- .../GOAP/Test/Actions/PickupPlateAction.cs | 39 ------ .../Test/Actions/PickupPlateAction.cs.meta | 11 -- .../GOAP/Test/Actions/SomeOtherAction.cs | 39 ------ .../GOAP/Test/Actions/SomeOtherAction.cs.meta | 11 -- .../GOAP/Test/Actions/StealMoneyAction.cs | 39 ------ .../Test/Actions/StealMoneyAction.cs.meta | 11 -- .../GOAP/Test/Actions/VeryUniqueAction.cs | 47 ------- .../Test/Actions/VeryUniqueAction.cs.meta | 11 -- .../CrashKonijn/GOAP/Test/AgentTypes.meta | 8 -- .../Test/AgentTypes/ExampleAgentType.asset | 19 --- .../AgentTypes/ExampleAgentType.asset.meta | 8 -- .../CrashKonijn/GOAP/Test/Capabilities.meta | 8 -- .../Test/Capabilities/BuyCapability.asset | 88 ------------ .../Capabilities/BuyCapability.asset.meta | 8 -- .../Test/Capabilities/EatCapability.asset | 126 ----------------- .../Capabilities/EatCapability.asset.meta | 8 -- .../Test/Capabilities/MoneyCapability.asset | 60 -------- .../Capabilities/MoneyCapability.asset.meta | 8 -- .../Test/Capabilities/TestCapability.asset | 53 -------- .../Capabilities/TestCapability.asset.meta | 8 -- Demo/Assets/CrashKonijn/GOAP/Test/Goals.meta | 8 -- .../GOAP/Test/Goals/FixHungerGoal.cs | 10 -- .../GOAP/Test/Goals/FixHungerGoal.cs.meta | 11 -- .../CrashKonijn/GOAP/Test/Goals/TestGoal.cs | 10 -- .../GOAP/Test/Goals/TestGoal.cs.meta | 11 -- .../CrashKonijn/GOAP/Test/TargetKeys.meta | 8 -- .../GOAP/Test/TargetKeys/AnotherTargetKey.cs | 8 -- .../Test/TargetKeys/AnotherTargetKey.cs.meta | 11 -- .../CrashKonijn/GOAP/Test/TestGenerator.asset | 15 -- .../GOAP/Test/TestGenerator.asset.meta | 8 -- .../CrashKonijn/GOAP/Test/WorldKeys.meta | 8 -- .../GOAP/Test/WorldKeys/ApplesForSale.cs | 8 -- .../GOAP/Test/WorldKeys/ApplesForSale.cs.meta | 11 -- .../GOAP/Test/WorldKeys/ApplesOnTheGround.cs | 8 -- .../Test/WorldKeys/ApplesOnTheGround.cs.meta | 11 -- .../GOAP/Test/WorldKeys/AtTable.cs | 8 -- .../GOAP/Test/WorldKeys/AtTable.cs.meta | 11 -- .../GOAP/Test/WorldKeys/HasCutleries.cs | 8 -- .../GOAP/Test/WorldKeys/HasCutleries.cs.meta | 11 -- .../GOAP/Test/WorldKeys/HasFood.cs | 8 -- .../GOAP/Test/WorldKeys/HasFood.cs.meta | 11 -- .../GOAP/Test/WorldKeys/HasMoney.cs | 8 -- .../GOAP/Test/WorldKeys/HasMoney.cs.meta | 11 -- .../GOAP/Test/WorldKeys/HasPlate.cs | 8 -- .../GOAP/Test/WorldKeys/HasPlate.cs.meta | 11 -- .../GOAP/Test/WorldKeys/IsHungry.cs | 8 -- .../GOAP/Test/WorldKeys/IsHungry.cs.meta | 11 -- .../GOAP/Test/WorldKeys/PiesForSale.cs | 8 -- .../GOAP/Test/WorldKeys/PiesForSale.cs.meta | 11 -- .../GOAP/Test/WorldKeys/TestKeyy.cs | 8 -- .../GOAP/Test/WorldKeys/TestKeyy.cs.meta | 11 -- .../ProjectSettings/EditorBuildSettings.asset | 2 +- Demo/UserSettings/EditorUserSettings.asset | 4 +- .../Elements/ActionPropertiesElement.cs | 4 +- .../GraphViewer/ConditionElement.cs | 4 +- .../GraphViewer/ConnectionElement.cs | 10 +- .../GraphViewer/GraphViewerEditorWindow.cs | 4 +- .../GraphViewer/NodeElement.cs | 12 +- .../Styles/Generic.uss | 10 +- .../TypeDrawers/AgentEditor.cs | 34 +++-- .../TypeDrawers/GoapAgentEditor.cs | 55 ++++++++ .../TypeDrawers/GoapAgentEditor.cs.meta | 3 + .../com.crashkonijn.goap.editor.asmdef | 4 +- Package/Runtime/CrashKonijn.Agent.Core.meta | 3 + .../CrashKonijn.Agent.Core/Delegates.cs | 11 ++ .../CrashKonijn.Agent.Core/Delegates.cs.meta | 3 + .../Runtime/CrashKonijn.Agent.Core/Enums.meta | 3 + .../Enums/ActionMoveMode.cs | 0 .../Enums/ActionMoveMode.cs.meta | 0 .../Enums/AgentMoveState.cs | 0 .../Enums/AgentMoveState.cs.meta | 0 .../Enums/AgentState.cs | 0 .../Enums/AgentState.cs.meta | 0 .../Enums/DebugMode.cs | 0 .../Enums/DebugMode.cs.meta | 0 .../Enums/DebugSeverity.cs | 0 .../Enums/DebugSeverity.cs.meta | 0 .../CrashKonijn.Agent.Core/Interfaces.meta | 3 + .../Interfaces/IAction.cs | 6 +- .../Interfaces/IAction.cs.meta | 0 .../Interfaces/IActionContext.cs | 0 .../Interfaces/IActionContext.cs.meta | 0 .../Interfaces/IActionData.cs | 0 .../Interfaces/IActionData.cs.meta | 0 .../Interfaces/IActionProperties.cs | 0 .../Interfaces/IActionProperties.cs.meta | 0 .../Interfaces/IActionResolver.cs | 7 + .../Interfaces/IActionResolver.cs.meta | 3 + .../Interfaces/IActionRunState.cs | 0 .../Interfaces/IActionRunState.cs.meta | 0 .../Interfaces/IActionState.cs | 0 .../Interfaces/IActionState.cs.meta | 0 .../Interfaces/IAgent.cs | 15 +- .../Interfaces/IAgent.cs.meta | 0 .../Interfaces/IAgentDistanceObserver.cs | 0 .../Interfaces/IAgentDistanceObserver.cs.meta | 0 .../Interfaces/IAgentEvents.cs | 16 --- .../Interfaces/IAgentEvents.cs.meta | 0 .../Interfaces/IAgentTimers.cs | 0 .../Interfaces/IAgentTimers.cs.meta | 0 .../Interfaces/IComponentReference.cs | 0 .../Interfaces/IComponentReference.cs.meta | 0 .../Interfaces/IDataReferenceInjector.cs | 0 .../Interfaces/IDataReferenceInjector.cs.meta | 0 .../Interfaces/ILogger.cs | 7 +- .../Interfaces/ILogger.cs.meta | 0 .../Interfaces/ILoggerConfig.cs | 10 ++ .../Interfaces/ILoggerConfig.cs.meta | 3 + .../Interfaces/IMonoAgent.cs | 0 .../Interfaces/IMonoAgent.cs.meta | 0 .../Interfaces/IMonoBehaviour.cs | 0 .../Interfaces/IMonoBehaviour.cs.meta | 0 .../Interfaces/ITarget.cs | 0 .../Interfaces/ITarget.cs.meta | 0 .../Interfaces/ITimer.cs | 0 .../Interfaces/ITimer.cs.meta | 0 .../com.crashkonijn.agent.core.asmdef | 14 ++ .../com.crashkonijn.agent.core.asmdef.meta | 3 + Package/Runtime/CrashKonijn.Agent.meta | 3 + .../ActionBase.cs | 79 ++--------- .../ActionBase.cs.meta | 0 .../ActionContext.cs | 0 .../ActionContext.cs.meta | 0 .../ActionRunner.cs | 2 +- .../ActionRunner.cs.meta | 0 .../ActionState.cs | 0 .../ActionState.cs.meta | 0 .../AgentBehaviour.cs | 111 ++++----------- .../AgentBehaviour.cs.meta | 0 .../AgentEvents.cs | 39 +----- .../AgentEvents.cs.meta | 0 .../CrashKonijn.Agent/AgentException.cs | 11 ++ .../CrashKonijn.Agent/AgentException.cs.meta | 3 + .../Runtime/CrashKonijn.Agent/AgentLogger.cs | 47 +++++++ .../CrashKonijn.Agent/AgentLogger.cs.meta | 3 + .../AgentTimers.cs | 0 .../AgentTimers.cs.meta | 0 .../DataReferenceInjector.cs | 0 .../DataReferenceInjector.cs.meta | 0 .../Runtime/CrashKonijn.Agent/Extensions.cs | 23 ++++ .../CrashKonijn.Agent/Extensions.cs.meta | 3 + .../LoggerBase.cs} | 74 +++------- .../LoggerBase.cs.meta} | 0 .../Runtime/CrashKonijn.Agent/LoggerConfig.cs | 17 +++ .../CrashKonijn.Agent/LoggerConfig.cs.meta | 3 + .../References.meta | 0 .../References/GetComponentAttribute.cs | 0 .../References/GetComponentAttribute.cs.meta | 0 .../GetComponentInChildrenAttribute.cs | 0 .../GetComponentInChildrenAttribute.cs.meta | 0 .../GetComponentInParentAttribute.cs | 0 .../GetComponentInParentAttribute.cs.meta | 0 .../Behaviours => CrashKonijn.Agent}/Timer.cs | 0 .../Timer.cs.meta | 0 .../VectorDistanceObserver.cs | 0 .../VectorDistanceObserver.cs.meta | 0 .../com.crashkonijn.agent.asmdef | 15 ++ .../com.crashkonijn.agent.asmdef.meta | 3 + .../CrashKonijn.Goap.Core/Delegates.cs | 11 +- .../Interfaces/IAgentCollection.cs | 9 +- .../Interfaces/IAgentType.cs | 8 +- .../Interfaces/IAgentTypeEvents.cs | 34 ++--- .../Interfaces/IAgentTypeJobRunner.cs | 2 +- .../CrashKonijn.Goap.Core/Interfaces/IGoap.cs | 2 +- .../Interfaces/IGoapAction.cs | 7 + .../Interfaces/IGoapAction.cs.meta | 3 + .../Interfaces/IGoapActionProviderEvent.cs | 14 ++ .../IGoapActionProviderEvent.cs.meta | 3 + .../Interfaces/IGoapAgent.cs | 18 +++ .../Interfaces/IGoapAgent.cs.meta | 3 + .../Interfaces/IGoapAgentEvents.cs | 23 ++++ .../Interfaces/IGoapAgentEvents.cs.meta | 3 + .../Interfaces/IGoapEvents.cs | 34 ++--- .../Interfaces/IMonoGoapAgent.cs | 7 + .../Interfaces/IMonoGoapAgent.cs.meta | 3 + .../Interfaces/ISensorRunner.cs | 8 +- .../Interfaces/IWorldData.cs | 2 +- .../com.crashkonijn.goap.core.asmdef | 4 +- .../GraphResolver.cs | 2 +- .../Interfaces/IGraphResolver.cs | 2 +- .../com.crashkonijn.goap.resolver.asmdef | 3 +- .../Behaviours/AgentCollection.cs | 17 ++- .../Behaviours/AgentTypeEvents.cs | 34 ++--- .../Behaviours/GoapActionBase.cs | 86 ++++++++++++ .../Behaviours/GoapActionBase.cs.meta | 3 + .../Behaviours/GoapAgentBehaviour.cs | 128 ++++++++++++++++++ .../Behaviours/GoapAgentBehaviour.cs.meta | 3 + .../Behaviours/GoapAgentEvents.cs | 104 ++++++++++++++ .../Behaviours/GoapAgentEvents.cs.meta | 3 + .../Behaviours/GoapBehaviour.cs | 2 +- .../CrashKonijn.Goap/Behaviours/GoapEvents.cs | 34 ++--- .../CrashKonijn.Goap/Classes/AgentType.cs | 12 +- .../Classes/AgentTypeFactory.cs | 4 +- .../Classes/Builders/ActionBuilder.cs | 4 +- .../Classes/Controllers/ManualController.cs | 6 +- .../Controllers/ProactiveController.cs | 20 +-- .../Classes/Controllers/ReactiveController.cs | 18 +-- .../Classes/GoapAgentLogger.cs | 38 ++++++ .../Classes/GoapAgentLogger.cs.meta | 3 + .../Classes/Runners/AgentTypeJobRunner.cs | 24 ++-- .../CrashKonijn.Goap/Classes/Runners/Goap.cs | 4 +- .../Classes/Runners/SensorRunner.cs | 18 +-- .../Runtime/CrashKonijn.Goap/Extensions.cs | 3 + .../Runtime/CrashKonijn.Goap/WorldDataBase.cs | 2 +- .../com.crashkonijn.goap.asmdef | 4 +- .../UnitTests/ActionRunnerTests.cs | 44 +++--- .../UnitTests/AgentBehaviourTests.cs | 128 ++++++++++-------- .../UnitTests/AgentTypeJobRunnerTests.cs | 67 ++++----- .../UnitTests/Classes/TestAction.cs | 2 +- .../UnitTests/Data/Action.cs | 4 +- .../UnitTests/Interfaces/ITestAction.cs | 2 +- .../UnitTests/ManualControllerTests.cs | 6 +- .../UnitTests/ProactiveControllerTests.cs | 18 +-- .../UnitTests/ReactiveControllerTests.cs | 8 +- .../UnitTests/SensorRunnerTests.cs | 14 +- .../UnitTests/Support/Extensions.cs | 35 ++++- .../UnitTests/WorldDataBaseTests.cs | 2 +- .../com.crashkonijn.goap.tests.asmdef | 4 +- 257 files changed, 1341 insertions(+), 1907 deletions(-) rename Demo/Assets/CrashKonijn/GOAP/Demos/Simple/{Goap => }/Scenes.meta (100%) rename Demo/Assets/CrashKonijn/GOAP/Demos/Simple/{Goap => }/Scenes/SimpleDemoScene.unity (96%) rename Demo/Assets/CrashKonijn/GOAP/Demos/Simple/{Goap => }/Scenes/SimpleDemoScene.unity.meta (100%) delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/BegForMoneyAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/BegForMoneyAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyAppleAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyAppleAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyPieAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyPieAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/EatFoodAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/EatFoodAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupAppleAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupAppleAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupCutleriesAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupCutleriesAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupPlateAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupPlateAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/SomeOtherAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/SomeOtherAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/StealMoneyAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/StealMoneyAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/VeryUniqueAction.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Actions/VeryUniqueAction.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes/ExampleAgentType.asset delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes/ExampleAgentType.asset.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Capabilities.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/BuyCapability.asset delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/BuyCapability.asset.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/EatCapability.asset delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/EatCapability.asset.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/MoneyCapability.asset delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/MoneyCapability.asset.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/TestCapability.asset delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/TestCapability.asset.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Goals.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Goals/FixHungerGoal.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Goals/FixHungerGoal.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Goals/TestGoal.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/Goals/TestGoal.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys/AnotherTargetKey.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys/AnotherTargetKey.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/TestGenerator.asset delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/TestGenerator.asset.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesForSale.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesForSale.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesOnTheGround.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesOnTheGround.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/AtTable.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/AtTable.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasCutleries.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasCutleries.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasFood.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasFood.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasMoney.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasMoney.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasPlate.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasPlate.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/IsHungry.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/IsHungry.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/PiesForSale.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/PiesForSale.cs.meta delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/TestKeyy.cs delete mode 100644 Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/TestKeyy.cs.meta create mode 100644 Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs create mode 100644 Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Agent.Core.meta create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Enums.meta rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/ActionMoveMode.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/ActionMoveMode.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/AgentMoveState.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/AgentMoveState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/AgentState.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/AgentState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/DebugMode.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/DebugMode.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/DebugSeverity.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Enums/DebugSeverity.cs.meta (100%) create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces.meta rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAction.cs (89%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAction.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionContext.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionContext.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionData.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionData.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionProperties.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionProperties.cs.meta (100%) create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs.meta rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionRunState.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionRunState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionState.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IActionState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAgent.cs (72%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAgent.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAgentDistanceObserver.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAgentDistanceObserver.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAgentEvents.cs (66%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAgentEvents.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAgentTimers.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IAgentTimers.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IComponentReference.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IComponentReference.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IDataReferenceInjector.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IDataReferenceInjector.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/ILogger.cs (69%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/ILogger.cs.meta (100%) create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs.meta rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IMonoAgent.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IMonoAgent.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IMonoBehaviour.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/IMonoBehaviour.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/ITarget.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/ITarget.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/ITimer.cs (100%) rename Package/Runtime/{CrashKonijn.Goap.Core => CrashKonijn.Agent.Core}/Interfaces/ITimer.cs.meta (100%) create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/com.crashkonijn.agent.core.asmdef create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/com.crashkonijn.agent.core.asmdef.meta create mode 100644 Package/Runtime/CrashKonijn.Agent.meta rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/ActionBase.cs (50%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/ActionBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/ActionContext.cs (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/ActionContext.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/ActionRunner.cs (98%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/ActionRunner.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/ActionState.cs (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/ActionState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/AgentBehaviour.cs (69%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/AgentBehaviour.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/AgentEvents.cs (58%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/AgentEvents.cs.meta (100%) create mode 100644 Package/Runtime/CrashKonijn.Agent/AgentException.cs create mode 100644 Package/Runtime/CrashKonijn.Agent/AgentException.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Agent/AgentLogger.cs create mode 100644 Package/Runtime/CrashKonijn.Agent/AgentLogger.cs.meta rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/AgentTimers.cs (100%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/AgentTimers.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes/References => CrashKonijn.Agent}/DataReferenceInjector.cs (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes/References => CrashKonijn.Agent}/DataReferenceInjector.cs.meta (100%) create mode 100644 Package/Runtime/CrashKonijn.Agent/Extensions.cs create mode 100644 Package/Runtime/CrashKonijn.Agent/Extensions.cs.meta rename Package/Runtime/{CrashKonijn.Goap/Classes/Logger.cs => CrashKonijn.Agent/LoggerBase.cs} (53%) rename Package/Runtime/{CrashKonijn.Goap/Classes/Logger.cs.meta => CrashKonijn.Agent/LoggerBase.cs.meta} (100%) create mode 100644 Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs create mode 100644 Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs.meta rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/References.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/References/GetComponentAttribute.cs (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/References/GetComponentAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/References/GetComponentInChildrenAttribute.cs (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/References/GetComponentInChildrenAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/References/GetComponentInParentAttribute.cs (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes => CrashKonijn.Agent}/References/GetComponentInParentAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/Timer.cs (100%) rename Package/Runtime/{CrashKonijn.Goap/Behaviours => CrashKonijn.Agent}/Timer.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Observers => CrashKonijn.Agent}/VectorDistanceObserver.cs (100%) rename Package/Runtime/{CrashKonijn.Goap/Observers => CrashKonijn.Agent}/VectorDistanceObserver.cs.meta (100%) create mode 100644 Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef create mode 100644 Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef.meta create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs create mode 100644 Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs create mode 100644 Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs create mode 100644 Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs create mode 100644 Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs.meta diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/CreateItemAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/CreateItemAction.cs index 7011e02a..f925a9ae 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/CreateItemAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/CreateItemAction.cs @@ -13,7 +13,7 @@ namespace CrashKonijn.Goap.Demos.Complex.Actions { - public class CreateItemAction : ActionBase.Data, CreateItemAction.Props>, IInjectable + public class CreateItemAction : GoapActionBase.Data, CreateItemAction.Props>, IInjectable where TCreatable : ItemBase, ICreatable { private ItemFactory itemFactory; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs index 346bf5b3..2f95a462 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs @@ -9,7 +9,7 @@ namespace CrashKonijn.Goap.Demos.Complex.Actions { - public class EatAction : ActionBase, IInjectable + public class EatAction : GoapActionBase, IInjectable { private InstanceHandler instanceHandler; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/GatherItemAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/GatherItemAction.cs index 0a06d37d..361f585e 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/GatherItemAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/GatherItemAction.cs @@ -12,7 +12,7 @@ namespace CrashKonijn.Goap.Demos.Complex.Actions { - public class GatherItemAction : ActionBase.Data, GatherItemAction.Props>, IInjectable + public class GatherItemAction : GoapActionBase.Data, GatherItemAction.Props>, IInjectable where TGatherable : ItemBase { private ItemFactory itemFactory; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/HaulItemAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/HaulItemAction.cs index b0f2fe01..6c42f080 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/HaulItemAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/HaulItemAction.cs @@ -12,7 +12,7 @@ namespace CrashKonijn.Goap.Demos.Complex.Actions { - public class HaulItemAction : ActionBase, IInjectable + public class HaulItemAction : GoapActionBase, IInjectable { private ItemCollection itemCollection; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs index 9954080b..bc4106be 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs @@ -10,7 +10,7 @@ namespace CrashKonijn.Goap.Demos.Complex.Actions { - public class PickupItemAction : ActionBase.Data>, IInjectable + public class PickupItemAction : GoapActionBase.Data>, IInjectable where THoldable : IHoldable { private ItemCollection itemCollection; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/WanderAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/WanderAction.cs index 7176c1be..ed613bd8 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/WanderAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/WanderAction.cs @@ -6,7 +6,7 @@ namespace CrashKonijn.Goap.Demos.Complex.Actions { - public class WanderAction : ActionBase + public class WanderAction : GoapActionBase { public override void Created() { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs index db150353..b210ab66 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs @@ -37,7 +37,7 @@ private void Start() private void SpawnAgent(string setId, ComplexAgentBrain.AgentType agentType, Color color) { - var agent = Instantiate(this.agentPrefab, this.GetRandomPosition(), Quaternion.identity).GetComponent(); + var agent = Instantiate(this.agentPrefab, this.GetRandomPosition(), Quaternion.identity).GetComponent(); agent.AgentType = this.goap.GetAgentType(setId); agent.gameObject.SetActive(true); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs index 63613220..16192a5e 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs @@ -9,14 +9,14 @@ namespace CrashKonijn.Goap.Demos.Complex.Behaviours public class ComplexAgentBrain : MonoBehaviour { public AgentType agentType; - private AgentBehaviour agent; + private GoapAgentBehaviour agent; private ComplexHungerBehaviour complexHunger; private ItemCollection itemCollection; private ComplexInventoryBehaviour inventory; private void Awake() { - this.agent = this.GetComponent(); + this.agent = this.GetComponent(); this.complexHunger = this.GetComponent(); this.inventory = this.GetComponent(); this.itemCollection = FindObjectOfType(); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs index 5066a8a2..5d6cb0d9 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs @@ -8,14 +8,14 @@ namespace CrashKonijn.Goap.Demos.Complex.Behaviours public class ComplexTextBehaviour : MonoBehaviour { private TextMeshProUGUI text; - private AgentBehaviour agent; + private GoapAgentBehaviour agent; private ComplexHungerBehaviour simpleComplexHunger; private ComplexAgentBrain brain; private void Awake() { this.text = this.GetComponentInChildren(); - this.agent = this.GetComponent(); + this.agent = this.GetComponent(); this.simpleComplexHunger = this.GetComponent(); this.brain = this.GetComponent(); } @@ -30,10 +30,10 @@ private string GetText() if (this.agent.CurrentGoal is null) return $"{this.GetTypeText()}\nIdle"; - if (this.agent.ActionState.Action is null) + if (this.agent.Agent.ActionState.Action is null) return $"{this.GetTypeText()}\nIdle"; - return $"{this.GetTypeText()}\n{this.agent.CurrentGoal.GetType().GetGenericTypeName()}\n{this.agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; + return $"{this.GetTypeText()}\n{this.agent.CurrentGoal.GetType().GetGenericTypeName()}\n{this.agent.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.Agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; } private string GetTypeText() diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab index c4adcd29..d99a20c9 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab @@ -9,6 +9,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2644901599046946488} + - component: {fileID: -5926512986792016431} - component: {fileID: 3664022629467210336} - component: {fileID: 2567974379695048867} - component: {fileID: 7347070554750064065} @@ -40,6 +41,19 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-5926512986792016431 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 31104030825128304} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 72344165e2cc41da93476bb1aa2cdd4b, type: 3} + m_Name: + m_EditorClassIdentifier: + agentTypeBehaviour: {fileID: 0} --- !u!114 &3664022629467210336 MonoBehaviour: m_ObjectHideFlags: 0 @@ -52,7 +66,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1cef53d855ccf0b46bcf004b27c4a52a, type: 3} m_Name: m_EditorClassIdentifier: - agentTypeBehaviour: {fileID: 0} k__BackingField: 1 k__BackingField: 1 k__BackingField: 20 diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/com.crashkonijn.goap.demos.complex.asmdef b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/com.crashkonijn.goap.demos.complex.asmdef index c136bcd2..2867c611 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/com.crashkonijn.goap.demos.complex.asmdef +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/com.crashkonijn.goap.demos.complex.asmdef @@ -4,7 +4,9 @@ "references": [ "GUID:6eb7f39de256eea4bb8708df2c32e1ba", "GUID:1492f7fc38ce464dae5c20df05fd22e3", - "GUID:6055be8ebefd69e48b49212b09b47b2f" + "GUID:6055be8ebefd69e48b49212b09b47b2f", + "GUID:0d347051544a4880a72466503e27985a", + "GUID:4d9088d80ac84f52b9b07421f95af69c" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Actions/WanderAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Actions/WanderAction.cs index 2ed6027b..37c367b3 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Actions/WanderAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Actions/WanderAction.cs @@ -7,7 +7,7 @@ namespace Demos.Shared.Actions { - public class WanderAction : ActionBase + public class WanderAction : GoapActionBase { public override void Created() { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs index fc691d5e..b9fece7b 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs @@ -95,7 +95,7 @@ public void SpawnAgent() for (var i = 0; i < count; i++) { - var agent = Instantiate(this.agentPrefab, this.GetRandomPosition(), Quaternion.identity).GetComponent(); + var agent = Instantiate(this.agentPrefab, this.GetRandomPosition(), Quaternion.identity).GetComponent(); agent.AgentType = this.agentType.AgentType; this.SetDebug(agent.GetComponentInChildren(), this.debug); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs index 52fcef47..51b24fc8 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs @@ -6,12 +6,12 @@ namespace CrashKonijn.Goap.Demos.Simple.Behaviours { public class SimpleAgentBrain : MonoBehaviour { - private AgentBehaviour agent; + private GoapAgentBehaviour agent; private SimpleHungerBehaviour hunger; private void Awake() { - this.agent = this.GetComponent(); + this.agent = this.GetComponent(); this.hunger = this.GetComponent(); } diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs index db5e3bc4..d510c337 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs @@ -8,13 +8,13 @@ namespace CrashKonijn.Goap.Demos.Simple.Behaviours public class SimpleTextBehaviour : MonoBehaviour { private TextMeshProUGUI text; - private AgentBehaviour agent; + private GoapAgentBehaviour agent; private SimpleHungerBehaviour simpleHunger; private void Awake() { this.text = this.GetComponentInChildren(); - this.agent = this.GetComponent(); + this.agent = this.GetComponent(); this.simpleHunger = this.GetComponent(); } @@ -28,10 +28,10 @@ private string GetText() if (this.agent.CurrentGoal is null) return "Idle"; - if (this.agent.ActionState.Action is null) + if (this.agent.Agent.ActionState.Action is null) return "Idle"; - return $"{this.agent.CurrentGoal.GetType().GetGenericTypeName()}\n{this.agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; + return $"{this.agent.CurrentGoal.GetType().GetGenericTypeName()}\n{this.agent.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.Agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Extensions.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Extensions.cs index 4bc3f785..fe2ca65f 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Extensions.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Extensions.cs @@ -33,6 +33,9 @@ public static T Closest(this IEnumerable items, Vector3 position) foreach (var item in items) { + if (item == null) + continue; + var distance = Vector3.Distance(item.transform.position, position); if (!(distance < closestDistance)) continue; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs index bdb67a67..8c44cb69 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs @@ -3,7 +3,6 @@ using CrashKonijn.Goap.Behaviours; using CrashKonijn.Goap.Classes.References; using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; using CrashKonijn.Goap.Core.Interfaces; using CrashKonijn.Goap.Demos.Simple.Behaviours; using UnityEngine; @@ -11,7 +10,7 @@ namespace CrashKonijn.Goap.Demos.Simple.Goap.Actions { [GoapId("Simple-EatAppleAction")] - public class EatAppleAction : ActionBase + public class EatAppleAction : GoapActionBase { public override void Created() { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs index 3b3ae96c..26ab9778 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs @@ -12,12 +12,12 @@ namespace CrashKonijn.Goap.Demos.Simple.Goap.Actions { [GoapId("Simple-PickupAppleAction")] - public class PickupAppleAction : ActionBase + public class PickupAppleAction : GoapActionBase { public override void Created() { } - + public override void Start(IMonoAgent agent, Data data) { if (data.Target is not TransformTarget transformTarget) diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PluckAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PluckAppleAction.cs index 7d37a8a6..b106d023 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PluckAppleAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PluckAppleAction.cs @@ -11,7 +11,7 @@ namespace CrashKonijn.Goap.Demos.Simple.Goap.Actions { [GoapId("Simple-PluckAppleAction")] - public class PluckAppleAction : ActionBase + public class PluckAppleAction : GoapActionBase { public override void Created() { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/WanderAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/WanderAction.cs index 9a0570ca..bda910c3 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/WanderAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/WanderAction.cs @@ -2,15 +2,13 @@ using CrashKonijn.Goap.Attributes; using CrashKonijn.Goap.Behaviours; using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; using Random = UnityEngine.Random; namespace CrashKonijn.Goap.Demos.Simple.Goap.Actions { [GoapId("Simple-WanderAction")] - public class WanderAction : ActionBase + public class WanderAction : GoapActionBase { public override void Created() { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab index 5b031dbe..8eb203c7 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab @@ -114,6 +114,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 4823857909233374360} + - component: {fileID: -2073804781843839524} - component: {fileID: 7404671039891351144} - component: {fileID: 4823857909233374367} - component: {fileID: 271546477} @@ -143,8 +144,24 @@ Transform: - {fileID: 3883320178211587631} - {fileID: 2691210283582884549} m_Father: {fileID: 0} - m_RootOrder: 16 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-2073804781843839524 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4823857909233374357} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 72344165e2cc41da93476bb1aa2cdd4b, type: 3} + m_Name: + m_EditorClassIdentifier: + k__BackingField: + k__BackingField: 1 + k__BackingField: 20 + k__BackingField: {fileID: 0} --- !u!114 &7404671039891351144 MonoBehaviour: m_ObjectHideFlags: 0 @@ -157,10 +174,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1cef53d855ccf0b46bcf004b27c4a52a, type: 3} m_Name: m_EditorClassIdentifier: - agentTypeBehaviour: {fileID: 0} + k__BackingField: + k__BackingField: 1 + k__BackingField: 20 k__BackingField: 1 - k__BackingField: 1 - k__BackingField: 20 --- !u!114 &4823857909233374367 MonoBehaviour: m_ObjectHideFlags: 0 @@ -219,7 +236,7 @@ MonoBehaviour: m_GameObject: {fileID: 4823857909233374357} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0dc89a1df52a4499a4efb85d8b5ad601, type: 3} + m_Script: {fileID: 11500000, guid: 5d55e9c9be4438343b6c311bdbc1b549, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &898294010904684375 diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Scenes.meta b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes.meta similarity index 100% rename from Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Scenes.meta rename to Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes.meta diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Scenes/SimpleDemoScene.unity b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity similarity index 96% rename from Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Scenes/SimpleDemoScene.unity rename to Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity index 89466007..36f1dc92 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Scenes/SimpleDemoScene.unity +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity @@ -733,6 +733,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: agentTypeBehaviour + value: + objectReference: {fileID: 845821375} + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -821,6 +831,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: agentTypeBehaviour + value: + objectReference: {fileID: 845821375} + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -1162,6 +1182,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: agentTypeBehaviour + value: + objectReference: {fileID: 845821375} + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -1227,16 +1257,6 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 7404671039891351144, guid: f2233afe6b5d3734dbb94bce7789238e, - type: 3} - propertyPath: agentTypeBehaviour - value: - objectReference: {fileID: 845821375} - - target: {fileID: 7404671039891351144, guid: f2233afe6b5d3734dbb94bce7789238e, - type: 3} - propertyPath: k__BackingField - value: 1 - objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -1250,6 +1270,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: agentTypeBehaviour + value: + objectReference: {fileID: 845821375} + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -1333,6 +1363,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: agentTypeBehaviour + value: + objectReference: {fileID: 845821375} + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -1421,6 +1461,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: agentTypeBehaviour + value: + objectReference: {fileID: 845821375} + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -2680,6 +2730,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: agentTypeBehaviour + value: + objectReference: {fileID: 845821375} + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -2971,6 +3031,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: agentTypeBehaviour + value: + objectReference: {fileID: 845821375} + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -3212,6 +3282,16 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: agentTypeBehaviour + value: + objectReference: {fileID: 845821375} + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -3295,6 +3375,11 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 845821375} - target: {fileID: 4823857909233374357, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} propertyPath: m_Name @@ -3360,16 +3445,6 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 7404671039891351144, guid: f2233afe6b5d3734dbb94bce7789238e, - type: 3} - propertyPath: agentTypeBehaviour - value: - objectReference: {fileID: 845821375} - - target: {fileID: 7404671039891351144, guid: f2233afe6b5d3734dbb94bce7789238e, - type: 3} - propertyPath: k__BackingField - value: 1 - objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Scenes/SimpleDemoScene.unity.meta b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity.meta similarity index 100% rename from Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Scenes/SimpleDemoScene.unity.meta rename to Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity.meta diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/com.crashkonijn.goap.demos.simple.asmdef b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/com.crashkonijn.goap.demos.simple.asmdef index ca568be8..b00c61af 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/com.crashkonijn.goap.demos.simple.asmdef +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/com.crashkonijn.goap.demos.simple.asmdef @@ -5,7 +5,9 @@ "GUID:6eb7f39de256eea4bb8708df2c32e1ba", "GUID:1492f7fc38ce464dae5c20df05fd22e3", "GUID:6055be8ebefd69e48b49212b09b47b2f", - "GUID:8c19236ae19b65a49bd19f75f42f6e44" + "GUID:8c19236ae19b65a49bd19f75f42f6e44", + "GUID:0d347051544a4880a72466503e27985a", + "GUID:4d9088d80ac84f52b9b07421f95af69c" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Demo/Assets/CrashKonijn/GOAP/Test.meta b/Demo/Assets/CrashKonijn/GOAP/Test.meta deleted file mode 100644 index 6ea2f818..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e8c60056834107c4fa1399aa429ba78c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions.meta deleted file mode 100644 index 4cc56a46..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 48e15204db156d8479b34ef97a6a9382 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BegForMoneyAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BegForMoneyAction.cs deleted file mode 100644 index f618d3dc..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BegForMoneyAction.cs +++ /dev/null @@ -1,38 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("BegForMoney-eec1193b-de39-43a5-aa68-0d78807a7954")] - public class BegForMoneyAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BegForMoneyAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BegForMoneyAction.cs.meta deleted file mode 100644 index e7096e82..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BegForMoneyAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0ea4df7242f6d9d4daef9963bdd8b376 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyAppleAction.cs deleted file mode 100644 index 0c8be484..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyAppleAction.cs +++ /dev/null @@ -1,39 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("BuyApple-2811cd3f-2c6f-488e-94ad-8cc5fa46013f")] - public class BuyAppleAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyAppleAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyAppleAction.cs.meta deleted file mode 100644 index ec62fa4a..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyAppleAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 500eaa280344ef843b9707efb55760e6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyPieAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyPieAction.cs deleted file mode 100644 index 48b79839..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyPieAction.cs +++ /dev/null @@ -1,39 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("BuyPie-3680d80a-685a-47e8-9f00-f060d3d895aa")] - public class BuyPieAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyPieAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyPieAction.cs.meta deleted file mode 100644 index aad0fad1..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/BuyPieAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c8dd6d5dcf1bd23489d2238a09047a88 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/EatFoodAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/EatFoodAction.cs deleted file mode 100644 index 1a76fc4e..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/EatFoodAction.cs +++ /dev/null @@ -1,39 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("EatApple-069cb9ae-b7f8-4e99-940d-934e0df18baa")] - public class EatFoodAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/EatFoodAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/EatFoodAction.cs.meta deleted file mode 100644 index 5df99b9f..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/EatFoodAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fecbbe4198f570645a1aae0d1c0d04e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupAppleAction.cs deleted file mode 100644 index f89d9a1b..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupAppleAction.cs +++ /dev/null @@ -1,39 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("PickupApple-3dfd7e22-0bc8-4f9a-9851-e7bb74a35c77")] - public class PickupAppleAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupAppleAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupAppleAction.cs.meta deleted file mode 100644 index 2539b7d2..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupAppleAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 932fb03ee1b71334882639f6831040e3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupCutleriesAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupCutleriesAction.cs deleted file mode 100644 index c4fb6471..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupCutleriesAction.cs +++ /dev/null @@ -1,39 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("PickupCutleries-4058ed59-d274-4e43-b9cf-7c00f1ceaa30")] - public class PickupCutleriesAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupCutleriesAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupCutleriesAction.cs.meta deleted file mode 100644 index 85bcb557..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupCutleriesAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 416e861a0ca27b64d967d704fd10f6c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupPlateAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupPlateAction.cs deleted file mode 100644 index e5ad2dba..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupPlateAction.cs +++ /dev/null @@ -1,39 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("PickupPlate-b843ee22-7dd8-4709-abab-716456975930")] - public class PickupPlateAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupPlateAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupPlateAction.cs.meta deleted file mode 100644 index 7bc6699e..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/PickupPlateAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 64e03436a6ee4ee458b36b63e42bdbda -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/SomeOtherAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/SomeOtherAction.cs deleted file mode 100644 index a912ba7c..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/SomeOtherAction.cs +++ /dev/null @@ -1,39 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("SomeOther-c23f2477-2b28-4efd-ac57-0886700dd051")] - public class SomeOtherAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/SomeOtherAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/SomeOtherAction.cs.meta deleted file mode 100644 index 9562a614..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/SomeOtherAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b548e9d73dd2a1a46b978b8d42b6a87b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/StealMoneyAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/StealMoneyAction.cs deleted file mode 100644 index 6081beb0..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/StealMoneyAction.cs +++ /dev/null @@ -1,39 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("StealMoney-9d697ad2-49ed-4a02-aadb-4a69461a8844")] - public class StealMoneyAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/StealMoneyAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/StealMoneyAction.cs.meta deleted file mode 100644 index 50fa4d01..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/StealMoneyAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 85492842e9c56df4f856e0518524b475 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/VeryUniqueAction.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/VeryUniqueAction.cs deleted file mode 100644 index 329588ad..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/VeryUniqueAction.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("VeryUnique-97508604-5cf4-4f1e-8d39-dbb74eed201f")] - public class VeryUniqueAction : ActionBase - { - public override void Created() - { - } - - public override void Start(IMonoAgent agent, Data data) - { - } - - public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) - { - return ActionRunState.Stop; - } - - public override void Stop(IMonoAgent agent, Data data) - { - } - - public override void Complete(IMonoAgent agent, Data data) - { - } - - public class Data : IActionData - { - public ITarget Target { get; set; } - } - - [Serializable] - public class Props : IActionProperties - { - public string words; - public int number; - } - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/VeryUniqueAction.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Actions/VeryUniqueAction.cs.meta deleted file mode 100644 index 802d810b..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Actions/VeryUniqueAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ca53bf1b73037364187db54a99bf3a90 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes.meta b/Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes.meta deleted file mode 100644 index afb0e501..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fa521090784869641844179d93f80749 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes/ExampleAgentType.asset b/Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes/ExampleAgentType.asset deleted file mode 100644 index f188bf1f..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes/ExampleAgentType.asset +++ /dev/null @@ -1,19 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d368a8b48fd34cbd83b85cf61794f000, type: 3} - m_Name: ExampleAgentType - m_EditorClassIdentifier: - debuggerClass: - behaviours: - - {fileID: 11400000, guid: ea9d79b1e6c5a12438ff594b47aade80, type: 2} - - {fileID: 11400000, guid: f52ef9fb88fe40642b658e7d2e4c6d29, type: 2} - - {fileID: 11400000, guid: 43ceb1c3f6fb16e4ab37252e704f84bd, type: 2} diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes/ExampleAgentType.asset.meta b/Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes/ExampleAgentType.asset.meta deleted file mode 100644 index 4114ca6b..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/AgentTypes/ExampleAgentType.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6dd8d04be5bb1714db23ef81b44d797e -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities.meta deleted file mode 100644 index d17d4452..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 59dc2b7f350a635458240fd5f6c891eb -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/BuyCapability.asset b/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/BuyCapability.asset deleted file mode 100644 index ae41f87d..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/BuyCapability.asset +++ /dev/null @@ -1,88 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 875fbfa2d1734285b353878b31467c98, type: 3} - m_Name: BuyCapability - m_EditorClassIdentifier: - goals: [] - actions: - - action: - k__BackingField: BuyAppleAction - k__BackingField: BuyApple-2811cd3f-2c6f-488e-94ad-8cc5fa46013f - target: - k__BackingField: AnotherTargetKey - k__BackingField: AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb - properties: - rid: 5955038660131291140 - baseCost: 1 - inRange: 0.1 - moveMode: 0 - conditions: - - worldKey: - k__BackingField: HasMoney - k__BackingField: HasMoney-f8279ea0-d74a-40b8-b072-6a56986d7051 - comparison: 3 - amount: 5 - - worldKey: - k__BackingField: ApplesForSale - k__BackingField: ApplesForSale-9e41bc85-387d-47a1-9c71-f4a9c53b3e3e - comparison: 3 - amount: 0 - effects: - - worldKey: - k__BackingField: HasFood - k__BackingField: HasApple-dbc1a152-2367-430a-8cdd-974d44896d87 - effect: 1 - - worldKey: - k__BackingField: HasFood - k__BackingField: HasApple-dbc1a152-2367-430a-8cdd-974d44896d87 - effect: 0 - - action: - k__BackingField: BuyPieAction - k__BackingField: BuyPie-3680d80a-685a-47e8-9f00-f060d3d895aa - target: - k__BackingField: AnotherTargetKey - k__BackingField: AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb - properties: - rid: 5955038660131291143 - baseCost: 1 - inRange: 0.1 - moveMode: 0 - conditions: - - worldKey: - k__BackingField: HasMoney - k__BackingField: HasMoney-f8279ea0-d74a-40b8-b072-6a56986d7051 - comparison: 2 - amount: 3 - - worldKey: - k__BackingField: PiesForSale - k__BackingField: PiesForSale-717f2d3d-067e-4992-b7a1-63a04e71a15c - comparison: 3 - amount: 1 - effects: - - worldKey: - k__BackingField: HasFood - k__BackingField: HasApple-dbc1a152-2367-430a-8cdd-974d44896d87 - effect: 1 - - worldKey: - k__BackingField: HasMoney - k__BackingField: HasMoney-f8279ea0-d74a-40b8-b072-6a56986d7051 - effect: 0 - worldSensors: [] - targetSensors: [] - multiSensors: [] - references: - version: 2 - RefIds: - - rid: 5955038660131291140 - type: {class: EmptyActionProperties, ns: CrashKonijn.Goap.Behaviours, asm: CrashKonijn.Goap} - - rid: 5955038660131291143 - type: {class: EmptyActionProperties, ns: CrashKonijn.Goap.Behaviours, asm: CrashKonijn.Goap} diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/BuyCapability.asset.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/BuyCapability.asset.meta deleted file mode 100644 index 15feb6b7..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/BuyCapability.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ea9d79b1e6c5a12438ff594b47aade80 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/EatCapability.asset b/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/EatCapability.asset deleted file mode 100644 index de726bc4..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/EatCapability.asset +++ /dev/null @@ -1,126 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 875fbfa2d1734285b353878b31467c98, type: 3} - m_Name: EatCapability - m_EditorClassIdentifier: - goals: - - goal: - k__BackingField: FixHungerGoal - k__BackingField: FixHunger-7d399d0c-ed31-467b-9a31-57d4acc3ef4d - conditions: - - worldKey: - k__BackingField: IsHungry - k__BackingField: IsHungry-73502d09-11dc-4b5b-9d25-356fe24deab1 - comparison: 1 - amount: 50 - actions: - - action: - k__BackingField: EatFoodAction - k__BackingField: EatApple-069cb9ae-b7f8-4e99-940d-934e0df18baa - target: - k__BackingField: AnotherTargetKey - k__BackingField: AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb - properties: - rid: 5955038660131291144 - baseCost: 1 - inRange: 0.1 - moveMode: 0 - conditions: - - worldKey: - k__BackingField: HasFood - k__BackingField: HasApple-dbc1a152-2367-430a-8cdd-974d44896d87 - comparison: 3 - amount: 1 - - worldKey: - k__BackingField: HasCutleries - k__BackingField: HasCutleries-ed181b18-25b2-4153-9f26-e9a6b314b6ba - comparison: 3 - amount: 1 - - worldKey: - k__BackingField: HasPlate - k__BackingField: HasPlate-0292fc2a-9225-4e9b-9cdf-36194264587e - comparison: 3 - amount: 1 - effects: - - worldKey: - k__BackingField: HasFood - k__BackingField: HasApple-dbc1a152-2367-430a-8cdd-974d44896d87 - effect: 0 - - worldKey: - k__BackingField: IsHungry - k__BackingField: IsHungry-73502d09-11dc-4b5b-9d25-356fe24deab1 - effect: 0 - - action: - k__BackingField: PickupAppleAction - k__BackingField: PickupApple-3dfd7e22-0bc8-4f9a-9851-e7bb74a35c77 - target: - k__BackingField: AnotherTargetKey - k__BackingField: AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb - properties: - rid: 5955038660131291145 - baseCost: 1 - inRange: 0.1 - moveMode: 0 - conditions: [] - effects: - - worldKey: - k__BackingField: HasFood - k__BackingField: HasApple-dbc1a152-2367-430a-8cdd-974d44896d87 - effect: 1 - - action: - k__BackingField: PickupCutleriesAction - k__BackingField: PickupCutleries-4058ed59-d274-4e43-b9cf-7c00f1ceaa30 - target: - k__BackingField: AnotherTargetKey - k__BackingField: AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb - properties: - rid: 5955038660131291146 - baseCost: 1 - inRange: 0.1 - moveMode: 0 - conditions: [] - effects: - - worldKey: - k__BackingField: HasCutleries - k__BackingField: HasCutleries-ed181b18-25b2-4153-9f26-e9a6b314b6ba - effect: 1 - - action: - k__BackingField: PickupPlateAction - k__BackingField: PickupPlate-b843ee22-7dd8-4709-abab-716456975930 - target: - k__BackingField: AnotherTargetKey - k__BackingField: AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb - properties: - rid: 5955038660131291147 - baseCost: 1 - inRange: 0.1 - moveMode: 0 - conditions: [] - effects: - - worldKey: - k__BackingField: HasPlate - k__BackingField: HasPlate-0292fc2a-9225-4e9b-9cdf-36194264587e - effect: 1 - worldSensors: [] - targetSensors: [] - multiSensors: [] - references: - version: 2 - RefIds: - - rid: 5955038660131291144 - type: {class: EmptyActionProperties, ns: CrashKonijn.Goap.Behaviours, asm: CrashKonijn.Goap} - - rid: 5955038660131291145 - type: {class: EmptyActionProperties, ns: CrashKonijn.Goap.Behaviours, asm: CrashKonijn.Goap} - - rid: 5955038660131291146 - type: {class: EmptyActionProperties, ns: CrashKonijn.Goap.Behaviours, asm: CrashKonijn.Goap} - - rid: 5955038660131291147 - type: {class: EmptyActionProperties, ns: CrashKonijn.Goap.Behaviours, asm: CrashKonijn.Goap} diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/EatCapability.asset.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/EatCapability.asset.meta deleted file mode 100644 index 350607bc..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/EatCapability.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f52ef9fb88fe40642b658e7d2e4c6d29 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/MoneyCapability.asset b/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/MoneyCapability.asset deleted file mode 100644 index 21a59917..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/MoneyCapability.asset +++ /dev/null @@ -1,60 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 875fbfa2d1734285b353878b31467c98, type: 3} - m_Name: MoneyCapability - m_EditorClassIdentifier: - goals: [] - actions: - - action: - k__BackingField: BegForMoneyAction - k__BackingField: BegForMoney-eec1193b-de39-43a5-aa68-0d78807a7954 - target: - k__BackingField: AnotherTargetKey - k__BackingField: AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb - properties: - rid: 5955038660131291141 - baseCost: 1 - inRange: 0.1 - moveMode: 0 - conditions: [] - effects: - - worldKey: - k__BackingField: HasMoney - k__BackingField: HasMoney-f8279ea0-d74a-40b8-b072-6a56986d7051 - effect: 1 - - action: - k__BackingField: StealMoneyAction - k__BackingField: StealMoney-9d697ad2-49ed-4a02-aadb-4a69461a8844 - target: - k__BackingField: AnotherTargetKey - k__BackingField: AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb - properties: - rid: 5955038660131291142 - baseCost: 1 - inRange: 0.1 - moveMode: 0 - conditions: [] - effects: - - worldKey: - k__BackingField: HasMoney - k__BackingField: HasMoney-f8279ea0-d74a-40b8-b072-6a56986d7051 - effect: 1 - worldSensors: [] - targetSensors: [] - multiSensors: [] - references: - version: 2 - RefIds: - - rid: 5955038660131291141 - type: {class: EmptyActionProperties, ns: CrashKonijn.Goap.Behaviours, asm: CrashKonijn.Goap} - - rid: 5955038660131291142 - type: {class: EmptyActionProperties, ns: CrashKonijn.Goap.Behaviours, asm: CrashKonijn.Goap} diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/MoneyCapability.asset.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/MoneyCapability.asset.meta deleted file mode 100644 index db558687..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/MoneyCapability.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 43ceb1c3f6fb16e4ab37252e704f84bd -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/TestCapability.asset b/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/TestCapability.asset deleted file mode 100644 index abb41195..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/TestCapability.asset +++ /dev/null @@ -1,53 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 875fbfa2d1734285b353878b31467c98, type: 3} - m_Name: TestCapability - m_EditorClassIdentifier: - goals: - - goal: - k__BackingField: TestGoal - k__BackingField: Test-219cae30-3998-4d06-84f6-7ccc86f7af29 - conditions: - - worldKey: - k__BackingField: TestKeyy - k__BackingField: TestKeyy-eb6a725c-2dec-4e3f-ba82-5d05f7426d12 - comparison: 2 - amount: 1 - actions: - - action: - k__BackingField: VeryUniqueAction - k__BackingField: VeryUnique-97508604-5cf4-4f1e-8d39-dbb74eed201f - target: - k__BackingField: AnotherTargetKey - k__BackingField: AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb - properties: - rid: 1537142740700102710 - baseCost: 1 - inRange: 0.1 - moveMode: 0 - conditions: [] - effects: - - worldKey: - k__BackingField: TestKeyy - k__BackingField: TestKeyy-eb6a725c-2dec-4e3f-ba82-5d05f7426d12 - effect: 1 - worldSensors: [] - targetSensors: [] - multiSensors: [] - references: - version: 2 - RefIds: - - rid: 1537142740700102710 - type: {class: VeryUniqueAction/Props, ns: CrashKonijn.Goap.GenTest, asm: Assembly-CSharp} - data: - words: asdfsad - number: 0 diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/TestCapability.asset.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/TestCapability.asset.meta deleted file mode 100644 index a7cb0cf5..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Capabilities/TestCapability.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fc949f321caff6e47b3b33bfc745e177 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Goals.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Goals.meta deleted file mode 100644 index a430c08e..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Goals.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a22e461ff38a68d4599b99aac7cff2c8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Goals/FixHungerGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Goals/FixHungerGoal.cs deleted file mode 100644 index a15d4604..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Goals/FixHungerGoal.cs +++ /dev/null @@ -1,10 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("FixHunger-7d399d0c-ed31-467b-9a31-57d4acc3ef4d")] - public class FixHungerGoal : GoalBase - { - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Goals/FixHungerGoal.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Goals/FixHungerGoal.cs.meta deleted file mode 100644 index 9de9ebfe..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Goals/FixHungerGoal.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6e4580a8b029ef54d911945466f58239 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Goals/TestGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Test/Goals/TestGoal.cs deleted file mode 100644 index 106bd8f3..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Goals/TestGoal.cs +++ /dev/null @@ -1,10 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("Test-219cae30-3998-4d06-84f6-7ccc86f7af29")] - public class TestGoal : GoalBase - { - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/Goals/TestGoal.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/Goals/TestGoal.cs.meta deleted file mode 100644 index 3d533308..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/Goals/TestGoal.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 233cf641dfb279e468d9f0f6cc8bcbff -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys.meta b/Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys.meta deleted file mode 100644 index fb128c39..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f0c7db22edcb82541ae888bf6e82fb40 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys/AnotherTargetKey.cs b/Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys/AnotherTargetKey.cs deleted file mode 100644 index bdbe14ee..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys/AnotherTargetKey.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("AnotherTargetKey-b7aace5a-bdbe-4fc9-83fb-3b67053fd7fb")] - public class AnotherTargetKey : TargetKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys/AnotherTargetKey.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys/AnotherTargetKey.cs.meta deleted file mode 100644 index ee2a6d33..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/TargetKeys/AnotherTargetKey.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cbf256d2598007e48879cc650192125d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/TestGenerator.asset b/Demo/Assets/CrashKonijn/GOAP/Test/TestGenerator.asset deleted file mode 100644 index 91de2526..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/TestGenerator.asset +++ /dev/null @@ -1,15 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0857b2a53377458ebec6c4b1179e3c5a, type: 3} - m_Name: TestGenerator - m_EditorClassIdentifier: - nameSpace: CrashKonijn.Goap.GenTest diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/TestGenerator.asset.meta b/Demo/Assets/CrashKonijn/GOAP/Test/TestGenerator.asset.meta deleted file mode 100644 index 6ee5ec5e..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/TestGenerator.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d64a310597762354c9601b761ce3afbc -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys.meta deleted file mode 100644 index 712ddc89..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 41dae74a57de7cf439c7bfa6d05e7ea1 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesForSale.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesForSale.cs deleted file mode 100644 index e94d1629..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesForSale.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("ApplesForSale-9e41bc85-387d-47a1-9c71-f4a9c53b3e3e")] - public class ApplesForSale : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesForSale.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesForSale.cs.meta deleted file mode 100644 index dfba0a28..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesForSale.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6ba888c471ceaa740a11f497be95927f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesOnTheGround.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesOnTheGround.cs deleted file mode 100644 index 86e47e80..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesOnTheGround.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("ApplesOnTheGround-532077fb-b4df-417f-a80f-4e6d20cd5333")] - public class ApplesOnTheGround : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesOnTheGround.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesOnTheGround.cs.meta deleted file mode 100644 index 6a034b4c..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/ApplesOnTheGround.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 50e0793b9149b274eacdf480dc07d3a6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/AtTable.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/AtTable.cs deleted file mode 100644 index a07ad01e..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/AtTable.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("AtTable-23a4c983-56cf-47be-bab5-5d684be483a1")] - public class AtTable : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/AtTable.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/AtTable.cs.meta deleted file mode 100644 index f94b5b1d..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/AtTable.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f0a99d2368e727341b104aecb5329a84 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasCutleries.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasCutleries.cs deleted file mode 100644 index 3bea738c..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasCutleries.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("HasCutleries-ed181b18-25b2-4153-9f26-e9a6b314b6ba")] - public class HasCutleries : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasCutleries.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasCutleries.cs.meta deleted file mode 100644 index 3fbddf06..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasCutleries.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 954518429e2a50d468c17817961b51e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasFood.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasFood.cs deleted file mode 100644 index fdd67524..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasFood.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("HasApple-dbc1a152-2367-430a-8cdd-974d44896d87")] - public class HasFood : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasFood.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasFood.cs.meta deleted file mode 100644 index 0efa3f1f..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasFood.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 71abc669392e5ca41a3da827831448f3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasMoney.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasMoney.cs deleted file mode 100644 index 7524be13..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasMoney.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("HasMoney-f8279ea0-d74a-40b8-b072-6a56986d7051")] - public class HasMoney : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasMoney.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasMoney.cs.meta deleted file mode 100644 index 306b169e..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasMoney.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d84012e669f2e034287d9ba548602e8b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasPlate.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasPlate.cs deleted file mode 100644 index cfd56244..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasPlate.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("HasPlate-0292fc2a-9225-4e9b-9cdf-36194264587e")] - public class HasPlate : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasPlate.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasPlate.cs.meta deleted file mode 100644 index e52fd65f..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/HasPlate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fda1f348ef56a6b4baadcc6804f44169 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/IsHungry.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/IsHungry.cs deleted file mode 100644 index 8e3b2b70..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/IsHungry.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("IsHungry-73502d09-11dc-4b5b-9d25-356fe24deab1")] - public class IsHungry : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/IsHungry.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/IsHungry.cs.meta deleted file mode 100644 index d695223f..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/IsHungry.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 34a81fe02ede1a74785131e0579f71a4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/PiesForSale.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/PiesForSale.cs deleted file mode 100644 index 1aaa856f..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/PiesForSale.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("PiesForSale-717f2d3d-067e-4992-b7a1-63a04e71a15c")] - public class PiesForSale : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/PiesForSale.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/PiesForSale.cs.meta deleted file mode 100644 index 3a33a47b..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/PiesForSale.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f217ae6ad1eccc54b8bfcb8790787fde -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/TestKeyy.cs b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/TestKeyy.cs deleted file mode 100644 index c82bd620..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/TestKeyy.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Attributes; - -namespace CrashKonijn.Goap.GenTest -{ - [GoapId("TestKeyy-eb6a725c-2dec-4e3f-ba82-5d05f7426d12")] - public class TestKeyy : WorldKeyBase {} -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/TestKeyy.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/TestKeyy.cs.meta deleted file mode 100644 index ed8b432f..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Test/WorldKeys/TestKeyy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 221ef7ef00e4f7545904fa21b61ddfd2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Demo/ProjectSettings/EditorBuildSettings.asset b/Demo/ProjectSettings/EditorBuildSettings.asset index 565ec29a..86a6627f 100644 --- a/Demo/ProjectSettings/EditorBuildSettings.asset +++ b/Demo/ProjectSettings/EditorBuildSettings.asset @@ -6,7 +6,7 @@ EditorBuildSettings: serializedVersion: 2 m_Scenes: - enabled: 1 - path: Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Scenes/SimpleDemoScene.unity + path: Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity guid: 99c9720ab356a0642a771bea13969a05 - enabled: 1 path: Assets/CrashKonijn/GOAP/Demos/Complex/Scenes/ComplexDemoScene.unity diff --git a/Demo/UserSettings/EditorUserSettings.asset b/Demo/UserSettings/EditorUserSettings.asset index 5cd84e84..97ad5c31 100644 --- a/Demo/UserSettings/EditorUserSettings.asset +++ b/Demo/UserSettings/EditorUserSettings.asset @@ -9,10 +9,10 @@ EditorUserSettings: value: 02040505000d5d5d090b5c7740705b441516402c757b2261787b1e37bab6656e flags: 0 RecentlyUsedSceneGuid-1: - value: 5a08575f5207595a0f5d59741173094444164f7d7d2a23317c7a4465bbe1646d + value: 50540d56560408025856082143210944124f402b2d2d7062757f4f66b5e5326d flags: 0 RecentlyUsedSceneGuid-2: - value: 50540d56560408025856082143210944124f402b2d2d7062757f4f66b5e5326d + value: 5a08575f5207595a0f5d59741173094444164f7d7d2a23317c7a4465bbe1646d flags: 0 vcSharedLogLevel: value: 0d5e400f0650 diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs index 606e95c4..67466403 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs @@ -101,10 +101,10 @@ private Type GetPropertiesType(Script script) if (baseType == null) return null; - if (baseType.IsGenericType && baseType.GetGenericTypeDefinition() == typeof(ActionBase<,>)) + if (baseType.IsGenericType && baseType.GetGenericTypeDefinition() == typeof(GoapActionBase<,>)) return baseType.GetGenericArguments()[1]; - if (baseType.IsGenericType && baseType.GetGenericTypeDefinition() == typeof(ActionBase<>)) + if (baseType.IsGenericType && baseType.GetGenericTypeDefinition() == typeof(GoapActionBase<>)) return typeof(EmptyActionProperties); return null; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs index aa95b05d..4174cfc0 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs @@ -48,7 +48,7 @@ private Color GetCircleColor(INodeCondition condition) private Color GetLiveColor() { - if (this.values.SelectedObject is not IMonoAgent agent) + if (this.values.SelectedObject is not IMonoGoapAgent agent) return Color.white; if (agent.AgentType == null) @@ -72,7 +72,7 @@ private string GetSuffix(ICondition condition) if (!Application.isPlaying) return ""; - if (this.values.SelectedObject is not IMonoAgent agent) + if (this.values.SelectedObject is not IMonoGoapAgent agent) return ""; var (exists, value) = agent.WorldData.GetWorldValue(condition.WorldKey); diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs index 05212afd..7d214d51 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs @@ -75,7 +75,7 @@ private Color GetColor() if (this.values.SelectedObject == null) return Color.black; - if (this.values.SelectedObject is not IMonoAgent agent) + if (this.values.SelectedObject is not IMonoGoapAgent agent) return Color.black; var actions = agent.CurrentPlan; @@ -88,14 +88,14 @@ private Color GetColor() private string GetCost() { - if (this.values.SelectedObject is not IMonoAgent agent) + if (this.values.SelectedObject is not IMonoGoapAgent agent) return ""; if (!Application.isPlaying) return ""; - var fromAction = this.fromNode.GraphNode.Action as IAction; - var toAction = this.toNode.GraphNode.Action as IAction; + var fromAction = this.fromNode.GraphNode.Action as IGoapAction; + var toAction = this.toNode.GraphNode.Action as IGoapAction; if (fromAction == null || toAction == null) return ""; @@ -107,7 +107,7 @@ private string GetCost() return ""; var distance = Vector3.Distance(startVector.Position, endVector.Position); - var cost = agent.DistanceMultiplier * distance; + var cost = agent.Agent.DistanceMultiplier * distance; return cost.ToString("F2"); } diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs index e8eabb83..28a3948a 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs @@ -82,10 +82,10 @@ private void OnSelectionChange() return; } - var agent = gameObject.GetComponent(); + var agent = gameObject.GetComponent(); if (agent != null) { - var agentType = agent.AgentType ?? new AgentTypeFactory(GoapConfig.Default).Create(agent.agentTypeBehaviour.Config.Create(), false); + var agentType = agent.AgentType ?? new AgentTypeFactory(GoapConfig.Default).Create(agent.AgentTypeBehaviour.Config.Create(), false); var graph = new GraphBuilder(GoapConfig.Default.KeyResolver).Build(agentType.GetAllNodes().ToArray()); this.RenderGraph(graph, agent); diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs index 8ed6fc14..187befac 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs @@ -70,7 +70,7 @@ public NodeElement(INode graphNode, VisualElement bezierRoot, EditorWindowValues if (!Application.isPlaying) { - var config = (graphNode.Action as IAction)?.Config; + var config = (graphNode.Action as IGoapAction)?.Config; if (config != null) { @@ -99,7 +99,7 @@ public NodeElement(INode graphNode, VisualElement bezierRoot, EditorWindowValues if (!Application.isPlaying) return; - if (values.SelectedObject is not IMonoAgent agent) + if (values.SelectedObject is not IMonoGoapAgent agent) return; if (agent.CurrentGoal == this.GraphNode.Action) @@ -108,7 +108,7 @@ public NodeElement(INode graphNode, VisualElement bezierRoot, EditorWindowValues return; } - if (agent.ActionState.Action == this.GraphNode.Action) + if (agent.Agent.ActionState.Action == this.GraphNode.Action) { this.Node.AddToClassList("active"); return; @@ -123,14 +123,14 @@ public NodeElement(INode graphNode, VisualElement bezierRoot, EditorWindowValues if (graphNode.Action is not IAction action) return; - if (!action.IsEnabled(agent)) + if (!action.IsEnabled(agent.Agent)) { this.Node.AddToClassList("disabled"); return; } - this.Cost.text = $"Cost: {graphNode.GetCost(agent)}"; - var target = agent.WorldData.GetTarget(graphNode.Action as IAction); + this.Cost.text = $"Cost: {graphNode.GetCost(agent.Agent)}"; + var target = agent.WorldData.GetTarget(graphNode.Action as IGoapAction); var targetText = target != null ? target.Position.ToString() : "null"; this.Target.text = $"Target: {targetText}"; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Styles/Generic.uss b/Package/Editor/CrashKonijn.Goap.Editor/Styles/Generic.uss index d709b0b5..8f263e1b 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Styles/Generic.uss +++ b/Package/Editor/CrashKonijn.Goap.Editor/Styles/Generic.uss @@ -1,16 +1,12 @@ #header { - font-size: 20px; - border-bottom-width: 1px; - border-bottom-color: #1e1e1e; + font-size: 16px; + /*border-bottom-width: 1px;*/ + /*border-bottom-color: #1e1e1e;*/ margin-top: 5px; margin-bottom: 5px; padding-bottom: 5px; } -.unity-property-field { - margin-bottom: 10px; -} - #card { background-color: var(--unity-colors-tooltip-background); border-radius: 5px; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs index a271d199..33d53b17 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs @@ -18,36 +18,34 @@ public override VisualElement CreateInspectorGUI() root.styleSheets.Add(AssetDatabase.LoadAssetAtPath($"{GoapEditorSettings.BasePath}/Styles/Generic.uss")); - root.Add(new PropertyField(this.serializedObject.FindProperty("agentTypeBehaviour"))); + // root.Add(new PropertyField(this.serializedObject.FindProperty("agentTypeBehaviour"))); root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); - root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); - root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); + root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); if (!Application.isPlaying) return root; var agent = (AgentBehaviour) this.target; - var currentGoal = agent.CurrentGoal; var currentAction = agent.ActionState.Action; var state = agent.State; var moveState = agent.MoveState; root.Add(new Card((card) => { - card.Add(new Label(), (label) => - { - label.text = "Goal: " + agent.CurrentGoal?.GetType().GetGenericTypeName(); - - label.schedule.Execute(() => - { - if (currentGoal == agent.CurrentGoal) - return; - - currentGoal = agent.CurrentGoal; - label.text = "Goal: " + agent.CurrentGoal?.GetType().GetGenericTypeName(); - }).Every(33); - }); + // card.Add(new Label(), (label) => + // { + // label.text = "Goal: " + agent.CurrentGoal?.GetType().GetGenericTypeName(); + // + // label.schedule.Execute(() => + // { + // if (currentGoal == agent.CurrentGoal) + // return; + // + // currentGoal = agent.CurrentGoal; + // label.text = "Goal: " + agent.CurrentGoal?.GetType().GetGenericTypeName(); + // }).Every(33); + // }); card.Add(new Label(), (label) => { @@ -97,7 +95,7 @@ public override VisualElement CreateInspectorGUI() card.Add(new ObjectDrawer(agent.ActionState.Data)); })); - root.Add(new WorldDataDrawer(agent.WorldData)); + root.Add(new LogDrawer(agent.Logger)); diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs new file mode 100644 index 00000000..80a646c4 --- /dev/null +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs @@ -0,0 +1,55 @@ +using CrashKonijn.Agent; +using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Editor.Drawers; +using CrashKonijn.Goap.Editor.Elements; +using UnityEditor; +using UnityEditor.UIElements; +using UnityEngine.Device; +using UnityEngine.UIElements; + +namespace CrashKonijn.Goap.Editor.TypeDrawers +{ + [CustomEditor(typeof(GoapAgentBehaviour))] + public class GoapAgentEditor : UnityEditor.Editor + { + public override VisualElement CreateInspectorGUI() + { + var root = new VisualElement(); + + root.styleSheets.Add(AssetDatabase.LoadAssetAtPath($"{GoapEditorSettings.BasePath}/Styles/Generic.uss")); + + root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); + root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); + + if (!Application.isPlaying) + return root; + + var agent = (GoapAgentBehaviour) this.target; + + var currentGoal = agent.CurrentGoal; + + root.Add(new Card((card) => + { + card.Add(new Label(), (label) => + { + label.text = "Goal: " + currentGoal?.GetType().GetGenericTypeName(); + + label.schedule.Execute(() => + { + if (currentGoal == agent.CurrentGoal) + return; + + currentGoal = agent.CurrentGoal; + label.text = "Goal: " + currentGoal?.GetType().GetGenericTypeName(); + }).Every(33); + }); + })); + + root.Add(new WorldDataDrawer(agent.WorldData)); + + root.Add(new LogDrawer(agent.Logger)); + + return root; + } + } +} \ No newline at end of file diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs.meta b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs.meta new file mode 100644 index 00000000..eb22e2b8 --- /dev/null +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a51fa607b7c94c898972d1490b76edf4 +timeCreated: 1719404318 \ No newline at end of file diff --git a/Package/Editor/CrashKonijn.Goap.Editor/com.crashkonijn.goap.editor.asmdef b/Package/Editor/CrashKonijn.Goap.Editor/com.crashkonijn.goap.editor.asmdef index 9ab26a59..64705f46 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/com.crashkonijn.goap.editor.asmdef +++ b/Package/Editor/CrashKonijn.Goap.Editor/com.crashkonijn.goap.editor.asmdef @@ -4,7 +4,9 @@ "references": [ "GUID:6eb7f39de256eea4bb8708df2c32e1ba", "GUID:e52adf591423434e8c16eeb452c84a82", - "GUID:1492f7fc38ce464dae5c20df05fd22e3" + "GUID:1492f7fc38ce464dae5c20df05fd22e3", + "GUID:0d347051544a4880a72466503e27985a", + "GUID:4d9088d80ac84f52b9b07421f95af69c" ], "includePlatforms": [ "Editor" diff --git a/Package/Runtime/CrashKonijn.Agent.Core.meta b/Package/Runtime/CrashKonijn.Agent.Core.meta new file mode 100644 index 00000000..8429f894 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d502a88af65b46e18746f9c402f25c31 +timeCreated: 1719322542 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs b/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs new file mode 100644 index 00000000..d980f95b --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs @@ -0,0 +1,11 @@ +using CrashKonijn.Goap.Core.Interfaces; + +namespace CrashKonijn.Goap.Core +{ + public delegate void ActionDelegate(IAction action); + public delegate void AgentActionDelegate(IAgent agent, IAction action); + public delegate void TargetDelegate(ITarget target); + public delegate void TargetRangeDelegate(ITarget target, bool inRange); + public delegate void AgentDelegate(IAgent agent); + public delegate void EmptyDelegate(); +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs.meta new file mode 100644 index 00000000..b4d130ce --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 24661624e67547afaa30967e722beca9 +timeCreated: 1719323643 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Enums.meta b/Package/Runtime/CrashKonijn.Agent.Core/Enums.meta new file mode 100644 index 00000000..7302c5af --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Enums.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f8f39bff7f5e4e8d932a069b40e5860e +timeCreated: 1719322720 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/ActionMoveMode.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/ActionMoveMode.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/ActionMoveMode.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/ActionMoveMode.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/ActionMoveMode.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Enums/ActionMoveMode.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/ActionMoveMode.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/ActionMoveMode.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/AgentMoveState.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentMoveState.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/AgentMoveState.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentMoveState.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/AgentMoveState.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentMoveState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/AgentMoveState.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentMoveState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/AgentState.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentState.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/AgentState.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentState.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/AgentState.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/AgentState.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/DebugMode.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugMode.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/DebugMode.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugMode.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/DebugMode.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugMode.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/DebugMode.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugMode.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/DebugSeverity.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugSeverity.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/DebugSeverity.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugSeverity.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/DebugSeverity.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugSeverity.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Enums/DebugSeverity.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugSeverity.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces.meta new file mode 100644 index 00000000..af0996f5 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 290d1e2fa3bc466ebd96cb08d956f85a +timeCreated: 1719322725 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAction.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs similarity index 89% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAction.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs index 4fa55f61..7dfe4674 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAction.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs @@ -1,12 +1,12 @@ using System; +using CrashKonijn.Goap.Core.Enums; namespace CrashKonijn.Goap.Core.Interfaces { - public interface IAction : IConnectable, IHasConfig + public interface IAction { float GetCost(IMonoAgent agent, IComponentReference references); - [Obsolete("Please use the IsInRange method")] - float GetInRange(IMonoAgent agent, IActionData data); + ActionMoveMode GetMoveMode(IMonoAgent agent); bool IsInRange(IMonoAgent agent, float distance, IActionData data, IComponentReference references); IActionData GetData(); /// diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAction.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAction.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionContext.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionContext.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionContext.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionContext.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionContext.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionContext.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionContext.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionContext.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionData.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionData.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionData.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionData.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionData.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionData.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionData.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionData.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionProperties.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProperties.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionProperties.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProperties.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionProperties.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProperties.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionProperties.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProperties.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs new file mode 100644 index 00000000..8cd445be --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs @@ -0,0 +1,7 @@ +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface IActionResolver + { + void ResolveAction(); + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs.meta new file mode 100644 index 00000000..21059d09 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 17f39b5ccf9f4958b1b89617a7f286bb +timeCreated: 1719394095 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionRunState.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRunState.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionRunState.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRunState.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionRunState.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRunState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionRunState.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRunState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionState.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionState.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionState.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionState.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionState.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionState.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgent.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs similarity index 72% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgent.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs index c18dc85b..44188e77 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgent.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs @@ -7,13 +7,9 @@ namespace CrashKonijn.Goap.Core.Interfaces public interface IAgent { float DistanceMultiplier { get; } - DebugMode DebugMode { get; } - int MaxLogSize { get; } List DisabledActions { get; } AgentState State { get; } AgentMoveState MoveState { get; } - IAgentType AgentType { get; } - IGoal CurrentGoal { get; } [Obsolete("Use ActionState.Action instead.")] IAction CurrentAction { get; } [Obsolete("Use ActionState.Data instead.")] @@ -21,21 +17,18 @@ public interface IAgent [Obsolete("Use ActionState.RunState instead.")] IActionRunState RunState { get; } IActionState ActionState { get; } - ILocalWorldData WorldData { get; } - IConnectable[] CurrentPlan { get; } IAgentEvents Events { get; } IDataReferenceInjector Injector { get; } IAgentDistanceObserver DistanceObserver { get; } IAgentTimers Timers { get; } ITarget CurrentTarget { get; } - ILogger Logger { get; } + ILogger Logger { get; } + IActionResolver ActionResolver { get; set; } + void Initialize(); void Run(); - void ClearGoal(); - void SetGoal(bool endAction) where TGoal : IGoal; - void SetGoal(IGoal goal, bool endAction); - void SetAction(IAction action, IConnectable[] path, ITarget target); + void SetAction(IActionResolver actionResolver, IAction action, ITarget target); void StopAction(bool resolveAction = true); void CompleteAction(bool resolveAction = true); void ResolveAction(); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgent.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgent.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentDistanceObserver.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentDistanceObserver.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentDistanceObserver.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentDistanceObserver.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentDistanceObserver.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentDistanceObserver.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentDistanceObserver.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentDistanceObserver.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentEvents.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentEvents.cs similarity index 66% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentEvents.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentEvents.cs index 13bfd5d8..db96d782 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentEvents.cs @@ -2,8 +2,6 @@ { public interface IAgentEvents { - void Bind(IAgent agent, IAgentTypeEvents valueEvents); - // Actions event ActionDelegate OnActionStart; void ActionStart(IAction action); @@ -17,16 +15,6 @@ public interface IAgentEvents event ActionDelegate OnActionComplete; void ActionComplete(IAction action); - event GoalDelegate OnNoActionFound; - void NoActionFound(IGoal goal); - - // Goals - event GoalDelegate OnGoalStart; - void GoalStart(IGoal goal); - - event GoalDelegate OnGoalCompleted; - void GoalCompleted(IGoal goal); - // Targets event TargetDelegate OnTargetInRange; void TargetInRange(ITarget target); @@ -39,9 +27,5 @@ public interface IAgentEvents event TargetDelegate OnMove; void Move(ITarget target); - - // General - event EmptyDelegate OnResolve; - void Resolve(); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentEvents.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentEvents.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentEvents.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentEvents.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTimers.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentTimers.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTimers.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentTimers.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTimers.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentTimers.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTimers.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentTimers.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IComponentReference.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IComponentReference.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IComponentReference.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IComponentReference.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IComponentReference.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IComponentReference.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IComponentReference.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IComponentReference.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IDataReferenceInjector.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IDataReferenceInjector.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IDataReferenceInjector.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IDataReferenceInjector.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IDataReferenceInjector.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IDataReferenceInjector.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IDataReferenceInjector.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IDataReferenceInjector.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILogger.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILogger.cs similarity index 69% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILogger.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILogger.cs index e7c91829..cd3ff5ae 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILogger.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILogger.cs @@ -1,11 +1,14 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Core.Enums; namespace CrashKonijn.Goap.Core.Interfaces { + public interface ILogger : ILogger + { + void Initialize(ILoggerConfig config, TObj obj); + } + public interface ILogger { - IMonoAgent Agent { get; set; } List Logs { get; } void Log(string message); void Warning(string message); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILogger.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILogger.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILogger.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILogger.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs new file mode 100644 index 00000000..66e57285 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs @@ -0,0 +1,10 @@ +using CrashKonijn.Goap.Core.Enums; + +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface ILoggerConfig + { + public DebugMode DebugMode { get; } + public int MaxLogSize { get; } + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs.meta new file mode 100644 index 00000000..87e019ce --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f8095622bfb3409ab4c07cd142266dfb +timeCreated: 1719403118 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoAgent.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoAgent.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoAgent.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoAgent.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoAgent.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoAgent.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoAgent.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoAgent.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoBehaviour.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoBehaviour.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoBehaviour.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoBehaviour.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoBehaviour.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoBehaviour.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITarget.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITarget.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITarget.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITarget.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITarget.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITarget.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITarget.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITarget.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITimer.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITimer.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITimer.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITimer.cs diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITimer.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITimer.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITimer.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITimer.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent.Core/com.crashkonijn.agent.core.asmdef b/Package/Runtime/CrashKonijn.Agent.Core/com.crashkonijn.agent.core.asmdef new file mode 100644 index 00000000..3ba1f1b4 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/com.crashkonijn.agent.core.asmdef @@ -0,0 +1,14 @@ +{ + "name": "CrashKonijn.Agent.Core", + "rootNamespace": "CrashKonijn.Agent.Core", + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/com.crashkonijn.agent.core.asmdef.meta b/Package/Runtime/CrashKonijn.Agent.Core/com.crashkonijn.agent.core.asmdef.meta new file mode 100644 index 00000000..8be05929 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/com.crashkonijn.agent.core.asmdef.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0d347051544a4880a72466503e27985a +timeCreated: 1719322542 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.meta b/Package/Runtime/CrashKonijn.Agent.meta new file mode 100644 index 00000000..ae53fe59 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b71aaf4a52504dca95c486d2553ee632 +timeCreated: 1719322466 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ActionBase.cs b/Package/Runtime/CrashKonijn.Agent/ActionBase.cs similarity index 50% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ActionBase.cs rename to Package/Runtime/CrashKonijn.Agent/ActionBase.cs index 213b4499..6c2ad545 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/ActionBase.cs +++ b/Package/Runtime/CrashKonijn.Agent/ActionBase.cs @@ -1,4 +1,5 @@ using System; +using CrashKonijn.Goap.Core.Enums; using CrashKonijn.Goap.Core.Interfaces; namespace CrashKonijn.Goap.Behaviours @@ -14,11 +15,11 @@ public abstract class ActionBase : ActionBase : ActionBase + public abstract class ActionBase where TActionData : IActionData, new() where TActionProperties : class, IActionProperties, new() { - public override IActionData GetData() + public IActionData GetData() { return this.CreateData(); } @@ -28,45 +29,18 @@ public virtual TActionData CreateData() return new TActionData(); } - public TActionProperties Properties => this.Config.Properties as TActionProperties; + public abstract TActionProperties Properties { get; } - public override void Start(IMonoAgent agent, IActionData data) => this.Start(agent, (TActionData) data); + public void Start(IMonoAgent agent, IActionData data) => this.Start(agent, (TActionData) data); public abstract void Start(IMonoAgent agent, TActionData data); - public override bool IsValid(IMonoAgent agent, IActionData data) - { - if (!agent.AgentType.AllConditionsMet(agent, this)) - { - agent.Logger.Warning($"Conditions not met for {agent.name}: {this.Config.Name}"); - return false; - } - - if (this.Config.RequiresTarget && agent.WorldData.GetTarget(this) == null) - { - agent.Logger.Warning($"No target found for {agent.name}: {this.Config.Name}"); - return false; - } - - return this.IsValid(agent, (TActionData) data); - } public virtual bool IsValid(IMonoAgent agent, TActionData data) { return true; } - - public override bool IsExecutable(IMonoAgent agent, bool conditionsMet) - { - if (!conditionsMet) - return false; - - if (this.Config.RequiresTarget && agent.WorldData.GetTarget(this) == null) - return false; - - return true; - } - public override bool IsEnabled(IMonoAgent agent) + public bool IsEnabled(IMonoAgent agent) { return this.IsEnabled(agent, agent.Injector); } @@ -76,16 +50,16 @@ public virtual bool IsEnabled(IMonoAgent agent, IComponentReference references) return !agent.DisabledActions.Contains(this.GetType()); } - public override void BeforePerform(IMonoAgent agent, IActionData data) => this.BeforePerform(agent, (TActionData) data); + public void BeforePerform(IMonoAgent agent, IActionData data) => this.BeforePerform(agent, (TActionData) data); public virtual void BeforePerform(IMonoAgent agent, TActionData data) {} - public override IActionRunState Perform(IMonoAgent agent, IActionData data, IActionContext context) => this.Perform(agent, (TActionData) data, context); + public IActionRunState Perform(IMonoAgent agent, IActionData data, IActionContext context) => this.Perform(agent, (TActionData) data, context); public abstract IActionRunState Perform(IMonoAgent agent, TActionData data, IActionContext context); public virtual void End(IMonoAgent agent, TActionData data) {} - public override void Stop(IMonoAgent agent, IActionData data) + public void Stop(IMonoAgent agent, IActionData data) { this.Stop(agent, (TActionData)data); this.End(agent, (TActionData)data); @@ -93,7 +67,7 @@ public override void Stop(IMonoAgent agent, IActionData data) public virtual void Stop(IMonoAgent agent, TActionData data) {} - public override void Complete(IMonoAgent agent, IActionData data) + public void Complete(IMonoAgent agent, IActionData data) { this.Complete(agent, (TActionData) data); this.End(agent, (TActionData) data); @@ -104,35 +78,10 @@ public virtual void Complete(IMonoAgent agent, TActionData data) {} public abstract class ActionBase : IAction { - public IActionConfig Config { get; private set; } - - public Guid Guid { get; } = Guid.NewGuid(); - public IEffect[] Effects => this.Config.Effects; - public ICondition[] Conditions => this.Config.Conditions; - - public void SetConfig(IActionConfig config) - { - this.Config = config; - } - - public virtual float GetCost(IMonoAgent agent, IComponentReference references) - { - return this.Config.BaseCost; - } - - [Obsolete("Please use the IsInRange method")] - public virtual float GetInRange(IMonoAgent agent, IActionData data) - { - return this.Config.StoppingDistance; - } - - public virtual bool IsInRange(IMonoAgent agent, float distance, IActionData data, IComponentReference references) - { -#pragma warning disable CS0618 - return distance <= this.GetInRange(agent, data); -#pragma warning restore CS0618 - } - + public abstract float GetCost(IMonoAgent agent, IComponentReference references); + public abstract ActionMoveMode GetMoveMode(IMonoAgent agent); + public abstract float GetInRange(IMonoAgent agent, IActionData data); + public abstract bool IsInRange(IMonoAgent agent, float distance, IActionData data, IComponentReference references); public abstract IActionData GetData(); public abstract void Created(); public abstract bool IsValid(IMonoAgent agent, IActionData data); diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ActionBase.cs.meta b/Package/Runtime/CrashKonijn.Agent/ActionBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ActionBase.cs.meta rename to Package/Runtime/CrashKonijn.Agent/ActionBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/ActionContext.cs b/Package/Runtime/CrashKonijn.Agent/ActionContext.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/ActionContext.cs rename to Package/Runtime/CrashKonijn.Agent/ActionContext.cs diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/ActionContext.cs.meta b/Package/Runtime/CrashKonijn.Agent/ActionContext.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/ActionContext.cs.meta rename to Package/Runtime/CrashKonijn.Agent/ActionContext.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ActionRunner.cs b/Package/Runtime/CrashKonijn.Agent/ActionRunner.cs similarity index 98% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ActionRunner.cs rename to Package/Runtime/CrashKonijn.Agent/ActionRunner.cs index 627fda09..2d95bb9f 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/ActionRunner.cs +++ b/Package/Runtime/CrashKonijn.Agent/ActionRunner.cs @@ -23,7 +23,7 @@ public void Run() if (!this.RunIsValid()) return; - switch (this.agent.ActionState.Action.Config.MoveMode) + switch (this.agent.ActionState.Action.GetMoveMode(this.agent)) { case ActionMoveMode.MoveBeforePerforming: this.RunMoveBeforePerforming(); diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ActionRunner.cs.meta b/Package/Runtime/CrashKonijn.Agent/ActionRunner.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ActionRunner.cs.meta rename to Package/Runtime/CrashKonijn.Agent/ActionRunner.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/ActionState.cs b/Package/Runtime/CrashKonijn.Agent/ActionState.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/ActionState.cs rename to Package/Runtime/CrashKonijn.Agent/ActionState.cs diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/ActionState.cs.meta b/Package/Runtime/CrashKonijn.Agent/ActionState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/ActionState.cs.meta rename to Package/Runtime/CrashKonijn.Agent/ActionState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentBehaviour.cs b/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs similarity index 69% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentBehaviour.cs rename to Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs index 873ba465..2f0443ca 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs @@ -1,45 +1,26 @@ using System; using System.Collections.Generic; +using CrashKonijn.Agent; using CrashKonijn.Goap.Classes; using CrashKonijn.Goap.Classes.References; using CrashKonijn.Goap.Core.Enums; using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Exceptions; using CrashKonijn.Goap.Observers; using UnityEngine; -using UnityEngine.Serialization; using ILogger = CrashKonijn.Goap.Core.Interfaces.ILogger; namespace CrashKonijn.Goap.Behaviours { public class AgentBehaviour : MonoBehaviour, IMonoAgent { - [FormerlySerializedAs("goapSetBehaviour")] public AgentTypeBehaviour agentTypeBehaviour; - - [field: SerializeField] - public float DistanceMultiplier { get; set; } = 1f; [field: SerializeField] - public DebugMode DebugMode { get; set; } = DebugMode.None; + public LoggerConfig LoggerConfig { get; set; } = new LoggerConfig(); + [field: SerializeField] - public int MaxLogSize { get; set; } = 20; + public float DistanceMultiplier { get; set; } = 1f; public AgentState State { get; private set; } = AgentState.NoAction; public AgentMoveState MoveState { get; private set; } = AgentMoveState.Idle; public List DisabledActions { get; } = new (); - - private IAgentType agentType; - public IAgentType AgentType - { - get => this.agentType; - set - { - this.agentType = value; - this.WorldData.SetParent(value.WorldData); - value.Register(this); - this.Events.Bind(this, value.Events); - } - } - - public IGoal CurrentGoal { get; private set; } [Obsolete("Use ActionState.Action instead.")] public IAction CurrentAction => this.ActionState.Action; @@ -48,13 +29,13 @@ public IAgentType AgentType [Obsolete("Use ActionState.RunState instead.")] public IActionRunState RunState => this.ActionState.RunState; public IActionState ActionState { get; } = new ActionState(); - public IConnectable[] CurrentPlan { get; private set; } = Array.Empty(); - public ILocalWorldData WorldData { get; } = new LocalWorldData(); + public IAgentEvents Events { get; } = new AgentEvents(); public IDataReferenceInjector Injector { get; private set; } public IAgentDistanceObserver DistanceObserver { get; set; } = new VectorDistanceObserver(); - public ILogger Logger { get; set; } = new Classes.Logger(); - + public ILogger Logger { get; set; } = new AgentLogger(); + public IActionResolver ActionResolver { get; set; } + public IAgentTimers Timers { get; } = new AgentTimers(); public ITarget CurrentTarget { get; private set; } @@ -62,32 +43,14 @@ public IAgentType AgentType private void Awake() { - this.Injector = new DataReferenceInjector(this); - this.actionRunner = new ActionRunner(this, new AgentProxy(this.SetState, this.SetMoveState, (state) => this.ActionState.RunState = state, this.IsInRange)); - this.Logger.Agent = this; - - if (this.agentTypeBehaviour != null) - this.AgentType = this.agentTypeBehaviour.AgentType; + this.Initialize(); } - private void Start() + public void Initialize() { - if (this.AgentType == null) - throw new GoapException($"There is no AgentType assigned to the agent '{this.name}'! Please assign one in the inspector or through code in the Awake method."); - } - - private void OnEnable() - { - if (this.AgentType != null) - this.AgentType.Register(this); - } - - private void OnDisable() - { - this.StopAction(false); - - if (this.AgentType != null) - this.AgentType.Unregister(this); + this.Injector = new DataReferenceInjector(this); + this.actionRunner = new ActionRunner(this, new AgentProxy(this.SetState, this.SetMoveState, (state) => this.ActionState.RunState = state, this.IsInRange)); + this.Logger.Initialize(this.LoggerConfig, this); } public void Run() @@ -103,7 +66,6 @@ public void Run() this.actionRunner.Run(); } - private void UpdateTarget() { if (this.CurrentTarget == this.ActionState.Data?.Target) @@ -150,37 +112,11 @@ private bool IsInRange() return this.ActionState.Action.IsInRange(this, distance, this.ActionState.Data, this.Injector); } - - public void SetGoal(bool endAction) - where TGoal : IGoal - { - this.SetGoal(this.AgentType.ResolveGoal(), endAction); - } - - public void SetGoal(IGoal goal, bool endAction) + + public void SetAction(IActionResolver actionResolver, IAction action, ITarget target) { - if (goal == this.CurrentGoal) - return; - - this.CurrentGoal = goal; - this.Timers.Goal.Touch(); + this.ActionResolver = actionResolver; - if (this.ActionState.Action == null) - this.ResolveAction(); - - this.Events.GoalStart(goal); - - if (endAction) - this.StopAction(); - } - - public void ClearGoal() - { - this.CurrentGoal = null; - } - - public void SetAction(IAction action, IConnectable[] path, ITarget target) - { if (this.ActionState.Action != null) { this.StopAction(false); @@ -193,7 +129,6 @@ public void SetAction(IAction action, IConnectable[] path, ITarget target) this.ActionState.SetAction(action, data); this.Timers.Action.Touch(); - this.CurrentPlan = path; action.Start(this, data); this.Events.ActionStart(action); @@ -225,6 +160,14 @@ public void CompleteAction(bool resolveAction = true) this.ResolveAction(); } + public void ResolveAction() + { + if (this.ActionResolver == null) + throw new AgentException("No action resolver found!"); + + this.ActionResolver.ResolveAction(); + } + private void ResetAction() { this.ActionState.Reset(); @@ -236,12 +179,6 @@ public void SetDistanceMultiplierSpeed(float speed) { this.DistanceMultiplier = 1f / speed; } - - public void ResolveAction() - { - this.Events.Resolve(); - this.Timers.Resolve.Touch(); - } public void EnableAction() where TAction : IAction diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentEvents.cs b/Package/Runtime/CrashKonijn.Agent/AgentEvents.cs similarity index 58% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentEvents.cs rename to Package/Runtime/CrashKonijn.Agent/AgentEvents.cs index 81c1c98d..84405c44 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Agent/AgentEvents.cs @@ -1,41 +1,27 @@ -using CrashKonijn.Goap.Classes.Validators; -using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; namespace CrashKonijn.Goap.Behaviours { public class AgentEvents : IAgentEvents { - private IAgent agent; - private IAgentTypeEvents typeEvents; - - public void Bind(IAgent agent, IAgentTypeEvents events) - { - this.agent = agent; - this.typeEvents = events; - } - // Actions public event ActionDelegate OnActionStart; public void ActionStart(IAction action) { this.OnActionStart?.Invoke(action); - this.typeEvents?.ActionStart(this.agent, action); } public event ActionDelegate OnActionEnd; public void ActionEnd(IAction action) { this.OnActionEnd?.Invoke(action); - this.typeEvents?.ActionEnd(this.agent, action); } public event ActionDelegate OnActionStop; public void ActionStop(IAction action) { this.OnActionStop?.Invoke(action); - this.typeEvents?.ActionStop(this.agent, action); this.ActionEnd(action); } @@ -44,32 +30,10 @@ public void ActionStop(IAction action) public void ActionComplete(IAction action) { this.OnActionComplete?.Invoke(action); - this.typeEvents?.ActionComplete(this.agent, action); this.ActionEnd(action); } - - public event GoalDelegate OnNoActionFound; - public void NoActionFound(IGoal goal) - { - this.OnNoActionFound?.Invoke(goal); - this.typeEvents?.NoActionFound(this.agent, goal); - } - // Goals - public event GoalDelegate OnGoalStart; - public void GoalStart(IGoal goal) - { - this.OnGoalStart?.Invoke(goal); - this.typeEvents?.GoalStart(this.agent, goal); - } - - public event GoalDelegate OnGoalCompleted; - public void GoalCompleted(IGoal goal) - { - this.OnGoalCompleted?.Invoke(goal); - this.typeEvents?.GoalCompleted(this.agent, goal); - } // Targets public event TargetDelegate OnTargetInRange; @@ -101,7 +65,6 @@ public void Move(ITarget target) public void Resolve() { this.OnResolve?.Invoke(); - this.typeEvents?.AgentResolve(this.agent); } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentEvents.cs.meta b/Package/Runtime/CrashKonijn.Agent/AgentEvents.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentEvents.cs.meta rename to Package/Runtime/CrashKonijn.Agent/AgentEvents.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/AgentException.cs b/Package/Runtime/CrashKonijn.Agent/AgentException.cs new file mode 100644 index 00000000..b1de9250 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/AgentException.cs @@ -0,0 +1,11 @@ +using System; + +namespace CrashKonijn.Agent +{ + public class AgentException : Exception + { + public AgentException(string message) : base(message) + { + } + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent/AgentException.cs.meta b/Package/Runtime/CrashKonijn.Agent/AgentException.cs.meta new file mode 100644 index 00000000..87d10d9d --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/AgentException.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f2c82b6556294483a2e41674c5ba5ed7 +timeCreated: 1719398676 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent/AgentLogger.cs b/Package/Runtime/CrashKonijn.Agent/AgentLogger.cs new file mode 100644 index 00000000..f5e1f881 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/AgentLogger.cs @@ -0,0 +1,47 @@ +using CrashKonijn.Agent; +using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Goap.Core.Interfaces; + +namespace CrashKonijn.Goap.Classes +{ + public class AgentLogger : LoggerBase + { + protected override string Name => this.source.name; + + protected override void RegisterEvents() + { + if (this.source == null) + return; + + this.source.Events.OnActionStart += this.ActionStart; + this.source.Events.OnActionStop += this.ActionStop; + this.source.Events.OnActionComplete += this.ActionComplete; + // Todo + // this.Agent.Events.OnNoActionFound += this.NoActionFound; + // this.Agent.Events.OnGoalStart += this.GoalStart; + // this.Agent.Events.OnGoalCompleted += this.GoalCompleted; + } + + protected override void UnregisterEvents() + { + if (this.source == null) + return; + + this.source.Events.OnActionStart -= this.ActionStart; + this.source.Events.OnActionStop -= this.ActionStop; + this.source.Events.OnActionComplete -= this.ActionComplete; + // Todo + // this.Agent.Events.OnNoActionFound -= this.NoActionFound; + // this.Agent.Events.OnGoalStart -= this.GoalStart; + // this.Agent.Events.OnGoalCompleted -= this.GoalCompleted; + } + + private void ActionStart(IAction action) => this.Handle($"Action {action?.GetType().GetGenericTypeName()} started", DebugSeverity.Log); + private void ActionStop(IAction action) => this.Handle($"Action {action?.GetType().GetGenericTypeName()} stopped", DebugSeverity.Log); + private void ActionComplete(IAction action) => this.Handle($"Action {action?.GetType().GetGenericTypeName()} completed", DebugSeverity.Log); + // private void NoActionFound(IGoal goal) => this.Handle($"No action found for goal {goal?.GetType().GetGenericTypeName()}", DebugSeverity.Warning); + // private void GoalStart(IGoal goal) => this.Handle($"Goal {goal?.GetType().GetGenericTypeName()} started", DebugSeverity.Log); + // private void GoalCompleted(IGoal goal) => this.Handle($"Goal {goal?.GetType().GetGenericTypeName()} completed", DebugSeverity.Log); + + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent/AgentLogger.cs.meta b/Package/Runtime/CrashKonijn.Agent/AgentLogger.cs.meta new file mode 100644 index 00000000..ee4f26dc --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/AgentLogger.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0e7aa356bb89463abe41cecfb28514e9 +timeCreated: 1719403830 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTimers.cs b/Package/Runtime/CrashKonijn.Agent/AgentTimers.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTimers.cs rename to Package/Runtime/CrashKonijn.Agent/AgentTimers.cs diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTimers.cs.meta b/Package/Runtime/CrashKonijn.Agent/AgentTimers.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTimers.cs.meta rename to Package/Runtime/CrashKonijn.Agent/AgentTimers.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/References/DataReferenceInjector.cs b/Package/Runtime/CrashKonijn.Agent/DataReferenceInjector.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/References/DataReferenceInjector.cs rename to Package/Runtime/CrashKonijn.Agent/DataReferenceInjector.cs diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/References/DataReferenceInjector.cs.meta b/Package/Runtime/CrashKonijn.Agent/DataReferenceInjector.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/References/DataReferenceInjector.cs.meta rename to Package/Runtime/CrashKonijn.Agent/DataReferenceInjector.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/Extensions.cs b/Package/Runtime/CrashKonijn.Agent/Extensions.cs new file mode 100644 index 00000000..a1309e08 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/Extensions.cs @@ -0,0 +1,23 @@ +using System; +using System.Linq; + +namespace CrashKonijn.Agent +{ + public static class Extensions + { + public static string GetGenericTypeName(this Type type) + { + var typeName = type.Name; + + if (type.IsGenericType) + { + var genericArguments = type.GetGenericArguments(); + var genericTypeName = typeName.Substring(0, typeName.IndexOf('`')); + var typeArgumentNames = string.Join(",", genericArguments.Select(a => a.GetGenericTypeName())); + typeName = $"{genericTypeName}<{typeArgumentNames}>"; + } + + return typeName; + } + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent/Extensions.cs.meta b/Package/Runtime/CrashKonijn.Agent/Extensions.cs.meta new file mode 100644 index 00000000..4eed4d63 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/Extensions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2bea101279a04ba08c76a0d2197997ad +timeCreated: 1719383754 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Logger.cs b/Package/Runtime/CrashKonijn.Agent/LoggerBase.cs similarity index 53% rename from Package/Runtime/CrashKonijn.Goap/Classes/Logger.cs rename to Package/Runtime/CrashKonijn.Agent/LoggerBase.cs index ef4e9c9b..e81864d0 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Logger.cs +++ b/Package/Runtime/CrashKonijn.Agent/LoggerBase.cs @@ -1,25 +1,25 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Validators; using CrashKonijn.Goap.Core.Enums; using CrashKonijn.Goap.Core.Interfaces; namespace CrashKonijn.Goap.Classes { - public class Logger : ILogger + public abstract class LoggerBase : ILogger { - private IMonoAgent agent; - public IMonoAgent Agent + protected ILoggerConfig config; + protected TObj source; + protected abstract string Name { get; } + public List Logs { get; } = new(); + + public void Initialize(ILoggerConfig config, TObj source) { - get => this.agent; - set - { - this.agent = value; - this.RegisterEvents(); - } + this.config = config; + this.source = source; + + this.UnregisterEvents(); + this.RegisterEvents(); } - - public List Logs { get; } = new(); - + public void Log(string message) { #if UNITY_EDITOR @@ -65,12 +65,12 @@ private string GetColor(DebugSeverity severity) private string FormatConsole(string message) { - return $"{this.Agent.name}: {message}"; + return $"{this.Name}: {message}"; } - private void Handle(string message, DebugSeverity severity) + protected void Handle(string message, DebugSeverity severity) { - switch (this.agent.DebugMode) + switch (this.config.DebugMode) { case DebugMode.None: break; @@ -102,12 +102,12 @@ private void AddToConsole(string message, DebugSeverity severity) private void Store(string message) { - if (this.agent.MaxLogSize == 0) + if (this.config.MaxLogSize == 0) { return; } - if (this.Logs.Count >= this.agent.MaxLogSize) + if (this.Logs.Count >= this.config.MaxLogSize) { this.Logs.RemoveAt(0); } @@ -115,42 +115,10 @@ private void Store(string message) this.Logs.Add(message); } - private void RegisterEvents() - { - this.UnregisterEvents(); - - if (this.Agent == null) - return; - - this.Agent.Events.OnActionStart += this.ActionStart; - this.Agent.Events.OnActionStop += this.ActionStop; - this.Agent.Events.OnActionComplete += this.ActionComplete; - this.Agent.Events.OnNoActionFound += this.NoActionFound; - this.Agent.Events.OnGoalStart += this.GoalStart; - this.Agent.Events.OnGoalCompleted += this.GoalCompleted; - } - - private void UnregisterEvents() - { - if (this.Agent == null) - return; - - this.Agent.Events.OnActionStart -= this.ActionStart; - this.Agent.Events.OnActionStop -= this.ActionStop; - this.Agent.Events.OnActionComplete -= this.ActionComplete; - this.Agent.Events.OnNoActionFound -= this.NoActionFound; - this.Agent.Events.OnGoalStart -= this.GoalStart; - this.Agent.Events.OnGoalCompleted -= this.GoalCompleted; - } - - private void ActionStart(IAction action) => this.Handle($"Action {action?.GetType().GetGenericTypeName()} started", DebugSeverity.Log); - private void ActionStop(IAction action) => this.Handle($"Action {action?.GetType().GetGenericTypeName()} stopped", DebugSeverity.Log); - private void ActionComplete(IAction action) => this.Handle($"Action {action?.GetType().GetGenericTypeName()} completed", DebugSeverity.Log); - private void NoActionFound(IGoal goal) => this.Handle($"No action found for goal {goal?.GetType().GetGenericTypeName()}", DebugSeverity.Warning); - private void GoalStart(IGoal goal) => this.Handle($"Goal {goal?.GetType().GetGenericTypeName()} started", DebugSeverity.Log); - private void GoalCompleted(IGoal goal) => this.Handle($"Goal {goal?.GetType().GetGenericTypeName()} completed", DebugSeverity.Log); + protected abstract void RegisterEvents(); + protected abstract void UnregisterEvents(); - ~Logger() + ~LoggerBase() { this.UnregisterEvents(); } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Logger.cs.meta b/Package/Runtime/CrashKonijn.Agent/LoggerBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Logger.cs.meta rename to Package/Runtime/CrashKonijn.Agent/LoggerBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs b/Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs new file mode 100644 index 00000000..97e26bf6 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs @@ -0,0 +1,17 @@ +using System; +using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Goap.Core.Interfaces; +using UnityEngine; + +namespace CrashKonijn.Agent +{ + [Serializable] + public class LoggerConfig : ILoggerConfig + { + [field:SerializeField] + public DebugMode DebugMode { get; set; } = DebugMode.Log; + + [field: SerializeField] + public int MaxLogSize { get; set; } = 20; + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs.meta b/Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs.meta new file mode 100644 index 00000000..849a290f --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ae2aaadbeac44f58a3f8d711411847ca +timeCreated: 1719404046 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/References.meta b/Package/Runtime/CrashKonijn.Agent/References.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/References.meta rename to Package/Runtime/CrashKonijn.Agent/References.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentAttribute.cs b/Package/Runtime/CrashKonijn.Agent/References/GetComponentAttribute.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentAttribute.cs rename to Package/Runtime/CrashKonijn.Agent/References/GetComponentAttribute.cs diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentAttribute.cs.meta b/Package/Runtime/CrashKonijn.Agent/References/GetComponentAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Agent/References/GetComponentAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentInChildrenAttribute.cs b/Package/Runtime/CrashKonijn.Agent/References/GetComponentInChildrenAttribute.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentInChildrenAttribute.cs rename to Package/Runtime/CrashKonijn.Agent/References/GetComponentInChildrenAttribute.cs diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentInChildrenAttribute.cs.meta b/Package/Runtime/CrashKonijn.Agent/References/GetComponentInChildrenAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentInChildrenAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Agent/References/GetComponentInChildrenAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentInParentAttribute.cs b/Package/Runtime/CrashKonijn.Agent/References/GetComponentInParentAttribute.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentInParentAttribute.cs rename to Package/Runtime/CrashKonijn.Agent/References/GetComponentInParentAttribute.cs diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentInParentAttribute.cs.meta b/Package/Runtime/CrashKonijn.Agent/References/GetComponentInParentAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/References/GetComponentInParentAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Agent/References/GetComponentInParentAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/Timer.cs b/Package/Runtime/CrashKonijn.Agent/Timer.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/Timer.cs rename to Package/Runtime/CrashKonijn.Agent/Timer.cs diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/Timer.cs.meta b/Package/Runtime/CrashKonijn.Agent/Timer.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/Timer.cs.meta rename to Package/Runtime/CrashKonijn.Agent/Timer.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Observers/VectorDistanceObserver.cs b/Package/Runtime/CrashKonijn.Agent/VectorDistanceObserver.cs similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Observers/VectorDistanceObserver.cs rename to Package/Runtime/CrashKonijn.Agent/VectorDistanceObserver.cs diff --git a/Package/Runtime/CrashKonijn.Goap/Observers/VectorDistanceObserver.cs.meta b/Package/Runtime/CrashKonijn.Agent/VectorDistanceObserver.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Observers/VectorDistanceObserver.cs.meta rename to Package/Runtime/CrashKonijn.Agent/VectorDistanceObserver.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef b/Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef new file mode 100644 index 00000000..34e97c15 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef @@ -0,0 +1,15 @@ +{ + "name": "CrashKonijn.Agent", + "rootNamespace": "CrashKonijn.Agent", + "references": [ + "GUID:0d347051544a4880a72466503e27985a"], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef.meta b/Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef.meta new file mode 100644 index 00000000..0b77e4da --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4d9088d80ac84f52b9b07421f95af69c +timeCreated: 1719322495 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs b/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs index cd98a3e2..c180c5d3 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs @@ -2,13 +2,10 @@ namespace CrashKonijn.Goap.Core { - public delegate void ActionDelegate(IAction action); - public delegate void AgentActionDelegate(IAgent agent, IAction action); public delegate void GoalDelegate(IGoal goal); - public delegate void AgentGoalDelegate(IAgent agent, IGoal goal); - public delegate void TargetDelegate(ITarget target); - public delegate void TargetRangeDelegate(ITarget target, bool inRange); - public delegate void AgentDelegate(IAgent agent); + public delegate void AgentGoalDelegate(IMonoGoapAgent agent, IGoal goal); public delegate void AgentTypeDelegate(IAgentType agentType); - public delegate void EmptyDelegate(); + public delegate void GoapAgentDelegate(IMonoGoapAgent agent); + public delegate void GoapActionDelegate(IGoapAction action); + public delegate void GoapAgentActionDelegate(IMonoGoapAgent agent, IGoapAction action); } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs index 33da14fc..17c1ed07 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs @@ -4,8 +4,11 @@ namespace CrashKonijn.Goap.Core.Interfaces { public interface IAgentCollection { - HashSet All(); - void Add(IMonoAgent agent); - void Remove(IMonoAgent agent); + HashSet All(); + void Add(IMonoGoapAgent agent); + void Remove(IMonoGoapAgent agent); + void Enqueue(IMonoGoapAgent agent); + IMonoGoapAgent[] GetQueue(); + int GetQueueCount(); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs index 5e3dc296..a8c53ff0 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs @@ -10,15 +10,15 @@ public interface IAgentType ISensorRunner SensorRunner { get; } IAgentTypeEvents Events { get; } IGlobalWorldData WorldData { get; } - void Register(IMonoAgent agent); - void Unregister(IMonoAgent agent); + void Register(IMonoGoapAgent agent); + void Unregister(IMonoGoapAgent agent); List GetAllNodes(); - List GetActions(); + List GetActions(); List GetGoals(); TGoal ResolveGoal() where TGoal : IGoal; - bool AllConditionsMet(IAgent agent, IAction action); + bool AllConditionsMet(IGoapAgent agent, IGoapAction action); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs index ffb18f15..246dca0e 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs @@ -5,36 +5,36 @@ public interface IAgentTypeEvents void Bind(IGoapEvents events); // Actions - event AgentActionDelegate OnActionStart; - void ActionStart(IAgent agent, IAction action); + event GoapAgentActionDelegate OnActionStart; + void ActionStart(IMonoGoapAgent agent, IGoapAction action); - event AgentActionDelegate OnActionEnd; - void ActionEnd(IAgent agent, IAction action); + event GoapAgentActionDelegate OnActionEnd; + void ActionEnd(IMonoGoapAgent agent, IGoapAction action); - event AgentActionDelegate OnActionStop; - void ActionStop(IAgent agent, IAction action); + event GoapAgentActionDelegate OnActionStop; + void ActionStop(IMonoGoapAgent agent, IGoapAction action); - event AgentActionDelegate OnActionComplete; - void ActionComplete(IAgent agent, IAction action); + event GoapAgentActionDelegate OnActionComplete; + void ActionComplete(IMonoGoapAgent agent, IGoapAction action); event AgentGoalDelegate OnNoActionFound; - void NoActionFound(IAgent agent, IGoal goal); + void NoActionFound(IMonoGoapAgent agent, IGoal goal); // Goals event AgentGoalDelegate OnGoalStart; - void GoalStart(IAgent agent, IGoal goal); + void GoalStart(IMonoGoapAgent agent, IGoal goal); event AgentGoalDelegate OnGoalCompleted; - void GoalCompleted(IAgent agent, IGoal goal); + void GoalCompleted(IMonoGoapAgent agent, IGoal goal); // General - event AgentDelegate OnAgentResolve; - void AgentResolve(IAgent agent); + event GoapAgentDelegate OnAgentResolve; + void AgentResolve(IMonoGoapAgent agent); - event AgentDelegate OnAgentRegistered; - void AgentRegistered(IAgent agent); + event GoapAgentDelegate OnAgentRegistered; + void AgentRegistered(IMonoGoapAgent agent); - event AgentDelegate OnAgentUnregistered; - void AgentUnregistered(IAgent agent); + event GoapAgentDelegate OnAgentUnregistered; + void AgentUnregistered(IMonoGoapAgent agent); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs index 72f4ed6a..8a93c1a1 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs @@ -4,7 +4,7 @@ namespace CrashKonijn.Goap.Core.Interfaces { public interface IAgentTypeJobRunner { - void Run(HashSet queue); + void Run(HashSet queue); void Complete(); void Dispose(); IGraph GetGraph(); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs index f81f49ee..332f1145 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs @@ -10,7 +10,7 @@ public interface IGoap void Register(IAgentType agentType); IGraph GetGraph(IAgentType agentType); bool Knows(IAgentType agentType); - List Agents { get; } + List Agents { get; } IAgentType[] AgentTypes { get; } diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs new file mode 100644 index 00000000..cf61b97e --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs @@ -0,0 +1,7 @@ +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface IGoapAction : IAction, IConnectable, IHasConfig + { + + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs.meta b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs.meta new file mode 100644 index 00000000..e98b2eae --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a6872cdf13c348d3b0afa96b51bb163e +timeCreated: 1719322827 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs new file mode 100644 index 00000000..072f0c3a --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs @@ -0,0 +1,14 @@ +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface IGoapActionProviderEvent + { + void NoActionFound(IGoal goal); + + // Goals + event GoalDelegate OnGoalStart; + void GoalStart(IGoal goal); + + event GoalDelegate OnGoalCompleted; + void GoalCompleted(IGoal goal); + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs.meta b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs.meta new file mode 100644 index 00000000..80c49fed --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a3e476b0ce334b5c8ecc563745d88f2f +timeCreated: 1719323839 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs new file mode 100644 index 00000000..885c4419 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs @@ -0,0 +1,18 @@ +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface IGoapAgent : IActionResolver + { + IMonoAgent Agent { get; } + IAgentType AgentType { get; } + IGoal CurrentGoal { get; } + ILocalWorldData WorldData { get; } + IConnectable[] CurrentPlan { get; } + IGoapAgentEvents Events { get; } + ILogger Logger { get; } + void SetGoal(bool endAction) where TGoal : IGoal; + void SetGoal(IGoal goal, bool endAction); + void SetAction(IGoapAction action, IConnectable[] path, ITarget target); + void ClearGoal(); + void StopAction(bool resolveAction = true); + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs.meta b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs.meta new file mode 100644 index 00000000..c4e0fad3 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1d5a66415bbe4ffb911ad89d0424df52 +timeCreated: 1719323184 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs new file mode 100644 index 00000000..e7ee031f --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs @@ -0,0 +1,23 @@ +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface IGoapAgentEvents + { + void Bind(IMonoGoapAgent agent, IAgentTypeEvents events); + void Unbind(); + event GoalDelegate OnNoActionFound; + void NoActionFound(IGoal goal); + event GoalDelegate OnGoalStart; + void GoalStart(IGoal goal); + + event GoalDelegate OnGoalCompleted; + void GoalCompleted(IGoal goal); + + event EmptyDelegate OnResolve; + void Resolve(); + + event GoapActionDelegate OnActionStart; + event GoapActionDelegate OnActionEnd; + event GoapActionDelegate OnActionStop; + event GoapActionDelegate OnActionComplete; + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs.meta b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs.meta new file mode 100644 index 00000000..5fce7fa0 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c067c4e113984d488abcbaca4624d406 +timeCreated: 1719392577 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs index ac185b73..8e39267b 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs @@ -3,37 +3,37 @@ public interface IGoapEvents { // Actions - event AgentActionDelegate OnActionStart; - void ActionStart(IAgent agent, IAction action); + event GoapAgentActionDelegate OnActionStart; + void ActionStart(IMonoGoapAgent agent, IGoapAction action); - event AgentActionDelegate OnActionEnd; - void ActionEnd(IAgent agent, IAction action); + event GoapAgentActionDelegate OnActionEnd; + void ActionEnd(IMonoGoapAgent agent, IGoapAction action); - event AgentActionDelegate OnActionStop; - void ActionStop(IAgent agent, IAction action); + event GoapAgentActionDelegate OnActionStop; + void ActionStop(IMonoGoapAgent agent, IGoapAction action); - event AgentActionDelegate OnActionComplete; - void ActionComplete(IAgent agent, IAction action); + event GoapAgentActionDelegate OnActionComplete; + void ActionComplete(IMonoGoapAgent agent, IGoapAction action); event AgentGoalDelegate OnNoActionFound; - void NoActionFound(IAgent agent, IGoal goal); + void NoActionFound(IMonoGoapAgent agent, IGoal goal); // Goals event AgentGoalDelegate OnGoalStart; - void GoalStart(IAgent agent, IGoal goal); + void GoalStart(IMonoGoapAgent agent, IGoal goal); event AgentGoalDelegate OnGoalCompleted; - void GoalCompleted(IAgent agent, IGoal goal); + void GoalCompleted(IMonoGoapAgent agent, IGoal goal); // General - event AgentDelegate OnAgentResolve; - void AgentResolve(IAgent agent); + event GoapAgentDelegate OnAgentResolve; + void AgentResolve(IMonoGoapAgent agent); - event AgentDelegate OnAgentRegistered; - void AgentRegistered(IAgent agent); + event GoapAgentDelegate OnAgentRegistered; + void AgentRegistered(IMonoGoapAgent agent); - event AgentDelegate OnAgentUnregistered; - void AgentUnregistered(IAgent agent); + event GoapAgentDelegate OnAgentUnregistered; + void AgentUnregistered(IMonoGoapAgent agent); // Agent Types event AgentTypeDelegate OnAgentTypeRegistered; diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs new file mode 100644 index 00000000..709d00ed --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs @@ -0,0 +1,7 @@ +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface IMonoGoapAgent : IGoapAgent, IMonoBehaviour + { + + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs.meta b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs.meta new file mode 100644 index 00000000..4af08e54 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2d0ea2fbe8d446a380bc618f927c2474 +timeCreated: 1719325469 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs index 43f82cf8..375c04f4 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs @@ -3,10 +3,10 @@ public interface ISensorRunner { void Update(); - void Update(IAction action); + void Update(IGoapAction action); void SenseGlobal(); - void SenseGlobal(IAction action); - void SenseLocal(IMonoAgent agent); - void SenseLocal(IMonoAgent agent, IAction action); + void SenseGlobal(IGoapAction action); + void SenseLocal(IMonoGoapAgent agent); + void SenseLocal(IMonoGoapAgent agent, IGoapAction action); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldData.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldData.cs index a04dfb3f..74e2836a 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldData.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldData.cs @@ -8,7 +8,7 @@ public interface IWorldData { Dictionary States { get; } Dictionary Targets { get; } - ITarget GetTarget(IAction action); + ITarget GetTarget(IGoapAction action); void SetState(IWorldKey key, int state); void SetState(int state) where TKey : IWorldKey; void SetTarget(ITargetKey key, ITarget target); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/com.crashkonijn.goap.core.asmdef b/Package/Runtime/CrashKonijn.Goap.Core/com.crashkonijn.goap.core.asmdef index 24934a9a..712cde49 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/com.crashkonijn.goap.core.asmdef +++ b/Package/Runtime/CrashKonijn.Goap.Core/com.crashkonijn.goap.core.asmdef @@ -1,7 +1,9 @@ { "name": "CrashKonijn.Goap.Core", "rootNamespace": "CrashKonijn.Goap.Core", - "references": [], + "references": [ + "GUID:0d347051544a4880a72466503e27985a" + ], "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": false, diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs index 12a19ef9..d08a4f96 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs @@ -123,7 +123,7 @@ public IGraph GetGraph() } public int GetIndex(IConnectable action) => this.actionIndexList.IndexOf(action); - public IAction GetAction(int index) => this.actionIndexList[index] as IAction; + public IGoapAction GetAction(int index) => this.actionIndexList[index] as IGoapAction; public void Dispose() { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IGraphResolver.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IGraphResolver.cs index c9ea5e24..0d292160 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IGraphResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IGraphResolver.cs @@ -12,7 +12,7 @@ public interface IGraphResolver ICostBuilder GetCostBuilder(); IGraph GetGraph(); int GetIndex(IConnectable action); - IAction GetAction(int index); + IGoapAction GetAction(int index); void Dispose(); IConditionBuilder GetConditionBuilder(); } diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/com.crashkonijn.goap.resolver.asmdef b/Package/Runtime/CrashKonijn.Goap.Resolver/com.crashkonijn.goap.resolver.asmdef index e22a9f7b..3f217b99 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/com.crashkonijn.goap.resolver.asmdef +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/com.crashkonijn.goap.resolver.asmdef @@ -5,7 +5,8 @@ "GUID:e0cd26848372d4e5c891c569017e11f1", "GUID:2665a8d13d1b3f18800f46e256720795", "GUID:d8b63aba1907145bea998dd612889d6b", - "GUID:1492f7fc38ce464dae5c20df05fd22e3" + "GUID:1492f7fc38ce464dae5c20df05fd22e3", + "GUID:0d347051544a4880a72466503e27985a" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs index 75bf8e51..c0f7d160 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Classes; using CrashKonijn.Goap.Core.Interfaces; using UnityEngine; @@ -9,26 +8,26 @@ namespace CrashKonijn.Goap.Behaviours public class AgentCollection : IAgentCollection { private readonly IAgentType agentType; - private HashSet agents = new(); - private HashSet queue = new HashSet(); + private HashSet agents = new(); + private HashSet queue = new HashSet(); public AgentCollection(IAgentType agentType) { this.agentType = agentType; } - public HashSet All() => this.agents; + public HashSet All() => this.agents; - public void Add(IMonoAgent agent) + public void Add(IMonoGoapAgent agent) { if (this.agents.Contains(agent)) return; - this.agents.Add(agent); + this.agents.Add(agent ); this.agentType.Events.AgentRegistered(agent); } - public void Remove(IMonoAgent agent) + public void Remove(IMonoGoapAgent agent) { if (!this.agents.Contains(agent)) return; @@ -37,14 +36,14 @@ public void Remove(IMonoAgent agent) this.agentType.Events.AgentUnregistered(agent); } - public void Enqueue(IMonoAgent agent) + public void Enqueue(IMonoGoapAgent agent) { this.queue.Add(agent); } public int GetQueueCount() => this.queue.Count; - public IMonoAgent[] GetQueue() + public IMonoGoapAgent[] GetQueue() { var data = this.queue.ToArray(); diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs index 1855161b..541c82e1 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs @@ -13,71 +13,71 @@ public void Bind(IGoapEvents events) this.goapEvents = events; } - public event AgentActionDelegate OnActionStart; - public void ActionStart(IAgent agent, IAction action) + public event GoapAgentActionDelegate OnActionStart; + public void ActionStart(IMonoGoapAgent agent, IGoapAction action) { this.OnActionStart?.Invoke(agent, action); this.goapEvents?.ActionStart(agent, action); } - public event AgentActionDelegate OnActionEnd; - public void ActionEnd(IAgent agent, IAction action) + public event GoapAgentActionDelegate OnActionEnd; + public void ActionEnd(IMonoGoapAgent agent, IGoapAction action) { this.OnActionEnd?.Invoke(agent, action); this.goapEvents?.ActionEnd(agent, action); } - public event AgentActionDelegate OnActionStop; - public void ActionStop(IAgent agent, IAction action) + public event GoapAgentActionDelegate OnActionStop; + public void ActionStop(IMonoGoapAgent agent, IGoapAction action) { this.OnActionStop?.Invoke(agent, action); this.goapEvents?.ActionStop(agent, action); } - public event AgentActionDelegate OnActionComplete; - public void ActionComplete(IAgent agent, IAction action) + public event GoapAgentActionDelegate OnActionComplete; + public void ActionComplete(IMonoGoapAgent agent, IGoapAction action) { this.OnActionComplete?.Invoke(agent, action); this.goapEvents?.ActionComplete(agent, action); } public event AgentGoalDelegate OnNoActionFound; - public void NoActionFound(IAgent agent, IGoal goal) + public void NoActionFound(IMonoGoapAgent agent, IGoal goal) { this.OnNoActionFound?.Invoke(agent, goal); this.goapEvents?.NoActionFound(agent, goal); } public event AgentGoalDelegate OnGoalStart; - public void GoalStart(IAgent agent, IGoal goal) + public void GoalStart(IMonoGoapAgent agent, IGoal goal) { this.OnGoalStart?.Invoke(agent, goal); this.goapEvents?.GoalStart(agent, goal); } public event AgentGoalDelegate OnGoalCompleted; - public void GoalCompleted(IAgent agent, IGoal goal) + public void GoalCompleted(IMonoGoapAgent agent, IGoal goal) { this.OnGoalCompleted?.Invoke(agent, goal); this.goapEvents?.GoalCompleted(agent, goal); } - public event AgentDelegate OnAgentResolve; - public void AgentResolve(IAgent agent) + public event GoapAgentDelegate OnAgentResolve; + public void AgentResolve(IMonoGoapAgent agent) { this.OnAgentResolve?.Invoke(agent); this.goapEvents?.AgentResolve(agent); } - public event AgentDelegate OnAgentRegistered; - public void AgentRegistered(IAgent agent) + public event GoapAgentDelegate OnAgentRegistered; + public void AgentRegistered(IMonoGoapAgent agent) { this.OnAgentRegistered?.Invoke(agent); this.goapEvents?.AgentRegistered(agent); } - public event AgentDelegate OnAgentUnregistered; - public void AgentUnregistered(IAgent agent) + public event GoapAgentDelegate OnAgentUnregistered; + public void AgentUnregistered(IMonoGoapAgent agent) { this.OnAgentUnregistered?.Invoke(agent); this.goapEvents?.AgentUnregistered(agent); diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs new file mode 100644 index 00000000..400ff1f2 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs @@ -0,0 +1,86 @@ +using System; +using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Goap.Core.Interfaces; + +namespace CrashKonijn.Goap.Behaviours +{ + // Backwards compatibility for old actions + public abstract class GoapActionBase : GoapActionBase + where TActionData : IActionData, new() + { + + } + + public abstract class GoapActionBase : ActionBase, IGoapAction + where TActionData : IActionData, new() + where TActionProperties : class, IActionProperties, new() + { + public IActionConfig Config { get; private set; } + + public Guid Guid { get; } = Guid.NewGuid(); + public IEffect[] Effects => this.Config.Effects; + public ICondition[] Conditions => this.Config.Conditions; + + public override TActionProperties Properties => this.Config.Properties as TActionProperties; + + public void SetConfig(IActionConfig config) + { + this.Config = config; + } + + public virtual float GetCost(IMonoAgent agent, IComponentReference references) + { + return this.Config.BaseCost; + } + + public ActionMoveMode GetMoveMode(IMonoAgent agent) + { + return this.Config.MoveMode; + } + + public virtual bool IsInRange(IMonoAgent agent, float distance, IActionData data, IComponentReference references) + { + return distance <= this.Config.StoppingDistance; + } + + public abstract void Created(); + + public bool IsValid(IMonoAgent agent, IActionData data) + { + var goapAgent = agent.Injector.GetCachedComponent(); + + if (goapAgent == null) + return false; + + if (!goapAgent.AgentType.AllConditionsMet(goapAgent, this)) + { + agent.Logger.Warning($"Conditions not met for {agent.name}: {this.Config.Name}"); + return false; + } + + if (this.Config.RequiresTarget && goapAgent.WorldData.GetTarget(this) == null) + { + agent.Logger.Warning($"No target found for {agent.name}: {this.Config.Name}"); + return false; + } + + return base.IsValid(agent, (TActionData) data); + } + + public bool IsExecutable(IMonoAgent agent, bool conditionsMet) + { + var goapAgent = agent.Injector.GetCachedComponent(); + + if (goapAgent == null) + return false; + + if (!conditionsMet) + return false; + + if (this.Config.RequiresTarget && goapAgent.WorldData.GetTarget(this) == null) + return false; + + return true; + } + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs.meta b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs.meta new file mode 100644 index 00000000..c5f783d9 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 601a5c20417d4ddeaffa9114a0344ee6 +timeCreated: 1719324148 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs new file mode 100644 index 00000000..b0ceeeaa --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs @@ -0,0 +1,128 @@ +using System; +using CrashKonijn.Agent; +using CrashKonijn.Goap.Classes; +using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Exceptions; +using UnityEngine; + +namespace CrashKonijn.Goap.Behaviours +{ + [RequireComponent(typeof(AgentBehaviour))] + public class GoapAgentBehaviour : MonoBehaviour, IMonoGoapAgent + { + [field: SerializeField] + public LoggerConfig LoggerConfig { get; set; } = new LoggerConfig(); + + [field: SerializeField] + public AgentTypeBehaviour AgentTypeBehaviour { get; set; } + + private IAgentType agentType; + public IAgentType AgentType + { + get => this.agentType; + set + { + this.agentType = value; + this.WorldData.SetParent(value.WorldData); + value.Register(this); + + this.Events.Bind(this, value.Events); + } + } + public IGoal CurrentGoal { get; private set; } + public ILocalWorldData WorldData { get; } = new LocalWorldData(); + public IConnectable[] CurrentPlan { get; private set; } = Array.Empty(); + public IGoapAgentEvents Events { get; } = new GoapAgentEvents(); + public ILogger Logger { get; } = new GoapAgentLogger(); + + private IMonoAgent agent; + public IMonoAgent Agent + { + get + { + if (this.agent == null) + this.agent = this.GetComponent(); + + return this.agent; + } + } + + private void Awake() + { + if (this.AgentTypeBehaviour != null) + this.AgentType = this.AgentTypeBehaviour.AgentType; + + this.Logger.Initialize(this.LoggerConfig, this); + } + + private void Start() + { + if (this.AgentType == null) + throw new GoapException($"There is no AgentType assigned to the agent '{this.name}'! Please assign one in the inspector or through code in the Awake method."); + } + + private void OnEnable() + { + if (this.AgentType == null) + return; + + this.AgentType.Register(this); + } + + private void OnDisable() + { + this.StopAction(false); + + if (this.AgentType == null) + return; + + this.AgentType.Unregister(this); + this.Events.Unbind(); + } + + public void SetGoal(bool endAction) + where TGoal : IGoal + { + this.SetGoal(this.AgentType.ResolveGoal(), endAction); + } + + public void SetGoal(IGoal goal, bool endAction) + { + if (goal == this.CurrentGoal) + return; + + this.CurrentGoal = goal; + this.Agent.Timers.Goal.Touch(); + + if (this.Agent.ActionState.Action == null) + this.ResolveAction(); + + this.Events.GoalStart(goal); + + if (endAction) + this.StopAction(); + } + + public void SetAction(IGoapAction action, IConnectable[] path, ITarget target) + { + this.CurrentPlan = path; + this.Agent.SetAction(this, action, target); + } + + public void StopAction(bool resolveAction = true) + { + this.Agent.StopAction(resolveAction); + } + + public void ResolveAction() + { + this.Events.Resolve(); + this.Agent.Timers.Resolve.Touch(); + } + + public void ClearGoal() + { + this.CurrentGoal = null; + } + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs.meta new file mode 100644 index 00000000..f1810156 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 72344165e2cc41da93476bb1aa2cdd4b +timeCreated: 1719324522 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs new file mode 100644 index 00000000..f70c50b9 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs @@ -0,0 +1,104 @@ +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Core.Interfaces; + +namespace CrashKonijn.Goap.Behaviours +{ + public class GoapAgentEvents : IGoapAgentEvents + { + private IMonoGoapAgent agent; + private IAgentTypeEvents typeEvents; + + public void Bind(IMonoGoapAgent agent, IAgentTypeEvents events) + { + this.typeEvents = events; + this.agent = agent; + + agent.Agent.Events.OnActionStart += this.ActionStart; + agent.Agent.Events.OnActionEnd += this.ActionEnd; + agent.Agent.Events.OnActionStop += this.ActionStop; + agent.Agent.Events.OnActionComplete += this.ActionComplete; + } + + public void Unbind() + { + this.agent.Agent.Events.OnActionStart -= this.ActionStart; + this.agent.Agent.Events.OnActionEnd -= this.ActionEnd; + this.agent.Agent.Events.OnActionStop -= this.ActionStop; + this.agent.Agent.Events.OnActionComplete -= this.ActionComplete; + } + + public event GoalDelegate OnNoActionFound; + public void NoActionFound(IGoal goal) + { + this.OnNoActionFound?.Invoke(goal); + this.typeEvents?.NoActionFound(this.agent, goal); + } + + // Goals + public event GoalDelegate OnGoalStart; + public void GoalStart(IGoal goal) + { + this.OnGoalStart?.Invoke(goal); + this.typeEvents?.GoalStart(this.agent, goal); + } + + public event GoalDelegate OnGoalCompleted; + public void GoalCompleted(IGoal goal) + { + this.OnGoalCompleted?.Invoke(goal); + this.typeEvents?.GoalCompleted(this.agent, goal); + } + + // General + public event EmptyDelegate OnResolve; + public void Resolve() + { + this.OnResolve?.Invoke(); + this.typeEvents?.AgentResolve(this.agent); + } + + // Agent events + public event GoapActionDelegate OnActionStart; + public event GoapActionDelegate OnActionEnd; + public event GoapActionDelegate OnActionStop; + public event GoapActionDelegate OnActionComplete; + + // Pass through + private void ActionStart(IAction action) + { + if (action is not IGoapAction goapAction) + return; + + this.OnActionStart?.Invoke(goapAction); + this.typeEvents.ActionStart(this.agent, goapAction); + } + + private void ActionEnd(IAction action) + { + if (action is not IGoapAction goapAction) + return; + + this.OnActionEnd?.Invoke(goapAction); + this.typeEvents.ActionEnd(this.agent, goapAction); + + } + + private void ActionStop(IAction action) + { + if (action is not IGoapAction goapAction) + return; + + this.OnActionStop?.Invoke(goapAction); + this.typeEvents.ActionStop(this.agent, goapAction); + } + + private void ActionComplete(IAction action) + { + if (action is not IGoapAction goapAction) + return; + + this.OnActionComplete?.Invoke(goapAction); + this.typeEvents.ActionComplete(this.agent, goapAction); + } + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs.meta b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs.meta new file mode 100644 index 00000000..c73cfb43 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a2fbeb10bc7545fe96b9089791fb59b7 +timeCreated: 1719385745 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs index eb4b4432..2e646c34 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs @@ -86,7 +86,7 @@ private void CreateAgentTypes() public IGoapController Controller => this.goap.Controller; public IGraph GetGraph(IAgentType agentType) => this.goap.GetGraph(agentType); public bool Knows(IAgentType agentType) => this.goap.Knows(agentType); - public List Agents => this.goap.Agents; + public List Agents => this.goap.Agents; public IAgentType[] AgentTypes => this.goap.AgentTypes; public IAgentType GetAgentType(string id) diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs index 6586ec65..f2adbf34 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs @@ -5,62 +5,62 @@ namespace CrashKonijn.Goap.Behaviours { public class GoapEvents : IGoapEvents { - public event AgentActionDelegate OnActionStart; - public void ActionStart(IAgent agent, IAction action) + public event GoapAgentActionDelegate OnActionStart; + public void ActionStart(IMonoGoapAgent agent, IGoapAction action) { this.OnActionStart?.Invoke(agent, action); } - public event AgentActionDelegate OnActionEnd; - public void ActionEnd(IAgent agent, IAction action) + public event GoapAgentActionDelegate OnActionEnd; + public void ActionEnd(IMonoGoapAgent agent, IGoapAction action) { this.OnActionEnd?.Invoke(agent, action); } - public event AgentActionDelegate OnActionStop; - public void ActionStop(IAgent agent, IAction action) + public event GoapAgentActionDelegate OnActionStop; + public void ActionStop(IMonoGoapAgent agent, IGoapAction action) { this.OnActionStop?.Invoke(agent, action); } - public event AgentActionDelegate OnActionComplete; - public void ActionComplete(IAgent agent, IAction action) + public event GoapAgentActionDelegate OnActionComplete; + public void ActionComplete(IMonoGoapAgent agent, IGoapAction action) { this.OnActionComplete?.Invoke(agent, action); } public event AgentGoalDelegate OnNoActionFound; - public void NoActionFound(IAgent agent, IGoal goal) + public void NoActionFound(IMonoGoapAgent agent, IGoal goal) { this.OnNoActionFound?.Invoke(agent, goal); } public event AgentGoalDelegate OnGoalStart; - public void GoalStart(IAgent agent, IGoal goal) + public void GoalStart(IMonoGoapAgent agent, IGoal goal) { this.OnGoalStart?.Invoke(agent, goal); } public event AgentGoalDelegate OnGoalCompleted; - public void GoalCompleted(IAgent agent, IGoal goal) + public void GoalCompleted(IMonoGoapAgent agent, IGoal goal) { this.OnGoalCompleted?.Invoke(agent, goal); } - public event AgentDelegate OnAgentResolve; - public void AgentResolve(IAgent agent) + public event GoapAgentDelegate OnAgentResolve; + public void AgentResolve(IMonoGoapAgent agent) { this.OnAgentResolve?.Invoke(agent); } - public event AgentDelegate OnAgentRegistered; - public void AgentRegistered(IAgent agent) + public event GoapAgentDelegate OnAgentRegistered; + public void AgentRegistered(IMonoGoapAgent agent) { this.OnAgentRegistered?.Invoke(agent); } - public event AgentDelegate OnAgentUnregistered; - public void AgentUnregistered(IAgent agent) + public event GoapAgentDelegate OnAgentUnregistered; + public void AgentUnregistered(IMonoGoapAgent agent) { this.OnAgentUnregistered?.Invoke(agent); } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs b/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs index bb0a5a48..7ef64c18 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs @@ -18,9 +18,9 @@ public class AgentType : IAgentType private List goals; private Dictionary goalsLookup; - private List actions; + private List actions; - public AgentType(string id, IGoapConfig config, List goals, List actions, ISensorRunner sensorRunner, IGlobalWorldData worldData) + public AgentType(string id, IGoapConfig config, List goals, List actions, ISensorRunner sensorRunner, IGlobalWorldData worldData) { this.Id = id; this.GoapConfig = config; @@ -33,12 +33,12 @@ public AgentType(string id, IGoapConfig config, List goals, List this.Agents = new AgentCollection(this); } - public void Register(IMonoAgent agent) + public void Register(IMonoGoapAgent agent) { this.Agents.Add(agent); } - public void Unregister(IMonoAgent agent) + public void Unregister(IMonoGoapAgent agent) { this.Agents.Remove(agent); } @@ -52,7 +52,7 @@ public TGoal ResolveGoal() throw new KeyNotFoundException($"No action found of type {typeof(TGoal)}"); } - public bool AllConditionsMet(IAgent agent, IAction action) + public bool AllConditionsMet(IGoapAgent agent, IGoapAction action) { var conditionObserver = this.GoapConfig.ConditionObserver; conditionObserver.SetWorldData(agent.WorldData); @@ -67,7 +67,7 @@ public bool AllConditionsMet(IAgent agent, IAction action) } public List GetAllNodes() => this.actions.Cast().Concat(this.goals).ToList(); - public List GetActions() => this.actions; + public List GetActions() => this.actions; public List GetGoals() => this.goals; } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/AgentTypeFactory.cs b/Package/Runtime/CrashKonijn.Goap/Classes/AgentTypeFactory.cs index cd178066..deee849b 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/AgentTypeFactory.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/AgentTypeFactory.cs @@ -61,9 +61,9 @@ private SensorRunner CreateSensorRunner(IAgentTypeConfig config, GlobalWorldData return new SensorRunner(this.GetWorldSensors(config), this.GetTargetSensors(config), this.GetMultiSensors(config), globalWorldData); } - private List GetActions(IAgentTypeConfig config) + private List GetActions(IAgentTypeConfig config) { - var actions = this.classResolver.Load(config.Actions); + var actions = this.classResolver.Load(config.Actions); var injector = this.goapConfig.GoapInjector; actions.ForEach(x => diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/ActionBuilder.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Builders/ActionBuilder.cs index 5356705d..149f374c 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/ActionBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Builders/ActionBuilder.cs @@ -131,10 +131,10 @@ private Type GetPropertiesType() if (baseType == null) return null; - if (baseType.IsGenericType && baseType.GetGenericTypeDefinition() == typeof(ActionBase<,>)) + if (baseType.IsGenericType && baseType.GetGenericTypeDefinition() == typeof(GoapActionBase<,>)) return baseType.GetGenericArguments()[1]; - if (baseType.IsGenericType && baseType.GetGenericTypeDefinition() == typeof(ActionBase<>)) + if (baseType.IsGenericType && baseType.GetGenericTypeDefinition() == typeof(GoapActionBase<>)) return typeof(EmptyActionProperties); return null; diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs index 33f43ab5..ac170771 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs @@ -28,15 +28,15 @@ public void OnLateUpdate() } - private void OnAgentResolve(IAgent agent) + private void OnAgentResolve(IGoapAgent agent) { var runner = this.GetRunner(agent); - runner.Run(new HashSet() { agent as IMonoAgent }); + runner.Run(new HashSet() { agent as IMonoGoapAgent }); runner.Complete(); } - private IAgentTypeJobRunner GetRunner(IAgent agent) + private IAgentTypeJobRunner GetRunner(IGoapAgent agent) { return this.goap.AgentTypeRunners[agent.AgentType]; } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs index 358ef9be..dc5e4b9f 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs @@ -6,7 +6,7 @@ namespace CrashKonijn.Goap.Classes.Controllers public class ProactiveController : IGoapController { private IGoap goap; - private Dictionary> agents = new(); + private Dictionary> agents = new(); public float ResolveTime { get; set; } = 1f; @@ -30,7 +30,7 @@ public void OnUpdate() if (agent.IsNull()) continue; - if (agent.Timers.Resolve.IsRunningFor(this.ResolveTime)) + if (agent.Agent.Timers.Resolve.IsRunningFor(this.ResolveTime)) { agent.ResolveAction(); } @@ -51,9 +51,9 @@ public void OnUpdate() continue; // Update the action sensors for the agent - agent.AgentType.SensorRunner.SenseLocal(agent, agent.ActionState.Action); + agent.AgentType.SensorRunner.SenseLocal(agent, agent.Agent.ActionState.Action as IGoapAction); - agent.Run(); + agent.Agent.Run(); } } @@ -65,20 +65,20 @@ public void OnLateUpdate() } } - private void OnNoActionFound(IAgent agent, IGoal goal) + private void OnNoActionFound(IMonoGoapAgent agent, IGoal goal) { - this.GetQueue(agent.AgentType).Add(agent as IMonoAgent); + this.GetQueue(agent.AgentType).Add(agent); } - private void OnAgentResolve(IAgent agent) + private void OnAgentResolve(IMonoGoapAgent agent) { - this.GetQueue(agent.AgentType).Add(agent as IMonoAgent); + this.GetQueue(agent.AgentType).Add(agent); } - private HashSet GetQueue(IAgentType agentType) + private HashSet GetQueue(IAgentType agentType) { if (!this.agents.ContainsKey(agentType)) - this.agents.Add(agentType, new HashSet()); + this.agents.Add(agentType, new HashSet()); return this.agents[agentType]; } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs index 10a10594..7d41c362 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs @@ -6,7 +6,7 @@ namespace CrashKonijn.Goap.Classes.Controllers public class ReactiveController : IGoapController { private IGoap goap; - private Dictionary> agents = new(); + private Dictionary> agents = new(); public void Initialize(IGoap goap) { @@ -38,9 +38,9 @@ public void OnUpdate() continue; // Update the action sensors for the agent - agent.AgentType.SensorRunner.SenseLocal(agent, agent.ActionState.Action); + agent.AgentType.SensorRunner.SenseLocal(agent, agent.Agent.ActionState.Action as IGoapAction); - agent.Run(); + agent.Agent.Run(); } } @@ -52,20 +52,20 @@ public void OnLateUpdate() } } - private void OnNoActionFound(IAgent agent, IGoal goal) + private void OnNoActionFound(IMonoGoapAgent agent, IGoal goal) { - this.GetQueue(agent.AgentType).Add(agent as IMonoAgent); + this.GetQueue(agent.AgentType).Add(agent); } - private void OnAgentResolve(IAgent agent) + private void OnAgentResolve(IMonoGoapAgent agent) { - this.GetQueue(agent.AgentType).Add(agent as IMonoAgent); + this.GetQueue(agent.AgentType).Add(agent); } - private HashSet GetQueue(IAgentType agentType) + private HashSet GetQueue(IAgentType agentType) { if (!this.agents.ContainsKey(agentType)) - this.agents.Add(agentType, new HashSet()); + this.agents.Add(agentType, new HashSet()); return this.agents[agentType]; } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs b/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs new file mode 100644 index 00000000..605960c9 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs @@ -0,0 +1,38 @@ +using CrashKonijn.Agent; +using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Goap.Core.Interfaces; + +namespace CrashKonijn.Goap.Classes +{ + public class GoapAgentLogger : LoggerBase + { + protected override string Name => this.source.name; + + protected override void RegisterEvents() + { + if (this.source == null) + return; + + // Todo + this.source.Events.OnNoActionFound += this.NoActionFound; + this.source.Events.OnGoalStart += this.GoalStart; + this.source.Events.OnGoalCompleted += this.GoalCompleted; + } + + protected override void UnregisterEvents() + { + if (this.source == null) + return; + + // Todo + this.source.Events.OnNoActionFound -= this.NoActionFound; + this.source.Events.OnGoalStart -= this.GoalStart; + this.source.Events.OnGoalCompleted -= this.GoalCompleted; + } + + private void NoActionFound(IGoal goal) => this.Handle($"No action found for goal {goal?.GetType().GetGenericTypeName()}", DebugSeverity.Warning); + private void GoalStart(IGoal goal) => this.Handle($"Goal {goal?.GetType().GetGenericTypeName()} started", DebugSeverity.Log); + private void GoalCompleted(IGoal goal) => this.Handle($"Goal {goal?.GetType().GetGenericTypeName()} completed", DebugSeverity.Log); + + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs.meta b/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs.meta new file mode 100644 index 00000000..c36553c4 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7db59576e6df4bba819332c8f81dbf19 +timeCreated: 1719403848 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs index 9c56ebfc..d68668aa 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs @@ -32,7 +32,7 @@ public AgentTypeJobRunner(IAgentType agentType, IGraphResolver graphResolver) this.conditionBuilder = this.resolver.GetConditionBuilder(); } - public void Run(HashSet queue) + public void Run(HashSet queue) { this.resolveHandles.Clear(); @@ -45,7 +45,7 @@ public void Run(HashSet queue) } } - private void Run(IMonoAgent agent) + private void Run(IMonoGoapAgent agent) { if (agent.IsNull()) return; @@ -75,12 +75,12 @@ private void Run(IMonoAgent agent) Positions = new NativeArray(this.positionBuilder.Build(), Allocator.TempJob), Costs = new NativeArray(this.costBuilder.Build(), Allocator.TempJob), ConditionsMet = new NativeArray(this.conditionBuilder.Build(), Allocator.TempJob), - DistanceMultiplier = agent.DistanceMultiplier + DistanceMultiplier = agent.Agent.DistanceMultiplier }) }); } - private void FillBuilders(IMonoAgent agent) + private void FillBuilders(IMonoGoapAgent agent) { var conditionObserver = this.agentType.GoapConfig.ConditionObserver; conditionObserver.SetWorldData(agent.WorldData); @@ -109,15 +109,15 @@ private void FillBuilders(IMonoAgent agent) var target = agent.WorldData.GetTarget(node); - this.executableBuilder.SetExecutable(node, node.IsExecutable(agent, allMet)); - this.enabledBuilder.SetEnabled(node, node.IsEnabled(agent)); - this.costBuilder.SetCost(node, node.GetCost(agent, agent.Injector)); + this.executableBuilder.SetExecutable(node, node.IsExecutable(agent.Agent, allMet)); + this.enabledBuilder.SetEnabled(node, node.IsEnabled(agent.Agent)); + this.costBuilder.SetCost(node, node.GetCost(agent.Agent, agent.Agent.Injector)); this.positionBuilder.SetPosition(node, target?.Position ?? transformTarget.Position); } } - private bool IsGoalCompleted(IMonoAgent agent) + private bool IsGoalCompleted(IGoapAgent agent) { var conditionObserver = this.agentType.GoapConfig.ConditionObserver; conditionObserver.SetWorldData(agent.WorldData); @@ -140,7 +140,7 @@ public void Complete() if (resolveHandle.Agent.IsNull()) continue; - var action = result.FirstOrDefault() as IAction; + var action = result.FirstOrDefault() as IGoapAction; if (action is null) { @@ -148,7 +148,7 @@ public void Complete() continue; } - if (action != resolveHandle.Agent.ActionState.Action) + if (action != resolveHandle.Agent.Agent.ActionState.Action) { resolveHandle.Agent.SetAction(action, result, resolveHandle.Agent.WorldData.GetTarget(action)); } @@ -169,10 +169,10 @@ public void Dispose() private class JobRunHandle { - public IMonoAgent Agent { get; } + public IMonoGoapAgent Agent { get; } public IResolveHandle Handle { get; set; } - public JobRunHandle(IMonoAgent agent) + public JobRunHandle(IMonoGoapAgent agent) { this.Agent = agent; } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs index c97bf23a..fb7451f4 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs @@ -12,7 +12,7 @@ public class Goap : IGoap private Stopwatch stopwatch = new(); /** GC caches **/ - private List agentsGC = new(); + private List agentsGC = new(); /** **/ public IGoapEvents Events { get; } = new GoapEvents(); @@ -64,7 +64,7 @@ private float GetElapsedMs() public IGraph GetGraph(IAgentType agentType) => this.AgentTypeRunners[agentType].GetGraph(); public bool Knows(IAgentType agentType) => this.AgentTypeRunners.ContainsKey(agentType); - public List Agents + public List Agents { get { this.agentsGC.Clear(); diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs index 9171372a..c541ce73 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs @@ -7,7 +7,7 @@ namespace CrashKonijn.Goap.Classes.Runners public class SensorRunner : ISensorRunner { private SensorSet defaultSet = new(); - private Dictionary actionSets = new(); + private Dictionary actionSets = new(); private Dictionary sensors = new(); private IGlobalWorldData worldData; @@ -53,7 +53,7 @@ public void Update() } } - public void Update(IAction action) + public void Update(IGoapAction action) { var set = this.GetSet(action); @@ -71,7 +71,7 @@ public void SenseGlobal() } } - public void SenseGlobal(IAction action) + public void SenseGlobal(IGoapAction action) { var set = this.GetSet(action); @@ -81,15 +81,15 @@ public void SenseGlobal(IAction action) } } - public void SenseLocal(IMonoAgent agent) + public void SenseLocal(IMonoGoapAgent agent) { foreach (var localSensor in this.defaultSet.LocalSensors) { - localSensor.Sense(agent.WorldData, agent, agent.Injector); + localSensor.Sense(agent.WorldData, agent.Agent, agent.Agent.Injector); } } - public void SenseLocal(IMonoAgent agent, IAction action) + public void SenseLocal(IMonoGoapAgent agent, IGoapAction action) { if (agent.IsNull()) return; @@ -101,11 +101,11 @@ public void SenseLocal(IMonoAgent agent, IAction action) foreach (var localSensor in set.LocalSensors) { - localSensor.Sense(agent.WorldData, agent, agent.Injector); + localSensor.Sense(agent.WorldData, agent.Agent, agent.Agent.Injector); } } - private SensorSet GetSet(IAction action) + private SensorSet GetSet(IGoapAction action) { if (this.actionSets.TryGetValue(action, out var existingSet)) return existingSet; @@ -113,7 +113,7 @@ private SensorSet GetSet(IAction action) return this.CreateSet(action); } - private SensorSet CreateSet(IAction action) + private SensorSet CreateSet(IGoapAction action) { var set = new SensorSet(); diff --git a/Package/Runtime/CrashKonijn.Goap/Extensions.cs b/Package/Runtime/CrashKonijn.Goap/Extensions.cs index ed0807a6..ca69a0b1 100644 --- a/Package/Runtime/CrashKonijn.Goap/Extensions.cs +++ b/Package/Runtime/CrashKonijn.Goap/Extensions.cs @@ -14,6 +14,9 @@ public static class Extensions { public static bool IsNull(this IMonoAgent agent) => agent is MonoBehaviour mono && mono == null; + + public static bool IsNull(this IMonoGoapAgent agent) + => agent is MonoBehaviour mono && mono == null; public static string ToName(this Comparison comparison) { diff --git a/Package/Runtime/CrashKonijn.Goap/WorldDataBase.cs b/Package/Runtime/CrashKonijn.Goap/WorldDataBase.cs index 34ec4a63..b3f4b1f7 100644 --- a/Package/Runtime/CrashKonijn.Goap/WorldDataBase.cs +++ b/Package/Runtime/CrashKonijn.Goap/WorldDataBase.cs @@ -10,7 +10,7 @@ public abstract class WorldDataBase : IWorldData public Dictionary States { get; } = new(); public Dictionary Targets { get; } = new(); - public ITarget GetTarget(IAction action) + public ITarget GetTarget(IGoapAction action) { if (action == null) return null; diff --git a/Package/Runtime/CrashKonijn.Goap/com.crashkonijn.goap.asmdef b/Package/Runtime/CrashKonijn.Goap/com.crashkonijn.goap.asmdef index df8f16b7..5adaa162 100644 --- a/Package/Runtime/CrashKonijn.Goap/com.crashkonijn.goap.asmdef +++ b/Package/Runtime/CrashKonijn.Goap/com.crashkonijn.goap.asmdef @@ -4,7 +4,9 @@ "references": [ "GUID:e52adf591423434e8c16eeb452c84a82", "GUID:d8b63aba1907145bea998dd612889d6b", - "GUID:1492f7fc38ce464dae5c20df05fd22e3" + "GUID:1492f7fc38ce464dae5c20df05fd22e3", + "GUID:0d347051544a4880a72466503e27985a", + "GUID:4d9088d80ac84f52b9b07421f95af69c" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ActionRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ActionRunnerTests.cs index 5d8c171d..6fae6dd4 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ActionRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ActionRunnerTests.cs @@ -17,13 +17,13 @@ public class ActionRunnerTests private ActionRunner actionRunner; private IAgentProxy proxy; private IAgentEvents events; - private IAction action; + private IGoapAction action; [SetUp] public void SetUp() { this.events = Substitute.For(); - this.action = Substitute.For(); + this.action = Substitute.For(); this.action.IsValid(Arg.Any(), Arg.Any()).Returns(true); this.agent = Substitute.For(); @@ -54,7 +54,7 @@ public void MoveBeforePerforming_WhenInRange_ShouldSetStateToPerformingAction() { // Arrange this.proxy.IsInRange().Returns(true); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.MoveBeforePerforming); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.MoveBeforePerforming); // Act this.actionRunner.Run(); @@ -68,7 +68,7 @@ public void MoveBeforePerforming_WhenInRange_ShouldSetMoveStateToInRange() { // Arrange this.proxy.IsInRange().Returns(true); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.MoveBeforePerforming); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.MoveBeforePerforming); // Act this.actionRunner.Run(); @@ -82,7 +82,7 @@ public void MoveBeforePerforming_WhenInRange_ShouldPerformAction() { // Arrange this.proxy.IsInRange().Returns(true); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.MoveBeforePerforming); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.MoveBeforePerforming); // Act this.actionRunner.Run(); @@ -96,7 +96,7 @@ public void MoveBeforePerforming_WhenNotInRange_ShouldSetStateToMovingToTarget() { // Arrange this.proxy.IsInRange().Returns(false); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.MoveBeforePerforming); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.MoveBeforePerforming); // Act this.actionRunner.Run(); @@ -110,7 +110,7 @@ public void MoveBeforePerforming_WhenNotInRange_ShouldSetMoveStateToOutOfRange() { // Arrange this.proxy.IsInRange().Returns(false); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.MoveBeforePerforming); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.MoveBeforePerforming); // Act this.actionRunner.Run(); @@ -124,7 +124,7 @@ public void MoveBeforePerforming_WhenNotInRange_ShouldMove() { // Arrange this.proxy.IsInRange().Returns(false); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.MoveBeforePerforming); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.MoveBeforePerforming); // Act this.actionRunner.Run(); @@ -139,7 +139,7 @@ public void MoveBeforePerforming_WhenNotInRangeAndStateIsPerformingAction_Should // Arrange this.proxy.IsInRange().Returns(false); this.agent.State.Returns(AgentState.PerformingAction); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.MoveBeforePerforming); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.MoveBeforePerforming); // Act this.actionRunner.Run(); @@ -153,7 +153,7 @@ public void PerformWhileMoving_WhenInRange_ShouldSetStateToPerformingAction() { // Arrange this.proxy.IsInRange().Returns(true); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -167,7 +167,7 @@ public void PerformWhileMoving_WhenInRange_ShouldSetMoveStateToInRange() { // Arrange this.proxy.IsInRange().Returns(true); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -181,7 +181,7 @@ public void PerformWhileMoving_WhenInRange_ShouldPerformAction() { // Arrange this.proxy.IsInRange().Returns(true); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -195,7 +195,7 @@ public void PerformWhileMoving_WhenNotInRange_ShouldSetStateToMovingWhilePerform { // Arrange this.proxy.IsInRange().Returns(false); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -209,7 +209,7 @@ public void PerformWhileMoving_WhenNotInRange_ShouldSetMoveStateToOutOfRange() { // Arrange this.proxy.IsInRange().Returns(false); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -223,7 +223,7 @@ public void PerformWhileMoving_WhenNotInRange_ShouldMove() { // Arrange this.proxy.IsInRange().Returns(false); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -237,7 +237,7 @@ public void PerformAction_NoRunState_ShouldPerformAction() { // Arrange this.proxy.IsInRange().Returns(true); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -252,7 +252,7 @@ public void PerformAction_IsCompletedRunState_ShouldNotPerformAction() // Arrange this.proxy.IsInRange().Returns(true); this.agent.ActionState.RunState.Returns(ActionRunState.Completed); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -268,7 +268,7 @@ public void PerformAction_ShouldStopRunState_ShouldNotPerformAction() // Arrange this.proxy.IsInRange().Returns(true); this.agent.ActionState.RunState.Returns(ActionRunState.Stop); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -284,7 +284,7 @@ public void PerformAction_ContinueRunState_ShouldPerformAction() // Arrange this.proxy.IsInRange().Returns(true); this.agent.ActionState.RunState.Returns(ActionRunState.Continue); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); // Act this.actionRunner.Run(); @@ -299,7 +299,7 @@ public void PerformAction_ReturnedCompleteState_ShouldCompleteAction() // Arrange this.proxy.IsInRange().Returns(true); this.agent.ActionState.RunState.Returns(ActionRunState.Completed); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); this.action.Perform(this.agent, this.agent.ActionState.Data, Arg.Any()).Returns(ActionRunState.Completed); // Act @@ -315,7 +315,7 @@ public void PerformAction_ReturnedStopState_ShouldStopAction() // Arrange this.proxy.IsInRange().Returns(true); this.agent.ActionState.RunState.Returns(ActionRunState.Stop); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); this.action.Perform(this.agent, this.agent.ActionState.Data, Arg.Any()).Returns(ActionRunState.Stop); // Act @@ -334,7 +334,7 @@ public void PerformAction_ReturnedContinueState_ShouldContinueAction() var state = ActionRunState.Continue; this.agent.ActionState.RunState.Returns(state); - this.agent.ActionState.Action.Config.MoveMode.Returns(ActionMoveMode.PerformWhileMoving); + this.action.GetMoveMode(this.agent).Returns(ActionMoveMode.PerformWhileMoving); this.action.Perform(this.agent, this.agent.ActionState.Data, Arg.Any()).Returns(ActionRunState.Continue); // Act diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs index b1e5f6cf..b890c265 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs @@ -21,7 +21,7 @@ public void OnEnable_CallsRegister() { // Arrange var agentType = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.AgentType = agentType; // Act @@ -43,7 +43,7 @@ public void OnDisable_CallsUnregister() { // Arrange var agentType = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.AgentType = agentType; // Act @@ -65,22 +65,24 @@ public void ActionPerform_WithRunStateStop_CallsEnd() { // Arrange var agentType = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.AgentType = agentType; agent.CallAwake(); + agent.Agent.Initialize(); - var action = Substitute.For(); + var action = Substitute.For(); action.IsValid(Arg.Any(), Arg.Any()).Returns(true); - action.IsInRange(agent, Arg.Any(), Arg.Any(), Arg.Any()).Returns(true); - action.Perform(agent, Arg.Any(), Arg.Any()).Returns(ActionRunState.Stop); + action.IsInRange(agent.Agent, Arg.Any(), Arg.Any(), Arg.Any()).Returns(true); + action.Perform(agent.Agent, Arg.Any(), Arg.Any()).Returns(ActionRunState.Stop); + agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); // Act - agent.Run(); + agent.Agent.Run(); // Assert - action.Received(1).Perform(agent, Arg.Any(), Arg.Any()); - action.Received(1).Stop(agent, Arg.Any()); + action.Received(1).Perform(agent.Agent, Arg.Any(), Arg.Any()); + action.Received(1).Stop(agent.Agent, Arg.Any()); } [Test] @@ -90,7 +92,7 @@ public void SetGoal_SetsGoal() var agentType = Substitute.For(); agentType.ResolveGoal().Returns(new TestGoal()); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.AgentType = agentType; // Act @@ -107,7 +109,7 @@ public void SetGoal_ResolvesAgent() var agentType = Substitute.For(); agentType.ResolveGoal().Returns(new TestGoal()); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.AgentType = agentType; agent.MockEvents(); @@ -125,7 +127,7 @@ public void SetGoal_CallsGoalStartEvent() var agentType = Substitute.For(); agentType.ResolveGoal().Returns(new TestGoal()); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.AgentType = agentType; agent.MockEvents(); @@ -143,11 +145,11 @@ public void SetGoal_EndActionFalse_DoesntCallEnd() var agentType = Substitute.For(); agentType.ResolveGoal().Returns(new TestGoal()); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.AgentType = agentType; // Set Action property through reflection - var action = Substitute.For(); + var action = Substitute.For(); agent.InsertAction(action); // Act @@ -164,11 +166,12 @@ public void SetGoal_EndActionTrue_DoesCallEnd() var agentType = Substitute.For(); agentType.ResolveGoal().Returns(new TestGoal()); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.AgentType = agentType; + agent.Agent.ActionResolver = Substitute.For(); // Set Action property through reflection - var action = Substitute.For(); + var action = Substitute.For(); agent.InsertAction(action); // Act @@ -182,16 +185,17 @@ public void SetGoal_EndActionTrue_DoesCallEnd() public void SetAction_SetsAction() { // Arrange - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); + agent.Agent.Initialize(); - var action = Substitute.For(); + var action = Substitute.For(); // Act agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); // Assert - agent.ActionState.Action.Should().Be(action); + agent.Agent.ActionState.Action.Should().Be(action); } [Test] @@ -199,31 +203,33 @@ public void SetAction_CallsEndOnOldAction() { // Arrange var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.AgentType = set; agent.CallAwake(); + agent.Agent.Initialize(); - var action = Substitute.For(); + var action = Substitute.For(); // Set Action property through reflection - var oldAction = Substitute.For(); + var oldAction = Substitute.For(); agent.InsertAction(oldAction); // Act agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); // Assert - oldAction.Received(1).Stop(agent, Arg.Any()); + oldAction.Received(1).Stop(agent.Agent, Arg.Any()); } [Test] public void SetAction_CallsGetData() { // Arrange - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); + agent.Agent.Initialize(); - var action = Substitute.For(); + var action = Substitute.For(); // Act agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); @@ -236,29 +242,31 @@ public void SetAction_CallsGetData() public void SetAction_StoresData() { // Arrange - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); + agent.Agent.Initialize(); var actionData = Substitute.For(); - var action = Substitute.For(); + var action = Substitute.For(); action.GetData().Returns(actionData); // Act agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); // Assert - agent.ActionState.Data.Should().Be(actionData); + agent.Agent.ActionState.Data.Should().Be(actionData); } [Test] public void SetAction_SetsDataTarget() { // Arrange - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); + agent.Agent.Initialize(); var actionData = Substitute.For(); - var action = Substitute.For(); + var action = Substitute.For(); action.GetData().Returns(actionData); var target = new PositionTarget(Vector3.zero); @@ -274,29 +282,31 @@ public void SetAction_SetsDataTarget() public void SetAction_CallsStartOnAction() { // Arrange - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); + agent.Agent.Initialize(); - var action = Substitute.For(); + var action = Substitute.For(); // Act agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); // Assert - action.Received(1).Start(agent, Arg.Any()); + action.Received(1).Start(agent.Agent, Arg.Any()); } [Test] public void SetAction_StoresPath() { // Arrange - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); + agent.Agent.Initialize(); - var action = Substitute.For(); - var path = new IAction[] + var action = Substitute.For(); + var path = new IConnectable[] { - Substitute.For() + Substitute.For() }; // Act @@ -310,17 +320,18 @@ public void SetAction_StoresPath() public void SetAction_CallsActionStartEvent() { // Arrange - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); - agent.MockEvents(); + agent.Agent.Initialize(); + agent.Agent.MockEvents(); - var action = Substitute.For(); + var action = Substitute.For(); // Act agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); // Assert - agent.Events.Received(1).ActionStart(action); + agent.Agent.Events.Received(1).ActionStart(action); } [Test] @@ -328,18 +339,20 @@ public void EndAction_CallsEndOnAction() { // Arrange var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); + agent.Agent.ActionResolver = Substitute.For(); agent.CallAwake(); + agent.Agent.Initialize(); agent.AgentType = set; - var action = Substitute.For(); + var action = Substitute.For(); agent.InsertAction(action); // Act agent.StopAction(); // Assert - action.Received(1).Stop(agent, Arg.Any()); + action.Received(1).Stop(agent.Agent, Arg.Any()); } [Test] @@ -347,16 +360,17 @@ public void EndAction_ClearsAction() { // Arrange var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); + agent.Agent.Initialize(); agent.AgentType = set; // Act - agent.SetAction(Substitute.For(), Array.Empty(), new PositionTarget(Vector3.zero)); + agent.SetAction(Substitute.For(), Array.Empty(), new PositionTarget(Vector3.zero)); agent.StopAction(); // Assert - agent.ActionState.Action.Should().BeNull(); + agent.Agent.ActionState.Action.Should().BeNull(); } [Test] @@ -364,16 +378,17 @@ public void EndAction_ClearsActionData() { // Arrange var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); + agent.Agent.Initialize(); agent.AgentType = set; // Act - agent.SetAction(Substitute.For(), Array.Empty(), new PositionTarget(Vector3.zero)); + agent.SetAction(Substitute.For(), Array.Empty(), new PositionTarget(Vector3.zero)); agent.StopAction(); // Assert - agent.ActionState.Data.Should().BeNull(); + agent.Agent.ActionState.Data.Should().BeNull(); } [Test] @@ -382,8 +397,10 @@ public void EndAction_ShouldResolveAgent() // Arrange var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); + agent.Agent.ActionResolver = agent; agent.CallAwake(); + agent.Agent.Initialize(); agent.AgentType = set; agent.MockEvents(); @@ -399,19 +416,20 @@ public void EndAction_CallsActionEndEvent() { // Arrange var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); + var agent = new GameObject("Agent").AddComponent(); agent.CallAwake(); + agent.Agent.Initialize(); agent.AgentType = set; - agent.MockEvents(); + agent.Agent.MockEvents(); - var action = Substitute.For(); + var action = Substitute.For(); agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); // Act agent.StopAction(); // Assert - agent.Events.Received(1).ActionStop(action); + agent.Agent.Events.Received(1).ActionStop(action); } } } \ No newline at end of file diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs index 79bb038d..2ca9a02b 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs @@ -4,6 +4,7 @@ using CrashKonijn.Goap.Core.Interfaces; using CrashKonijn.Goap.Resolver; using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.UnitTests.Support; using NSubstitute; using NSubstitute.ReturnsExtensions; using NUnit.Framework; @@ -28,7 +29,7 @@ public void Run_UpdatesSensorRunner() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { Substitute.For() }); + runner.Run(new HashSet() { Substitute.For() }); runner.Dispose(); // Assert @@ -50,7 +51,7 @@ public void Run_WithNoAgens_SensesGlobalSensors() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet()); + runner.Run(new HashSet()); runner.Dispose(); // Assert @@ -72,7 +73,7 @@ public void Run_WithAtLeastOneAgent_SensesGlobalSensors() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { Substitute.For() }); + runner.Run(new HashSet() { Substitute.For() }); runner.Dispose(); // Assert @@ -83,9 +84,9 @@ public void Run_WithAtLeastOneAgent_SensesGlobalSensors() public void Run_AgentHasNoCurrentGoal_DoesNotRun() { // Arrange - var agent = Substitute.For(); + var agent = Substitute.For(); agent.CurrentGoal.ReturnsNull(); - agent.ActionState.Action.ReturnsNull(); + agent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -99,7 +100,7 @@ public void Run_AgentHasNoCurrentGoal_DoesNotRun() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet()); + runner.Run(new HashSet()); runner.Dispose(); // Assert @@ -114,23 +115,23 @@ public void Run_AgentHasCurrentGoalAndNoAction_Runs() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.CurrentGoal.Returns(goal); - agent.ActionState.Action.ReturnsNull(); + agent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); var agentType = Substitute.For(); agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); - agentType.GetActions().Returns(new List()); + agentType.GetActions().Returns(new List()); var resolver = Substitute.For(); var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { agent }); runner.Dispose(); // Assert @@ -145,23 +146,23 @@ public void Run_AgentHasCurrentGoalAndDoesHaveAction_Runs() var goal = Substitute.For(); goal.Conditions.Returns(new []{ Substitute.For() }); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.CurrentGoal.Returns(goal); - agent.ActionState.Action.Returns(Substitute.For()); + agent.Agent.ActionState.Action.Returns(Substitute.For()); var sensorRunner = Substitute.For(); var agentType = Substitute.For(); agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); - agentType.GetActions().Returns(new List()); + agentType.GetActions().Returns(new List()); var resolver = Substitute.For(); var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { agent }); runner.Dispose(); // Assert @@ -176,16 +177,16 @@ public void Run_AgentHasCompletedGoal_CallsGoalCompleteEvent() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.CurrentGoal.Returns(goal); - agent.ActionState.Action.ReturnsNull(); + agent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); var agentType = Substitute.For(); agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); - agentType.GetActions().Returns(new List()); + agentType.GetActions().Returns(new List()); agentType.GoapConfig.ConditionObserver.IsMet(Arg.Any()).Returns(true); @@ -194,7 +195,7 @@ public void Run_AgentHasCompletedGoal_CallsGoalCompleteEvent() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { agent }); runner.Dispose(); // Assert @@ -210,16 +211,16 @@ public void Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.CurrentGoal.Returns(goal); - agent.ActionState.Action.ReturnsNull(); + agent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); var agentType = Substitute.For(); agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); - agentType.GetActions().Returns(new List()); + agentType.GetActions().Returns(new List()); agentType.GoapConfig.ConditionObserver.IsMet(Arg.Any()).Returns(false); @@ -228,7 +229,7 @@ public void Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { agent }); runner.Dispose(); // Assert @@ -244,18 +245,18 @@ public void Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - var action = Substitute.For(); + var action = Substitute.For(); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.CurrentGoal.Returns(goal); - agent.ActionState.Action.ReturnsNull(); + agent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); var agentType = Substitute.For(); agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); - agentType.GetActions().Returns(new List()); + agentType.GetActions().Returns(new List()); var handle = Substitute.For(); handle.Complete().Returns(new IConnectable[] { action }); @@ -266,7 +267,7 @@ public void Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { agent }); runner.Complete(); // Assert @@ -280,18 +281,18 @@ public void Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - var action = Substitute.For(); + var action = Substitute.For(); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.CurrentGoal.Returns(goal); - agent.ActionState.Action.Returns(action); + agent.Agent.ActionState.Action.Returns(action); var sensorRunner = Substitute.For(); var agentType = Substitute.For(); agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); - agentType.GetActions().Returns(new List()); + agentType.GetActions().Returns(new List()); var handle = Substitute.For(); handle.Complete().Returns(new IConnectable[] { action }); @@ -302,11 +303,11 @@ public void Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { agent }); runner.Complete(); // Assert - agent.Received(0).SetAction(Arg.Any(), Arg.Any(), Arg.Any()); + agent.Received(0).SetAction(Arg.Any(), Arg.Any(), Arg.Any()); } } } \ No newline at end of file diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestAction.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestAction.cs index bbed8d7d..22d0666e 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestAction.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestAction.cs @@ -6,7 +6,7 @@ namespace CrashKonijn.Goap.UnitTests.Classes { - public class TestAction : ActionBase + public class TestAction : GoapActionBase { public override void Created() { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Action.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Action.cs index b3635f0a..26cbd872 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Action.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Action.cs @@ -1,12 +1,10 @@ using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; using CrashKonijn.Goap.Core.Interfaces; namespace CrashKonijn.Goap.UnitTests.Data { - public class Action : ActionBase + public class Action : GoapActionBase { public override void Created() { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestAction.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestAction.cs index 2fe67756..a2a7f913 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestAction.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestAction.cs @@ -2,7 +2,7 @@ namespace CrashKonijn.Goap.UnitTests.Interfaces { - public interface ITestAction : IAction + public interface ITestAction : IGoapAction { public string Name { get; set; } } diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs index 8ae9e80f..cec722ad 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs @@ -32,7 +32,7 @@ public void OnAgentResolve_CallsRunAndComplete() // Arrange var agentType = Substitute.For(); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.AgentType.Returns(agentType); var jobRunner = Substitute.For(); @@ -44,10 +44,10 @@ public void OnAgentResolve_CallsRunAndComplete() this.goap.AgentTypeRunners.Returns(typeRunners); // Act - this.goap.Events.OnAgentResolve += Raise.Event(agent); + this.goap.Events.OnAgentResolve += Raise.Event(agent); // Assert - jobRunner.Received(1).Run(Arg.Any>()); + jobRunner.Received(1).Run(Arg.Any>()); jobRunner.Received(1).Complete(); } } diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs index d4314cde..4848f1cf 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs @@ -13,7 +13,7 @@ public class ProactiveControllerTests private ProactiveController proactiveController; private IGoapEvents events; private Dictionary typeRunners; - private IMonoAgent agent; + private IMonoGoapAgent agent; private IAgentType agentType; private IAgentTypeJobRunner runner; @@ -23,7 +23,7 @@ public void SetUp() this.agentType = Substitute.For(); this.agentType.SensorRunner.Returns(Substitute.For()); - this.agent = Substitute.For(); + this.agent = Substitute.For(); this.agent.AgentType.Returns(this.agentType); this.events = Substitute.For(); @@ -35,7 +35,7 @@ public void SetUp() }; this.goap = Substitute.For(); - this.goap.Agents.Returns(new List()); + this.goap.Agents.Returns(new List()); this.goap.AgentTypeRunners.Returns(this.typeRunners); this.goap.Events.Returns(this.events); @@ -46,9 +46,9 @@ public void SetUp() public void OnUpdate_ResolveActionCalledWhenResolveTimeExpired() { // Arrange - this.agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(true); + this.agent.Agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(true); - this.goap.Agents.Returns(new List() { this.agent }); + this.goap.Agents.Returns(new List() { this.agent }); this.proactiveController.Initialize(this.goap); // Act @@ -62,10 +62,10 @@ public void OnUpdate_ResolveActionCalledWhenResolveTimeExpired() public void OnUpdate_ResolveActionNotCalledWhenResolveTimeNotExpired() { // Arrange - this.agent = Substitute.For(); - this.agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(false); + this.agent = Substitute.For(); + this.agent.Agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(false); - this.goap.Agents.Returns(new List() { this.agent }); + this.goap.Agents.Returns(new List() { this.agent }); this.proactiveController.Initialize(this.goap); // Act @@ -85,7 +85,7 @@ public void OnUpdate_RunCalledOnAgentTypeRunners() this.proactiveController.OnUpdate(); // Assert - this.runner.Received().Run(Arg.Any>()); + this.runner.Received().Run(Arg.Any>()); } [Test] diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs index 2152d4bb..19ebb879 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs @@ -13,7 +13,7 @@ public class ReactiveControllerTests private ReactiveController controller; private IGoapEvents events; private Dictionary typeRunners; - private IMonoAgent agent; + private IMonoGoapAgent agent; private IAgentType agentType; private IAgentTypeJobRunner runner; @@ -22,7 +22,7 @@ public void SetUp() { this.agentType = Substitute.For(); - this.agent = Substitute.For(); + this.agent = Substitute.For(); this.agent.AgentType.Returns(this.agentType); this.events = Substitute.For(); @@ -34,7 +34,7 @@ public void SetUp() }; this.goap = Substitute.For(); - this.goap.Agents.Returns(new List()); + this.goap.Agents.Returns(new List()); this.goap.AgentTypeRunners.Returns(this.typeRunners); this.goap.Events.Returns(this.events); @@ -51,7 +51,7 @@ public void OnUpdate_RunCalledOnAgentTypeRunners() this.controller.OnUpdate(); // Assert - this.runner.Received().Run(Arg.Any>()); + this.runner.Received().Run(Arg.Any>()); } [Test] diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs index a54f38ed..4b05b0bc 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs @@ -61,7 +61,7 @@ public void SenseLocal_GlobalSensor_DoesntCallsSense() var runner = new SensorRunner(new IWorldSensor[] { sensor }, new ITargetSensor[] { }, new IMultiSensor[] { }, Substitute.For()); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.WorldData.Returns(new LocalWorldData()); // Act @@ -79,14 +79,14 @@ public void SenseLocal_LocalSensor_CallsSense() var runner = new SensorRunner(new IWorldSensor[] { sensor }, new ITargetSensor[] { }, new IMultiSensor[] { }, Substitute.For()); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.WorldData.Returns(new LocalWorldData()); // Act runner.SenseLocal(agent); // Assert - sensor.Received().Sense(Arg.Any(), agent, Arg.Any()); + sensor.Received().Sense(Arg.Any(), agent.Agent, Arg.Any()); } [Test] @@ -97,14 +97,14 @@ public void SenseLocal_MultiSensor_CallsSense() var runner = new SensorRunner(new IWorldSensor[] { }, new ITargetSensor[] { }, new IMultiSensor[] { sensor }, Substitute.For()); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.WorldData.Returns(new LocalWorldData()); // Act runner.SenseLocal(agent); // Assert - sensor.Received().Sense(Arg.Any(), agent, Arg.Any()); + sensor.Received().Sense(Arg.Any(), agent.Agent, Arg.Any()); } [Test] @@ -122,13 +122,13 @@ public void SenseLocal_WithAgent_OnlyRunsMatchingKey() var condition = Substitute.For(); condition.WorldKey.Returns(key); - var action = Substitute.For(); + var action = Substitute.For(); action.Conditions.Returns(new []{ condition }); var runner = new SensorRunner(new IWorldSensor[] { matchedSensor, unMatchedSensor }, new ITargetSensor[] { }, new IMultiSensor[] { }, Substitute.For()); // Act - runner.SenseLocal(Substitute.For(), action); + runner.SenseLocal(Substitute.For(), action); // Assert matchedSensor.Received().Sense(Arg.Any(), Arg.Any(), Arg.Any()); diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs index a2c81813..5b001d48 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs @@ -11,9 +11,18 @@ public static class Extensions public static void CallAwake(this T behaviour) where T : MonoBehaviour { - typeof(T) - .GetMethod("Awake", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)! - .Invoke(behaviour, null); + var method = typeof(T) + .GetMethod("Awake", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); + + method.Invoke(behaviour, null); + } + + public static void CallAwake(this IMonoBehaviour behaviour) + { + if (behaviour is not MonoBehaviour monoBehaviour) + return; + + monoBehaviour.CallAwake(); } public static void CallStart(this T behaviour) @@ -40,7 +49,18 @@ public static void CallOnDisable(this T behaviour) .Invoke(behaviour, null); } - public static IAgentEvents MockEvents(this AgentBehaviour agent) + public static IGoapAgentEvents MockEvents(this IGoapAgent agent) + { + var events = Substitute.For(); + // Set Events property through reflection + typeof(GoapAgentBehaviour) + .GetField("k__BackingField", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)! + .SetValue(agent, events); + + return events; + } + + public static IAgentEvents MockEvents(this IAgent agent) { var events = Substitute.For(); // Set Events property through reflection @@ -51,7 +71,12 @@ public static IAgentEvents MockEvents(this AgentBehaviour agent) return events; } - public static void InsertAction(this AgentBehaviour agent, IAction action) + public static void InsertAction(this GoapAgentBehaviour agent, IAction action) + { + agent.Agent.InsertAction(action); + } + + public static void InsertAction(this IAgent agent, IAction action) { var actionState = new ActionState(); actionState.SetAction(action, action.GetData()); diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/WorldDataBaseTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/WorldDataBaseTests.cs index 956013e6..d5db5553 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/WorldDataBaseTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/WorldDataBaseTests.cs @@ -23,7 +23,7 @@ public void SetUp() public void GetTarget_ReturnsCorrectTarget() { // Arrange - var mockAction = Substitute.For(); + var mockAction = Substitute.For(); var mockTarget = Substitute.For(); mockAction.Config.Target.Returns(new TargetKey("example")); diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/com.crashkonijn.goap.tests.asmdef b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/com.crashkonijn.goap.tests.asmdef index 3ce2e03e..89b6eac0 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/com.crashkonijn.goap.tests.asmdef +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/com.crashkonijn.goap.tests.asmdef @@ -8,7 +8,9 @@ "BoundfoxStudios.FluentAssertions", "CrashKonijn.Goap.Resolver", "Unity.Mathematics", - "CrashKonijn.Goap.Core" + "CrashKonijn.Goap.Core", + "CrashKonijn.Agent.Core", + "CrashKonijn.Agent" ], "includePlatforms": [ "Editor" From 154aa511aac04d8cc90cfd408490e6f9aebc712e Mon Sep 17 00:00:00 2001 From: Peter Klooster Date: Fri, 28 Jun 2024 13:52:56 +0200 Subject: [PATCH 2/6] Fixed merge issues --- .../CrashKonijn.Agent/AgentBehaviour.cs | 3 +- .../Classes/Runners/AgentTypeJobRunner.cs | 2 +- .../UnitTests/AgentTypeJobRunnerTests.cs | 70 ++++++++++--------- 3 files changed, 40 insertions(+), 35 deletions(-) diff --git a/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs b/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs index 2f0443ca..02e557a2 100644 --- a/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs @@ -39,13 +39,14 @@ public class AgentBehaviour : MonoBehaviour, IMonoAgent public IAgentTimers Timers { get; } = new AgentTimers(); public ITarget CurrentTarget { get; private set; } + public Vector3 Position => this.transform.position; private ActionRunner actionRunner; private void Awake() { this.Initialize(); } - + public void Initialize() { this.Injector = new DataReferenceInjector(this); diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs index 9a25996a..52eb4e00 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs @@ -70,7 +70,7 @@ private void Run(IMonoGoapAgent agent) Handle = this.resolver.StartResolve(new RunData { StartIndex = new NativeArray(new []{ this.resolver.GetIndex(agent.CurrentGoal) }, Allocator.TempJob), - AgentPosition = agent.Position, + AgentPosition = agent.Agent.Position, IsEnabled = new NativeArray(this.enabledBuilder.Build(), Allocator.TempJob), IsExecutable = new NativeArray(this.executableBuilder.Build(), Allocator.TempJob), Positions = new NativeArray(this.positionBuilder.Build(), Allocator.TempJob), diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs index 372e8fc9..ec4a0e23 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs @@ -15,13 +15,17 @@ namespace CrashKonijn.Goap.UnitTests { public class AgentTypeJobRunnerTests { - private IMonoAgent agent; - + private IMonoGoapAgent goapAgent; + private IAgent agent; + [SetUp] public void Setup() { this.agent = Substitute.For(); this.agent.Position.Returns(Vector3.zero); + + this.goapAgent = Substitute.For(); + this.goapAgent.Agent.Returns(this.agent); } [Test] @@ -39,7 +43,7 @@ public void Run_UpdatesSensorRunner() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.agent }); + runner.Run(new HashSet() { this.goapAgent }); runner.Dispose(); // Assert @@ -83,7 +87,7 @@ public void Run_WithAtLeastOneAgent_SensesGlobalSensors() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.agent }); + runner.Run(new HashSet() { this.goapAgent }); runner.Dispose(); // Assert @@ -94,8 +98,8 @@ public void Run_WithAtLeastOneAgent_SensesGlobalSensors() public void Run_AgentHasNoCurrentGoal_DoesNotRun() { // Arrange - agent.CurrentGoal.ReturnsNull(); - agent.Agent.ActionState.Action.ReturnsNull(); + this.goapAgent.CurrentGoal.ReturnsNull(); + this.goapAgent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -113,7 +117,7 @@ public void Run_AgentHasNoCurrentGoal_DoesNotRun() runner.Dispose(); // Assert - sensorRunner.Received(0).SenseLocal(agent); + sensorRunner.Received(0).SenseLocal(this.goapAgent); resolver.Received(0).StartResolve(Arg.Any()); } @@ -124,8 +128,8 @@ public void Run_AgentHasCurrentGoalAndNoAction_Runs() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - agent.CurrentGoal.Returns(goal); - agent.Agent.ActionState.Action.ReturnsNull(); + this.goapAgent.CurrentGoal.Returns(goal); + this.goapAgent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -139,11 +143,11 @@ public void Run_AgentHasCurrentGoalAndNoAction_Runs() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { this.goapAgent }); runner.Dispose(); // Assert - sensorRunner.Received(1).SenseLocal(this.agent); + sensorRunner.Received(1).SenseLocal(this.goapAgent); resolver.Received(1).StartResolve(Arg.Any()); } @@ -154,8 +158,8 @@ public void Run_AgentHasCurrentGoalAndDoesHaveAction_Runs() var goal = Substitute.For(); goal.Conditions.Returns(new []{ Substitute.For() }); - this.agent.CurrentGoal.Returns(goal); - this.agent.Agent.ActionState.Action.Returns(Substitute.For()); + this.goapAgent.CurrentGoal.Returns(goal); + this.goapAgent.Agent.ActionState.Action.Returns(Substitute.For()); var sensorRunner = Substitute.For(); @@ -169,11 +173,11 @@ public void Run_AgentHasCurrentGoalAndDoesHaveAction_Runs() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { this.goapAgent }); runner.Dispose(); // Assert - sensorRunner.Received(1).SenseLocal(this.agent); + sensorRunner.Received(1).SenseLocal(this.goapAgent); resolver.Received(1).StartResolve(Arg.Any()); } @@ -184,8 +188,8 @@ public void Run_AgentHasCompletedGoal_CallsGoalCompleteEvent() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - this.agent.CurrentGoal.Returns(goal); - this.agent.Agent.ActionState.Action.ReturnsNull(); + this.goapAgent.CurrentGoal.Returns(goal); + this.goapAgent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -201,13 +205,13 @@ public void Run_AgentHasCompletedGoal_CallsGoalCompleteEvent() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { this.goapAgent }); runner.Dispose(); // Assert - sensorRunner.Received(1).SenseLocal(this.agent); + sensorRunner.Received(1).SenseLocal(this.goapAgent); resolver.Received(0).StartResolve(Arg.Any()); - this.agent.Events.Received(1).GoalCompleted(this.agent.CurrentGoal); + this.goapAgent.Events.Received(1).GoalCompleted(this.goapAgent.CurrentGoal); } [Test] @@ -217,8 +221,8 @@ public void Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - this.agent.CurrentGoal.Returns(goal); - this.agent.Agent.ActionState.Action.ReturnsNull(); + this.goapAgent.CurrentGoal.Returns(goal); + this.goapAgent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -234,13 +238,13 @@ public void Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { this.goapAgent }); runner.Dispose(); // Assert - sensorRunner.Received(1).SenseLocal(this.agent); + sensorRunner.Received(1).SenseLocal(this.goapAgent); resolver.Received(1).StartResolve(Arg.Any()); - this.agent.Events.Received(0).GoalCompleted(this.agent.CurrentGoal); + this.goapAgent.Events.Received(0).GoalCompleted(this.goapAgent.CurrentGoal); } [Test] @@ -252,8 +256,8 @@ public void Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent() var action = Substitute.For(); - agent.CurrentGoal.Returns(goal); - agent.Agent.ActionState.Action.ReturnsNull(); + this.goapAgent.CurrentGoal.Returns(goal); + this.goapAgent.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -271,11 +275,11 @@ public void Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { this.goapAgent }); runner.Complete(); // Assert - this.agent.Received(1).SetAction(action, Arg.Any(), Arg.Any()); + this.goapAgent.Received(1).SetAction(action, Arg.Any(), Arg.Any()); } [Test] @@ -287,8 +291,8 @@ public void Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet() var action = Substitute.For(); - agent.CurrentGoal.Returns(goal); - agent.Agent.ActionState.Action.Returns(action); + this.goapAgent.CurrentGoal.Returns(goal); + this.goapAgent.Agent.ActionState.Action.Returns(action); var sensorRunner = Substitute.For(); @@ -306,11 +310,11 @@ public void Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { agent }); + runner.Run(new HashSet() { this.goapAgent }); runner.Complete(); // Assert - agent.Received(0).SetAction(Arg.Any(), Arg.Any(), Arg.Any()); + this.goapAgent.Received(0).SetAction(Arg.Any(), Arg.Any(), Arg.Any()); } } } \ No newline at end of file From 58835928b049a0573419e0c7d34cd180c199fa1e Mon Sep 17 00:00:00 2001 From: Peter Klooster Date: Fri, 28 Jun 2024 18:03:17 +0200 Subject: [PATCH 3/6] Temp --- .../GOAP/Demos/Complex/Actions/EatAction.cs | 2 +- .../Demos/Complex/Actions/PickupItemAction.cs | 2 +- .../Complex/Behaviours/AgentSpawnBehaviour.cs | 2 +- .../Complex/Behaviours/ComplexAgentBrain.cs | 4 +- .../Behaviours/ComplexTextBehaviour.cs | 12 +- .../Demos/Complex/Prefabs/ComplexAgent.prefab | 13 +- .../Sensors/Target/ClosestItemSensor.cs | 4 +- .../Sensors/Target/ClosestObjectSensor.cs | 4 +- .../Sensors/Target/ClosestSourceSensor.cs | 4 +- .../Complex/Sensors/Target/TransformSensor.cs | 4 +- .../Sensors/Target/WanderTargetSensor.cs | 6 +- .../Complex/Sensors/World/IsHoldingSensor.cs | 2 +- .../Complex/Sensors/World/IsInWorldSensor.cs | 4 +- .../Shared/Sensors/Target/TransformSensor.cs | 4 +- .../Sensors/Target/WanderTargetSensor.cs | 6 +- .../Simple/Behaviours/SettingsBehaviour.cs | 2 +- .../Simple/Behaviours/SimpleAgentBrain.cs | 4 +- .../Simple/Behaviours/SimpleTextBehaviour.cs | 12 +- .../Simple/Goap/Actions/EatAppleAction.cs | 2 +- .../Simple/Goap/Actions/PickupAppleAction.cs | 2 +- .../Simple/Goap/Sensors/Multi/AppleSensor.cs | 4 +- .../Simple/Goap/Sensors/Target/AgentSensor.cs | 4 +- .../Goap/Sensors/Target/ClosestTreeSensor.cs | 4 +- .../Goap/Sensors/Target/WanderTargetSensor.cs | 6 +- .../Goap/Sensors/World/IsAliveSensor.cs | 2 +- .../Goap/Sensors/World/IsHungrySensor.cs | 2 +- .../GOAP/Demos/Simple/Prefabs/Agent.prefab | 3 +- .../Demos/Simple/Scenes/SimpleDemoScene.unity | 17 + Demo/CrashKonijn.Goap.csproj.DotSettings | 19 ++ Demo/UserSettings/EditorUserSettings.asset | 4 +- .../CrashKonijn.Goap.Editor/Extensions.cs | 2 +- .../GraphViewer/ConditionElement.cs | 4 +- .../GraphViewer/ConnectionElement.cs | 6 +- .../GraphViewer/GraphViewerEditorWindow.cs | 2 +- .../GraphViewer/NodeElement.cs | 2 +- .../TypeDrawers/AgentEditor.cs | 1 + ...tEditor.cs => GoapActionProviderEditor.cs} | 17 +- ....meta => GoapActionProviderEditor.cs.meta} | 0 .../Interfaces/IAction.cs | 8 +- .../Interfaces/IActionProvider.cs | 7 + .../Interfaces/IActionProvider.cs.meta | 3 + .../Interfaces/IActionReceiver.cs | 15 + .../Interfaces/IActionReceiver.cs.meta | 3 + .../Interfaces/IActionRequest.cs} | 2 +- .../Interfaces/IActionRequest.cs.meta | 3 + .../Interfaces/IAgent.cs | 12 +- .../Runtime/CrashKonijn.Agent/ActionBase.cs | 30 +- .../CrashKonijn.Agent/ActionProviderBase.cs | 10 + .../ActionProviderBase.cs.meta | 3 + .../CrashKonijn.Agent/AgentBehaviour.cs | 18 +- .../CrashKonijn.Goap.Core/Delegates.cs | 6 +- .../Interfaces/IAgentCollection.cs | 10 +- .../Interfaces/IAgentType.cs | 4 +- .../Interfaces/IAgentTypeEvents.cs | 20 +- .../Interfaces/IAgentTypeJobRunner.cs | 2 +- .../CrashKonijn.Goap.Core/Interfaces/IGoap.cs | 2 +- .../Interfaces/IGoapAgent.cs | 13 +- .../Interfaces/IGoapAgentEvents.cs | 2 +- .../Interfaces/IGoapEvents.cs | 20 +- .../Interfaces/IMonoGoapActionProvider.cs | 7 + ...s.meta => IMonoGoapActionProvider.cs.meta} | 0 .../Interfaces/IMultiSensor.cs | 4 +- .../Interfaces/ISensorRunner.cs | 4 +- .../Behaviours/AgentCollection.cs | 28 +- .../Behaviours/AgentTypeEvents.cs | 60 ++-- .../Behaviours/GoapActionBase.cs | 14 +- ...gentBehaviour.cs => GoapActionProvider.cs} | 27 +- ...our.cs.meta => GoapActionProvider.cs.meta} | 0 .../Behaviours/GoapAgentEvents.cs | 40 +-- .../Behaviours/GoapBehaviour.cs | 2 +- .../CrashKonijn.Goap/Behaviours/GoapEvents.cs | 40 +-- .../CrashKonijn.Goap/Classes/AgentType.cs | 8 +- .../Classes/Builders/TargetKeyBuilder.cs | 6 +- .../Classes/Controllers/ManualController.cs | 2 +- .../Controllers/ProactiveController.cs | 16 +- .../Classes/Controllers/ReactiveController.cs | 16 +- .../Classes/GoapAgentLogger.cs | 2 +- .../Classes/Runners/AgentTypeJobRunner.cs | 54 ++-- .../CrashKonijn.Goap/Classes/Runners/Goap.cs | 4 +- .../Classes/Runners/SensorRunner.cs | 10 +- .../Validators/ActionClassTypeValidator.cs | 2 +- .../Validators/ActionConditionKeyValidator.cs | 2 +- .../Validators/ActionEffectKeyValidator.cs | 2 +- .../Validators/ActionEffectsValidator.cs | 2 +- .../Validators/ActionTargetValidator.cs | 2 +- .../AgentTypeConfigValidatorRunner.cs | 2 +- .../Classes/Validators/Extensions.cs | 46 --- .../Classes/Validators/Extensions.cs.meta | 3 - .../Validators/GoalClassTypeValidator.cs | 2 +- .../Validators/GoalConditionKeyValidator.cs | 2 +- .../Validators/GoalConditionsValidator.cs | 2 +- .../Validators/TargetKeySensorsValidator.cs | 4 +- .../TargetSensorClassTypeValidator.cs | 2 +- .../Validators/TargetSensorKeyValidator.cs | 2 +- .../Classes/Validators/ValidationResults.cs | 2 +- .../Validators/WorldKeySensorsValidator.cs | 6 +- .../WorldSensorClassTypeValidator.cs | 2 +- .../Validators/WorldSensorKeyValidator.cs | 2 +- .../Runtime/CrashKonijn.Goap/Extensions.cs | 41 ++- .../Sensors/LocalTargetSensorBase.cs | 4 +- .../Sensors/LocalWorldSensorBase.cs | 4 +- .../Sensors/MultiSensorBase.cs | 14 +- .../UnitTests/AgentBehaviourTests.cs | 303 ++++++++---------- .../UnitTests/AgentTypeJobRunnerTests.cs | 74 ++--- .../UnitTests/Data/LocalTargetSensor.cs | 2 +- .../UnitTests/Data/LocalWorldSensor.cs | 2 +- .../UnitTests/ManualControllerTests.cs | 4 +- .../UnitTests/MultiSensorBaseTests.cs | 2 +- .../UnitTests/ProactiveControllerTests.cs | 24 +- .../UnitTests/ReactiveControllerTests.cs | 10 +- .../UnitTests/SensorRunnerTests.cs | 12 +- .../UnitTests/Support/Extensions.cs | 6 +- 112 files changed, 684 insertions(+), 636 deletions(-) create mode 100644 Demo/CrashKonijn.Goap.csproj.DotSettings rename Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/{GoapAgentEditor.cs => GoapActionProviderEditor.cs} (74%) rename Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/{GoapAgentEditor.cs.meta => GoapActionProviderEditor.cs.meta} (100%) create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs.meta rename Package/Runtime/{CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs => CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs} (51%) create mode 100644 Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs create mode 100644 Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs.meta create mode 100644 Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs rename Package/Runtime/CrashKonijn.Goap.Core/Interfaces/{IMonoGoapAgent.cs.meta => IMonoGoapActionProvider.cs.meta} (100%) rename Package/Runtime/CrashKonijn.Goap/Behaviours/{GoapAgentBehaviour.cs => GoapActionProvider.cs} (82%) rename Package/Runtime/CrashKonijn.Goap/Behaviours/{GoapAgentBehaviour.cs.meta => GoapActionProvider.cs.meta} (100%) delete mode 100644 Package/Runtime/CrashKonijn.Goap/Classes/Validators/Extensions.cs delete mode 100644 Package/Runtime/CrashKonijn.Goap/Classes/Validators/Extensions.cs.meta diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs index 2f95a462..105bf7ec 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs @@ -28,7 +28,7 @@ public override void Start(IMonoAgent agent, Data data) data.Inventory.Hold(data.Eatable); } - public override bool IsValid(IMonoAgent agent, Data data) + public override bool IsValid(IActionReceiver agent, Data data) { if (data.Eatable == null) return false; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs index bc4106be..1bc489df 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs @@ -51,7 +51,7 @@ public override void Start(IMonoAgent agent, Data data) data.Holdable = holdable; } - public override bool IsValid(IMonoAgent agent, Data data) + public override bool IsValid(IActionReceiver agent, Data data) { if (data.Holdable == null) return false; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs index b210ab66..793952b3 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs @@ -37,7 +37,7 @@ private void Start() private void SpawnAgent(string setId, ComplexAgentBrain.AgentType agentType, Color color) { - var agent = Instantiate(this.agentPrefab, this.GetRandomPosition(), Quaternion.identity).GetComponent(); + var agent = Instantiate(this.agentPrefab, this.GetRandomPosition(), Quaternion.identity).GetComponent(); agent.AgentType = this.goap.GetAgentType(setId); agent.gameObject.SetActive(true); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs index 16192a5e..531cc234 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs @@ -9,14 +9,14 @@ namespace CrashKonijn.Goap.Demos.Complex.Behaviours public class ComplexAgentBrain : MonoBehaviour { public AgentType agentType; - private GoapAgentBehaviour agent; + private GoapActionProvider agent; private ComplexHungerBehaviour complexHunger; private ItemCollection itemCollection; private ComplexInventoryBehaviour inventory; private void Awake() { - this.agent = this.GetComponent(); + this.agent = this.GetComponent(); this.complexHunger = this.GetComponent(); this.inventory = this.GetComponent(); this.itemCollection = FindObjectOfType(); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs index 5d6cb0d9..8c9f548e 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs @@ -8,14 +8,16 @@ namespace CrashKonijn.Goap.Demos.Complex.Behaviours public class ComplexTextBehaviour : MonoBehaviour { private TextMeshProUGUI text; - private GoapAgentBehaviour agent; + private GoapActionProvider actionProvider; private ComplexHungerBehaviour simpleComplexHunger; private ComplexAgentBrain brain; + private AgentBehaviour agent; private void Awake() { this.text = this.GetComponentInChildren(); - this.agent = this.GetComponent(); + this.actionProvider = this.GetComponent(); + this.agent = this.GetComponent(); this.simpleComplexHunger = this.GetComponent(); this.brain = this.GetComponent(); } @@ -27,13 +29,13 @@ private void Update() private string GetText() { - if (this.agent.CurrentGoal is null) + if (this.actionProvider.CurrentGoal is null) return $"{this.GetTypeText()}\nIdle"; - if (this.agent.Agent.ActionState.Action is null) + if (this.actionProvider.Agent.ActionState.Action is null) return $"{this.GetTypeText()}\nIdle"; - return $"{this.GetTypeText()}\n{this.agent.CurrentGoal.GetType().GetGenericTypeName()}\n{this.agent.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.Agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; + return $"{this.GetTypeText()}\n{this.actionProvider.CurrentGoal.GetType().GetGenericTypeName()}\n{this.actionProvider.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; } private string GetTypeText() diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab index d99a20c9..7823ce3f 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab @@ -53,7 +53,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 72344165e2cc41da93476bb1aa2cdd4b, type: 3} m_Name: m_EditorClassIdentifier: - agentTypeBehaviour: {fileID: 0} + k__BackingField: + k__BackingField: 1 + k__BackingField: 20 + k__BackingField: {fileID: 0} + k__BackingField: 1 --- !u!114 &3664022629467210336 MonoBehaviour: m_ObjectHideFlags: 0 @@ -66,9 +70,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1cef53d855ccf0b46bcf004b27c4a52a, type: 3} m_Name: m_EditorClassIdentifier: - k__BackingField: 1 - k__BackingField: 1 - k__BackingField: 20 + k__BackingField: {fileID: -5926512986792016431} + k__BackingField: + k__BackingField: 1 + k__BackingField: 20 --- !u!114 &2567974379695048867 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestItemSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestItemSensor.cs index 7219122d..279e1fed 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestItemSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestItemSensor.cs @@ -22,9 +22,9 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { - var closest = this.collection.GetFiltered(false, true, agent.gameObject).Cast().Closest(agent.transform.position); + var closest = this.collection.GetFiltered(false, true, agent.Transform.gameObject).Cast().Closest(agent.Transform.position); if (closest == null) return null; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestObjectSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestObjectSensor.cs index 4b2211cb..78403166 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestObjectSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestObjectSensor.cs @@ -19,9 +19,9 @@ public override void Update() this.items = Object.FindObjectsOfType(); } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { - var closest = this.items.Closest(agent.transform.position); + var closest = this.items.Closest(agent.Transform.position); if (closest == null) return null; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestSourceSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestSourceSensor.cs index 2a4e3b51..aff6ac23 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestSourceSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestSourceSensor.cs @@ -21,9 +21,9 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { - var closest = this.collection.Closest(agent.transform.position); + var closest = this.collection.Closest(agent.Transform.position); if (closest == null) return null; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/TransformSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/TransformSensor.cs index a7224adc..d9aaf8de 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/TransformSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/TransformSensor.cs @@ -14,9 +14,9 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { - return new TransformTarget(agent.transform); + return new TransformTarget(agent.Transform); } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/WanderTargetSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/WanderTargetSensor.cs index 51efc2ed..266e6591 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/WanderTargetSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/WanderTargetSensor.cs @@ -17,17 +17,17 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { var random = this.GetRandomPosition(agent); return new PositionTarget(random); } - private Vector3 GetRandomPosition(IMonoAgent agent) + private Vector3 GetRandomPosition(IActionReceiver agent) { var random = Random.insideUnitCircle * 5f; - var position = agent.transform.position + new Vector3(random.x, 0f, random.y); + var position = agent.Transform.position + new Vector3(random.x, 0f, random.y); if (position.x > -Bounds.x && position.x < Bounds.x && position.z > -Bounds.y && position.z < Bounds.y) return position; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsHoldingSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsHoldingSensor.cs index 8458c1c2..8e4e7d36 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsHoldingSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsHoldingSensor.cs @@ -17,7 +17,7 @@ public override void Update() { } - public override SenseValue Sense(IMonoAgent agent, IComponentReference references) + public override SenseValue Sense(IActionReceiver agent, IComponentReference references) { var inventory = references.GetCachedComponent(); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsInWorldSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsInWorldSensor.cs index a1efe9fe..9312e8ef 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsInWorldSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsInWorldSensor.cs @@ -20,9 +20,9 @@ public override void Update() { } - public override SenseValue Sense(IMonoAgent agent, IComponentReference references) + public override SenseValue Sense(IActionReceiver agent, IComponentReference references) { - return this.collection.GetFiltered(false, true, agent.gameObject).Length; + return this.collection.GetFiltered(false, true, agent.Transform.gameObject).Length; } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/TransformSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/TransformSensor.cs index 38aef446..60183708 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/TransformSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/TransformSensor.cs @@ -15,9 +15,9 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { - return new TransformTarget(agent.transform); + return new TransformTarget(agent.Transform); } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/WanderTargetSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/WanderTargetSensor.cs index a82f6577..59ff0fb9 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/WanderTargetSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/WanderTargetSensor.cs @@ -18,17 +18,17 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { var random = this.GetRandomPosition(agent); return new PositionTarget(random); } - private Vector3 GetRandomPosition(IMonoAgent agent) + private Vector3 GetRandomPosition(IActionReceiver agent) { var random = Random.insideUnitCircle * 5f; - var position = agent.transform.position + new Vector3(random.x, 0f, random.y); + var position = agent.Transform.position + new Vector3(random.x, 0f, random.y); if (position.x > -Bounds.x && position.x < Bounds.x && position.z > -Bounds.y && position.z < Bounds.y) return position; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs index b9fece7b..0d1f1a83 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs @@ -95,7 +95,7 @@ public void SpawnAgent() for (var i = 0; i < count; i++) { - var agent = Instantiate(this.agentPrefab, this.GetRandomPosition(), Quaternion.identity).GetComponent(); + var agent = Instantiate(this.agentPrefab, this.GetRandomPosition(), Quaternion.identity).GetComponent(); agent.AgentType = this.agentType.AgentType; this.SetDebug(agent.GetComponentInChildren(), this.debug); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs index 51b24fc8..7f14369a 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs @@ -6,12 +6,12 @@ namespace CrashKonijn.Goap.Demos.Simple.Behaviours { public class SimpleAgentBrain : MonoBehaviour { - private GoapAgentBehaviour agent; + private GoapActionProvider agent; private SimpleHungerBehaviour hunger; private void Awake() { - this.agent = this.GetComponent(); + this.agent = this.GetComponent(); this.hunger = this.GetComponent(); } diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs index d510c337..8f25b181 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs @@ -8,13 +8,15 @@ namespace CrashKonijn.Goap.Demos.Simple.Behaviours public class SimpleTextBehaviour : MonoBehaviour { private TextMeshProUGUI text; - private GoapAgentBehaviour agent; + private GoapActionProvider actionProvider; private SimpleHungerBehaviour simpleHunger; + private AgentBehaviour agent; private void Awake() { this.text = this.GetComponentInChildren(); - this.agent = this.GetComponent(); + this.actionProvider = this.GetComponent(); + this.agent = this.GetComponent(); this.simpleHunger = this.GetComponent(); } @@ -25,13 +27,13 @@ private void Update() private string GetText() { - if (this.agent.CurrentGoal is null) + if (this.actionProvider.CurrentGoal is null) return "Idle"; - if (this.agent.Agent.ActionState.Action is null) + if (this.actionProvider.Agent.ActionState.Action is null) return "Idle"; - return $"{this.agent.CurrentGoal.GetType().GetGenericTypeName()}\n{this.agent.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.Agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; + return $"{this.actionProvider.CurrentGoal.GetType().GetGenericTypeName()}\n{this.actionProvider.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs index 8c44cb69..17d8cc09 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs @@ -21,7 +21,7 @@ public override void Start(IMonoAgent agent, Data data) data.Apple = data.Inventory.Hold(); } - public override bool IsValid(IMonoAgent agent, Data data) + public override bool IsValid(IActionReceiver agent, Data data) { if (!base.IsValid(agent, data)) return false; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs index 26ab9778..42039b9c 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs @@ -29,7 +29,7 @@ public override void Start(IMonoAgent agent, Data data) data.Apple = transformTarget.Transform.GetComponent(); } - public override bool IsValid(IMonoAgent agent, Data data) + public override bool IsValid(IActionReceiver agent, Data data) { if (!base.IsValid(agent, data)) return false; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Multi/AppleSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Multi/AppleSensor.cs index 17da489a..9681a2df 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Multi/AppleSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Multi/AppleSensor.cs @@ -30,7 +30,7 @@ public AppleSensor() { this.AddLocalTargetSensor((agent, references) => { - var closestApple = this.apples.Get().Closest(agent.transform.position); + var closestApple = this.apples.Get().Closest(agent.Transform.position); if (closestApple is null) return null; @@ -40,7 +40,7 @@ public AppleSensor() this.AddLocalTargetSensor((agent, references) => { - return new TransformTarget(this.trees.Closest(agent.transform.position).transform); + return new TransformTarget(this.trees.Closest(agent.Transform.position).transform); }); this.AddLocalWorldSensor((agent, references) => diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/AgentSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/AgentSensor.cs index b92a7b89..99f9c711 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/AgentSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/AgentSensor.cs @@ -17,9 +17,9 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { - return new TransformTarget(agent.transform); + return new TransformTarget(agent.Transform); } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/ClosestTreeSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/ClosestTreeSensor.cs index 0af6f165..234171bd 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/ClosestTreeSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/ClosestTreeSensor.cs @@ -23,9 +23,9 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { - return new TransformTarget(this.trees.Closest(agent.transform.position).transform); + return new TransformTarget(this.trees.Closest(agent.Transform.position).transform); } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/WanderTargetSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/WanderTargetSensor.cs index e347f041..c48aae6d 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/WanderTargetSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/WanderTargetSensor.cs @@ -19,17 +19,17 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { var random = this.GetRandomPosition(agent); return new PositionTarget(random); } - private Vector3 GetRandomPosition(IMonoAgent agent) + private Vector3 GetRandomPosition(IActionReceiver agent) { var random = Random.insideUnitCircle * 5f; - var position = agent.transform.position + new Vector3(random.x, 0f, random.y); + var position = agent.Transform.position + new Vector3(random.x, 0f, random.y); if (position.x > -Bounds.x && position.x < Bounds.x && position.z > -Bounds.y && position.z < Bounds.y) return position; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsAliveSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsAliveSensor.cs index 1f0a927f..5b90da74 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsAliveSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsAliveSensor.cs @@ -16,7 +16,7 @@ public override void Update() { } - public override SenseValue Sense(IMonoAgent agent, IComponentReference references) + public override SenseValue Sense(IActionReceiver agent, IComponentReference references) { return true; } diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsHungrySensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsHungrySensor.cs index 24fbd4a7..a7a3aed4 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsHungrySensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsHungrySensor.cs @@ -17,7 +17,7 @@ public override void Update() { } - public override SenseValue Sense(IMonoAgent agent, IComponentReference references) + public override SenseValue Sense(IActionReceiver agent, IComponentReference references) { var hungerBehaviour = references.GetCachedComponent(); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab index 8eb203c7..bb8c0236 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab @@ -162,6 +162,7 @@ MonoBehaviour: k__BackingField: 1 k__BackingField: 20 k__BackingField: {fileID: 0} + k__BackingField: 1 --- !u!114 &7404671039891351144 MonoBehaviour: m_ObjectHideFlags: 0 @@ -174,10 +175,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1cef53d855ccf0b46bcf004b27c4a52a, type: 3} m_Name: m_EditorClassIdentifier: + k__BackingField: {fileID: -2073804781843839524} k__BackingField: k__BackingField: 1 k__BackingField: 20 - k__BackingField: 1 --- !u!114 &4823857909233374367 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity index 36f1dc92..79a36dd1 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Scenes/SimpleDemoScene.unity @@ -1448,6 +1448,11 @@ PrefabInstance: propertyPath: k__BackingField value: 1 objectReference: {fileID: 0} + - target: {fileID: 7404671039891351144, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + propertyPath: k__BackingField + value: + objectReference: {fileID: 817940822} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -1546,6 +1551,18 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: f2233afe6b5d3734dbb94bce7789238e, type: 3} +--- !u!114 &817940822 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: -2073804781843839524, guid: f2233afe6b5d3734dbb94bce7789238e, + type: 3} + m_PrefabInstance: {fileID: 676037569} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 72344165e2cc41da93476bb1aa2cdd4b, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &845821371 GameObject: m_ObjectHideFlags: 0 diff --git a/Demo/CrashKonijn.Goap.csproj.DotSettings b/Demo/CrashKonijn.Goap.csproj.DotSettings new file mode 100644 index 00000000..fde50bcb --- /dev/null +++ b/Demo/CrashKonijn.Goap.csproj.DotSettings @@ -0,0 +1,19 @@ + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True \ No newline at end of file diff --git a/Demo/UserSettings/EditorUserSettings.asset b/Demo/UserSettings/EditorUserSettings.asset index 97ad5c31..5cd84e84 100644 --- a/Demo/UserSettings/EditorUserSettings.asset +++ b/Demo/UserSettings/EditorUserSettings.asset @@ -9,10 +9,10 @@ EditorUserSettings: value: 02040505000d5d5d090b5c7740705b441516402c757b2261787b1e37bab6656e flags: 0 RecentlyUsedSceneGuid-1: - value: 50540d56560408025856082143210944124f402b2d2d7062757f4f66b5e5326d + value: 5a08575f5207595a0f5d59741173094444164f7d7d2a23317c7a4465bbe1646d flags: 0 RecentlyUsedSceneGuid-2: - value: 5a08575f5207595a0f5d59741173094444164f7d7d2a23317c7a4465bbe1646d + value: 50540d56560408025856082143210944124f402b2d2d7062757f4f66b5e5326d flags: 0 vcSharedLogLevel: value: 0d5e400f0650 diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs b/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs index 794dc09b..557789ea 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs @@ -16,7 +16,7 @@ public static T Add(this VisualElement parent, T child, Action callback) w return child; } - public static float GetCost(this INode node, IMonoAgent agent) + public static float GetCost(this INode node, IActionReceiver agent) { if (node.Action is IAction action) { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs index 4174cfc0..bea476f3 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs @@ -48,7 +48,7 @@ private Color GetCircleColor(INodeCondition condition) private Color GetLiveColor() { - if (this.values.SelectedObject is not IMonoGoapAgent agent) + if (this.values.SelectedObject is not IMonoGoapActionProvider agent) return Color.white; if (agent.AgentType == null) @@ -72,7 +72,7 @@ private string GetSuffix(ICondition condition) if (!Application.isPlaying) return ""; - if (this.values.SelectedObject is not IMonoGoapAgent agent) + if (this.values.SelectedObject is not IMonoGoapActionProvider agent) return ""; var (exists, value) = agent.WorldData.GetWorldValue(condition.WorldKey); diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs index 7d214d51..7db59bac 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs @@ -75,7 +75,7 @@ private Color GetColor() if (this.values.SelectedObject == null) return Color.black; - if (this.values.SelectedObject is not IMonoGoapAgent agent) + if (this.values.SelectedObject is not IMonoGoapActionProvider agent) return Color.black; var actions = agent.CurrentPlan; @@ -88,7 +88,7 @@ private Color GetColor() private string GetCost() { - if (this.values.SelectedObject is not IMonoGoapAgent agent) + if (this.values.SelectedObject is not IMonoGoapActionProvider agent) return ""; if (!Application.isPlaying) @@ -107,7 +107,7 @@ private string GetCost() return ""; var distance = Vector3.Distance(startVector.Position, endVector.Position); - var cost = agent.Agent.DistanceMultiplier * distance; + var cost = agent.DistanceMultiplier * distance; return cost.ToString("F2"); } diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs index 28a3948a..7cec57e0 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs @@ -82,7 +82,7 @@ private void OnSelectionChange() return; } - var agent = gameObject.GetComponent(); + var agent = gameObject.GetComponent(); if (agent != null) { var agentType = agent.AgentType ?? new AgentTypeFactory(GoapConfig.Default).Create(agent.AgentTypeBehaviour.Config.Create(), false); diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs index 187befac..bfec7f47 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs @@ -99,7 +99,7 @@ public NodeElement(INode graphNode, VisualElement bezierRoot, EditorWindowValues if (!Application.isPlaying) return; - if (values.SelectedObject is not IMonoGoapAgent agent) + if (values.SelectedObject is not IMonoGoapActionProvider agent) return; if (agent.CurrentGoal == this.GraphNode.Action) diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs index 33d53b17..4644b89d 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs @@ -19,6 +19,7 @@ public override VisualElement CreateInspectorGUI() root.styleSheets.Add(AssetDatabase.LoadAssetAtPath($"{GoapEditorSettings.BasePath}/Styles/Generic.uss")); // root.Add(new PropertyField(this.serializedObject.FindProperty("agentTypeBehaviour"))); + root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs similarity index 74% rename from Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs rename to Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs index 80a646c4..f4600ab2 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs @@ -9,8 +9,8 @@ namespace CrashKonijn.Goap.Editor.TypeDrawers { - [CustomEditor(typeof(GoapAgentBehaviour))] - public class GoapAgentEditor : UnityEditor.Editor + [CustomEditor(typeof(GoapActionProvider))] + public class GoapActionProviderEditor : UnityEditor.Editor { public override VisualElement CreateInspectorGUI() { @@ -24,7 +24,7 @@ public override VisualElement CreateInspectorGUI() if (!Application.isPlaying) return root; - var agent = (GoapAgentBehaviour) this.target; + var agent = (GoapActionProvider) this.target; var currentGoal = agent.CurrentGoal; @@ -32,7 +32,7 @@ public override VisualElement CreateInspectorGUI() { card.Add(new Label(), (label) => { - label.text = "Goal: " + currentGoal?.GetType().GetGenericTypeName(); + label.text = this.GetText(agent); label.schedule.Execute(() => { @@ -40,7 +40,7 @@ public override VisualElement CreateInspectorGUI() return; currentGoal = agent.CurrentGoal; - label.text = "Goal: " + currentGoal?.GetType().GetGenericTypeName(); + label.text = this.GetText(agent); }).Every(33); }); })); @@ -51,5 +51,12 @@ public override VisualElement CreateInspectorGUI() return root; } + + private string GetText(GoapActionProvider provider) + { + return $@"Goal: {provider.CurrentGoal?.GetType().GetGenericTypeName()} +AgentType: {provider.AgentType.Id} +Receiver: {provider.Agent?.GetType().GetGenericTypeName()}"; + } } } \ No newline at end of file diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs.meta b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs.meta similarity index 100% rename from Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapAgentEditor.cs.meta rename to Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs index 7dfe4674..d1ea0935 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs @@ -5,7 +5,7 @@ namespace CrashKonijn.Goap.Core.Interfaces { public interface IAction { - float GetCost(IMonoAgent agent, IComponentReference references); + float GetCost(IActionReceiver agent, IComponentReference references); ActionMoveMode GetMoveMode(IMonoAgent agent); bool IsInRange(IMonoAgent agent, float distance, IActionData data, IComponentReference references); IActionData GetData(); @@ -17,7 +17,7 @@ public interface IAction /// /// Check if the action is valid /// - bool IsValid(IMonoAgent agent, IActionData data); + bool IsValid(IActionReceiver agent, IActionData data); /// /// Called when the action is started/assigned to an agent @@ -43,7 +43,7 @@ public interface IAction /// Called when the action is completed /// void Complete(IMonoAgent agent, IActionData data); - bool IsExecutable(IMonoAgent agent, bool conditionsMet); - bool IsEnabled(IMonoAgent agent); + bool IsExecutable(IActionReceiver agent, bool conditionsMet); + bool IsEnabled(IActionReceiver agent); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs new file mode 100644 index 00000000..88b180cb --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs @@ -0,0 +1,7 @@ +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface IActionProvider + { + void ResolveAction(); + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs.meta new file mode 100644 index 00000000..a02d3334 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 448af65a23e5451da94763bfdfa49efe +timeCreated: 1719578891 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs new file mode 100644 index 00000000..5d3735ce --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface IActionReceiver + { + IDataReferenceInjector Injector { get; } + IActionState ActionState { get; } + IAgentTimers Timers { get; } + ILogger Logger { get; } + Transform Transform { get; } + void SetAction(IActionResolver actionResolver, IAction action, ITarget target); + void StopAction(bool resolveAction = true); + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs.meta new file mode 100644 index 00000000..e0c60371 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 161a3b9e5bef4978afb6e62a9dc348cc +timeCreated: 1719575680 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs similarity index 51% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs rename to Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs index 709d00ed..14651500 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs @@ -1,6 +1,6 @@ namespace CrashKonijn.Goap.Core.Interfaces { - public interface IMonoGoapAgent : IGoapAgent, IMonoBehaviour + public interface IActionRequest { } diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs.meta new file mode 100644 index 00000000..8a2a6680 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 217e921da6d14eab981e1c9714cf2703 +timeCreated: 1719576019 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs index 395805f2..ffc1d3df 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs @@ -5,9 +5,8 @@ namespace CrashKonijn.Goap.Core.Interfaces { - public interface IAgent + public interface IAgent : IActionReceiver { - float DistanceMultiplier { get; } List DisabledActions { get; } AgentState State { get; } AgentMoveState MoveState { get; } @@ -17,24 +16,17 @@ public interface IAgent IActionData CurrentActionData { get; } [Obsolete("Use ActionState.RunState instead.")] IActionRunState RunState { get; } - IActionState ActionState { get; } IAgentEvents Events { get; } - IDataReferenceInjector Injector { get; } + IAgentDistanceObserver DistanceObserver { get; } - IAgentTimers Timers { get; } ITarget CurrentTarget { get; } - ILogger Logger { get; } IActionResolver ActionResolver { get; set; } - Vector3 Position { get; } void Initialize(); void Run(); - void SetAction(IActionResolver actionResolver, IAction action, ITarget target); - void StopAction(bool resolveAction = true); void CompleteAction(bool resolveAction = true); void ResolveAction(); - void SetDistanceMultiplierSpeed(float speed); void EnableAction() where TAction : IAction; void DisableAction() where TAction : IAction; } diff --git a/Package/Runtime/CrashKonijn.Agent/ActionBase.cs b/Package/Runtime/CrashKonijn.Agent/ActionBase.cs index 6c2ad545..9adee5cb 100644 --- a/Package/Runtime/CrashKonijn.Agent/ActionBase.cs +++ b/Package/Runtime/CrashKonijn.Agent/ActionBase.cs @@ -35,19 +35,22 @@ public virtual TActionData CreateData() public abstract void Start(IMonoAgent agent, TActionData data); - public virtual bool IsValid(IMonoAgent agent, TActionData data) + public virtual bool IsValid(IActionReceiver agent, TActionData data) { return true; } - public bool IsEnabled(IMonoAgent agent) + public bool IsEnabled(IActionReceiver agent) { return this.IsEnabled(agent, agent.Injector); } - public virtual bool IsEnabled(IMonoAgent agent, IComponentReference references) + public virtual bool IsEnabled(IActionReceiver receiver, IComponentReference references) { - return !agent.DisabledActions.Contains(this.GetType()); + if (receiver is IMonoAgent agent) + return !agent.DisabledActions.Contains(this.GetType()); + + return true; } public void BeforePerform(IMonoAgent agent, IActionData data) => this.BeforePerform(agent, (TActionData) data); @@ -75,23 +78,4 @@ public void Complete(IMonoAgent agent, IActionData data) public virtual void Complete(IMonoAgent agent, TActionData data) {} } - - public abstract class ActionBase : IAction - { - public abstract float GetCost(IMonoAgent agent, IComponentReference references); - public abstract ActionMoveMode GetMoveMode(IMonoAgent agent); - public abstract float GetInRange(IMonoAgent agent, IActionData data); - public abstract bool IsInRange(IMonoAgent agent, float distance, IActionData data, IComponentReference references); - public abstract IActionData GetData(); - public abstract void Created(); - public abstract bool IsValid(IMonoAgent agent, IActionData data); - - public abstract void Start(IMonoAgent agent, IActionData data); - public abstract void BeforePerform(IMonoAgent agent, IActionData data); - public abstract IActionRunState Perform(IMonoAgent agent, IActionData data, IActionContext context); - public abstract void Stop(IMonoAgent agent, IActionData data); - public abstract void Complete(IMonoAgent agent, IActionData data); - public abstract bool IsExecutable(IMonoAgent agent, bool conditionsMet); - public abstract bool IsEnabled(IMonoAgent agent); - } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs b/Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs new file mode 100644 index 00000000..4d52f592 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs @@ -0,0 +1,10 @@ +using CrashKonijn.Goap.Core.Interfaces; +using UnityEngine; + +namespace CrashKonijn.Agent +{ + public abstract class ActionProviderBase : MonoBehaviour, IActionProvider + { + public abstract void ResolveAction(); + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs.meta b/Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs.meta new file mode 100644 index 00000000..521ce081 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e1d3add3cf004edd8d027f0e23033ea9 +timeCreated: 1719578877 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs b/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs index 02e557a2..bdd49917 100644 --- a/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs @@ -14,10 +14,11 @@ namespace CrashKonijn.Goap.Behaviours public class AgentBehaviour : MonoBehaviour, IMonoAgent { [field: SerializeField] - public LoggerConfig LoggerConfig { get; set; } = new LoggerConfig(); + public ActionProviderBase ActionProvider { get; set; } [field: SerializeField] - public float DistanceMultiplier { get; set; } = 1f; + public LoggerConfig LoggerConfig { get; set; } = new LoggerConfig(); + public AgentState State { get; private set; } = AgentState.NoAction; public AgentMoveState MoveState { get; private set; } = AgentMoveState.Idle; public List DisabledActions { get; } = new (); @@ -39,7 +40,9 @@ public class AgentBehaviour : MonoBehaviour, IMonoAgent public IAgentTimers Timers { get; } = new AgentTimers(); public ITarget CurrentTarget { get; private set; } - public Vector3 Position => this.transform.position; + + public Transform Transform => this.transform; + private ActionRunner actionRunner; private void Awake() @@ -54,6 +57,11 @@ public void Initialize() this.Logger.Initialize(this.LoggerConfig, this); } + private void Update() + { + this.Run(); + } + public void Run() { if (this.ActionState.Action == null) @@ -176,10 +184,6 @@ private void ResetAction() this.MoveState = AgentMoveState.Idle; } - public void SetDistanceMultiplierSpeed(float speed) - { - this.DistanceMultiplier = 1f / speed; - } public void EnableAction() where TAction : IAction diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs b/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs index c180c5d3..1d3eda58 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs @@ -3,9 +3,9 @@ namespace CrashKonijn.Goap.Core { public delegate void GoalDelegate(IGoal goal); - public delegate void AgentGoalDelegate(IMonoGoapAgent agent, IGoal goal); + public delegate void AgentGoalDelegate(IMonoGoapActionProvider actionProvider, IGoal goal); public delegate void AgentTypeDelegate(IAgentType agentType); - public delegate void GoapAgentDelegate(IMonoGoapAgent agent); + public delegate void GoapAgentDelegate(IMonoGoapActionProvider actionProvider); public delegate void GoapActionDelegate(IGoapAction action); - public delegate void GoapAgentActionDelegate(IMonoGoapAgent agent, IGoapAction action); + public delegate void GoapAgentActionDelegate(IMonoGoapActionProvider actionProvider, IGoapAction action); } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs index 17c1ed07..a43fb6e2 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs @@ -4,11 +4,11 @@ namespace CrashKonijn.Goap.Core.Interfaces { public interface IAgentCollection { - HashSet All(); - void Add(IMonoGoapAgent agent); - void Remove(IMonoGoapAgent agent); - void Enqueue(IMonoGoapAgent agent); - IMonoGoapAgent[] GetQueue(); + HashSet All(); + void Add(IMonoGoapActionProvider actionProvider); + void Remove(IMonoGoapActionProvider actionProvider); + void Enqueue(IMonoGoapActionProvider actionProvider); + IMonoGoapActionProvider[] GetQueue(); int GetQueueCount(); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs index a8c53ff0..e75d44db 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs @@ -10,8 +10,8 @@ public interface IAgentType ISensorRunner SensorRunner { get; } IAgentTypeEvents Events { get; } IGlobalWorldData WorldData { get; } - void Register(IMonoGoapAgent agent); - void Unregister(IMonoGoapAgent agent); + void Register(IMonoGoapActionProvider actionProvider); + void Unregister(IMonoGoapActionProvider actionProvider); List GetAllNodes(); List GetActions(); List GetGoals(); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs index 246dca0e..18ec7e2c 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs @@ -6,35 +6,35 @@ public interface IAgentTypeEvents // Actions event GoapAgentActionDelegate OnActionStart; - void ActionStart(IMonoGoapAgent agent, IGoapAction action); + void ActionStart(IMonoGoapActionProvider actionProvider, IGoapAction action); event GoapAgentActionDelegate OnActionEnd; - void ActionEnd(IMonoGoapAgent agent, IGoapAction action); + void ActionEnd(IMonoGoapActionProvider actionProvider, IGoapAction action); event GoapAgentActionDelegate OnActionStop; - void ActionStop(IMonoGoapAgent agent, IGoapAction action); + void ActionStop(IMonoGoapActionProvider actionProvider, IGoapAction action); event GoapAgentActionDelegate OnActionComplete; - void ActionComplete(IMonoGoapAgent agent, IGoapAction action); + void ActionComplete(IMonoGoapActionProvider actionProvider, IGoapAction action); event AgentGoalDelegate OnNoActionFound; - void NoActionFound(IMonoGoapAgent agent, IGoal goal); + void NoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal); // Goals event AgentGoalDelegate OnGoalStart; - void GoalStart(IMonoGoapAgent agent, IGoal goal); + void GoalStart(IMonoGoapActionProvider actionProvider, IGoal goal); event AgentGoalDelegate OnGoalCompleted; - void GoalCompleted(IMonoGoapAgent agent, IGoal goal); + void GoalCompleted(IMonoGoapActionProvider actionProvider, IGoal goal); // General event GoapAgentDelegate OnAgentResolve; - void AgentResolve(IMonoGoapAgent agent); + void AgentResolve(IMonoGoapActionProvider actionProvider); event GoapAgentDelegate OnAgentRegistered; - void AgentRegistered(IMonoGoapAgent agent); + void AgentRegistered(IMonoGoapActionProvider actionProvider); event GoapAgentDelegate OnAgentUnregistered; - void AgentUnregistered(IMonoGoapAgent agent); + void AgentUnregistered(IMonoGoapActionProvider actionProvider); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs index 8a93c1a1..f3426cd6 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs @@ -4,7 +4,7 @@ namespace CrashKonijn.Goap.Core.Interfaces { public interface IAgentTypeJobRunner { - void Run(HashSet queue); + void Run(HashSet queue); void Complete(); void Dispose(); IGraph GetGraph(); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs index 332f1145..6bf06de3 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs @@ -10,7 +10,7 @@ public interface IGoap void Register(IAgentType agentType); IGraph GetGraph(IAgentType agentType); bool Knows(IAgentType agentType); - List Agents { get; } + List Agents { get; } IAgentType[] AgentTypes { get; } diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs index 885c4419..355e8b7b 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs @@ -1,18 +1,23 @@ -namespace CrashKonijn.Goap.Core.Interfaces +using UnityEngine; + +namespace CrashKonijn.Goap.Core.Interfaces { public interface IGoapAgent : IActionResolver { - IMonoAgent Agent { get; } + float DistanceMultiplier { get; } + IActionReceiver Agent { get; } IAgentType AgentType { get; } IGoal CurrentGoal { get; } ILocalWorldData WorldData { get; } IConnectable[] CurrentPlan { get; } IGoapAgentEvents Events { get; } - ILogger Logger { get; } + ILogger Logger { get; } + Vector3 Position { get; } void SetGoal(bool endAction) where TGoal : IGoal; void SetGoal(IGoal goal, bool endAction); - void SetAction(IGoapAction action, IConnectable[] path, ITarget target); + void SetAction(IGoapAction action, IConnectable[] path); void ClearGoal(); void StopAction(bool resolveAction = true); + void SetDistanceMultiplierSpeed(float speed); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs index e7ee031f..7b07c11c 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs @@ -2,7 +2,7 @@ { public interface IGoapAgentEvents { - void Bind(IMonoGoapAgent agent, IAgentTypeEvents events); + void Bind(IMonoGoapActionProvider actionProvider, IAgentTypeEvents events); void Unbind(); event GoalDelegate OnNoActionFound; void NoActionFound(IGoal goal); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs index 8e39267b..13d413c2 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs @@ -4,36 +4,36 @@ public interface IGoapEvents { // Actions event GoapAgentActionDelegate OnActionStart; - void ActionStart(IMonoGoapAgent agent, IGoapAction action); + void ActionStart(IMonoGoapActionProvider actionProvider, IGoapAction action); event GoapAgentActionDelegate OnActionEnd; - void ActionEnd(IMonoGoapAgent agent, IGoapAction action); + void ActionEnd(IMonoGoapActionProvider actionProvider, IGoapAction action); event GoapAgentActionDelegate OnActionStop; - void ActionStop(IMonoGoapAgent agent, IGoapAction action); + void ActionStop(IMonoGoapActionProvider actionProvider, IGoapAction action); event GoapAgentActionDelegate OnActionComplete; - void ActionComplete(IMonoGoapAgent agent, IGoapAction action); + void ActionComplete(IMonoGoapActionProvider actionProvider, IGoapAction action); event AgentGoalDelegate OnNoActionFound; - void NoActionFound(IMonoGoapAgent agent, IGoal goal); + void NoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal); // Goals event AgentGoalDelegate OnGoalStart; - void GoalStart(IMonoGoapAgent agent, IGoal goal); + void GoalStart(IMonoGoapActionProvider actionProvider, IGoal goal); event AgentGoalDelegate OnGoalCompleted; - void GoalCompleted(IMonoGoapAgent agent, IGoal goal); + void GoalCompleted(IMonoGoapActionProvider actionProvider, IGoal goal); // General event GoapAgentDelegate OnAgentResolve; - void AgentResolve(IMonoGoapAgent agent); + void AgentResolve(IMonoGoapActionProvider actionProvider); event GoapAgentDelegate OnAgentRegistered; - void AgentRegistered(IMonoGoapAgent agent); + void AgentRegistered(IMonoGoapActionProvider actionProvider); event GoapAgentDelegate OnAgentUnregistered; - void AgentUnregistered(IMonoGoapAgent agent); + void AgentUnregistered(IMonoGoapActionProvider actionProvider); // Agent Types event AgentTypeDelegate OnAgentTypeRegistered; diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs new file mode 100644 index 00000000..40cbdf82 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs @@ -0,0 +1,7 @@ +namespace CrashKonijn.Goap.Core.Interfaces +{ + public interface IMonoGoapActionProvider : IGoapAgent, IMonoBehaviour + { + + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs.meta b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapAgent.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensor.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensor.cs index b98753ba..a451f875 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensor.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensor.cs @@ -6,7 +6,7 @@ public interface IMultiSensor : IHasConfig, ILocalSensor, IG { string[] GetSensors(); void Sense(IWorldData data, Type[] keys); - void Sense(IWorldData data, IMonoAgent agent, IComponentReference references, Type[] keys); + void Sense(IWorldData data, IActionReceiver agent, IComponentReference references, Type[] keys); } public interface ISensor @@ -18,7 +18,7 @@ public interface ISensor public interface ILocalSensor : ISensor { public void Update(); - public void Sense(IWorldData data, IMonoAgent agent, IComponentReference references); + public void Sense(IWorldData data, IActionReceiver agent, IComponentReference references); } public interface IGlobalSensor : ISensor diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs index 375c04f4..df306f67 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs @@ -6,7 +6,7 @@ public interface ISensorRunner void Update(IGoapAction action); void SenseGlobal(); void SenseGlobal(IGoapAction action); - void SenseLocal(IMonoGoapAgent agent); - void SenseLocal(IMonoGoapAgent agent, IGoapAction action); + void SenseLocal(IMonoGoapActionProvider actionProvider); + void SenseLocal(IMonoGoapActionProvider actionProvider, IGoapAction action); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs index c0f7d160..cc35d5f8 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs @@ -8,42 +8,42 @@ namespace CrashKonijn.Goap.Behaviours public class AgentCollection : IAgentCollection { private readonly IAgentType agentType; - private HashSet agents = new(); - private HashSet queue = new HashSet(); + private HashSet agents = new(); + private HashSet queue = new HashSet(); public AgentCollection(IAgentType agentType) { this.agentType = agentType; } - public HashSet All() => this.agents; + public HashSet All() => this.agents; - public void Add(IMonoGoapAgent agent) + public void Add(IMonoGoapActionProvider actionProvider) { - if (this.agents.Contains(agent)) + if (this.agents.Contains(actionProvider)) return; - this.agents.Add(agent ); - this.agentType.Events.AgentRegistered(agent); + this.agents.Add(actionProvider ); + this.agentType.Events.AgentRegistered(actionProvider); } - public void Remove(IMonoGoapAgent agent) + public void Remove(IMonoGoapActionProvider actionProvider) { - if (!this.agents.Contains(agent)) + if (!this.agents.Contains(actionProvider)) return; - this.agents.Remove(agent); - this.agentType.Events.AgentUnregistered(agent); + this.agents.Remove(actionProvider); + this.agentType.Events.AgentUnregistered(actionProvider); } - public void Enqueue(IMonoGoapAgent agent) + public void Enqueue(IMonoGoapActionProvider actionProvider) { - this.queue.Add(agent); + this.queue.Add(actionProvider); } public int GetQueueCount() => this.queue.Count; - public IMonoGoapAgent[] GetQueue() + public IMonoGoapActionProvider[] GetQueue() { var data = this.queue.ToArray(); diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs index 541c82e1..bf85dbbd 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs @@ -14,73 +14,73 @@ public void Bind(IGoapEvents events) } public event GoapAgentActionDelegate OnActionStart; - public void ActionStart(IMonoGoapAgent agent, IGoapAction action) + public void ActionStart(IMonoGoapActionProvider actionProvider, IGoapAction action) { - this.OnActionStart?.Invoke(agent, action); - this.goapEvents?.ActionStart(agent, action); + this.OnActionStart?.Invoke(actionProvider, action); + this.goapEvents?.ActionStart(actionProvider, action); } public event GoapAgentActionDelegate OnActionEnd; - public void ActionEnd(IMonoGoapAgent agent, IGoapAction action) + public void ActionEnd(IMonoGoapActionProvider actionProvider, IGoapAction action) { - this.OnActionEnd?.Invoke(agent, action); - this.goapEvents?.ActionEnd(agent, action); + this.OnActionEnd?.Invoke(actionProvider, action); + this.goapEvents?.ActionEnd(actionProvider, action); } public event GoapAgentActionDelegate OnActionStop; - public void ActionStop(IMonoGoapAgent agent, IGoapAction action) + public void ActionStop(IMonoGoapActionProvider actionProvider, IGoapAction action) { - this.OnActionStop?.Invoke(agent, action); - this.goapEvents?.ActionStop(agent, action); + this.OnActionStop?.Invoke(actionProvider, action); + this.goapEvents?.ActionStop(actionProvider, action); } public event GoapAgentActionDelegate OnActionComplete; - public void ActionComplete(IMonoGoapAgent agent, IGoapAction action) + public void ActionComplete(IMonoGoapActionProvider actionProvider, IGoapAction action) { - this.OnActionComplete?.Invoke(agent, action); - this.goapEvents?.ActionComplete(agent, action); + this.OnActionComplete?.Invoke(actionProvider, action); + this.goapEvents?.ActionComplete(actionProvider, action); } public event AgentGoalDelegate OnNoActionFound; - public void NoActionFound(IMonoGoapAgent agent, IGoal goal) + public void NoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal) { - this.OnNoActionFound?.Invoke(agent, goal); - this.goapEvents?.NoActionFound(agent, goal); + this.OnNoActionFound?.Invoke(actionProvider, goal); + this.goapEvents?.NoActionFound(actionProvider, goal); } public event AgentGoalDelegate OnGoalStart; - public void GoalStart(IMonoGoapAgent agent, IGoal goal) + public void GoalStart(IMonoGoapActionProvider actionProvider, IGoal goal) { - this.OnGoalStart?.Invoke(agent, goal); - this.goapEvents?.GoalStart(agent, goal); + this.OnGoalStart?.Invoke(actionProvider, goal); + this.goapEvents?.GoalStart(actionProvider, goal); } public event AgentGoalDelegate OnGoalCompleted; - public void GoalCompleted(IMonoGoapAgent agent, IGoal goal) + public void GoalCompleted(IMonoGoapActionProvider actionProvider, IGoal goal) { - this.OnGoalCompleted?.Invoke(agent, goal); - this.goapEvents?.GoalCompleted(agent, goal); + this.OnGoalCompleted?.Invoke(actionProvider, goal); + this.goapEvents?.GoalCompleted(actionProvider, goal); } public event GoapAgentDelegate OnAgentResolve; - public void AgentResolve(IMonoGoapAgent agent) + public void AgentResolve(IMonoGoapActionProvider actionProvider) { - this.OnAgentResolve?.Invoke(agent); - this.goapEvents?.AgentResolve(agent); + this.OnAgentResolve?.Invoke(actionProvider); + this.goapEvents?.AgentResolve(actionProvider); } public event GoapAgentDelegate OnAgentRegistered; - public void AgentRegistered(IMonoGoapAgent agent) + public void AgentRegistered(IMonoGoapActionProvider actionProvider) { - this.OnAgentRegistered?.Invoke(agent); - this.goapEvents?.AgentRegistered(agent); + this.OnAgentRegistered?.Invoke(actionProvider); + this.goapEvents?.AgentRegistered(actionProvider); } public event GoapAgentDelegate OnAgentUnregistered; - public void AgentUnregistered(IMonoGoapAgent agent) + public void AgentUnregistered(IMonoGoapActionProvider actionProvider) { - this.OnAgentUnregistered?.Invoke(agent); - this.goapEvents?.AgentUnregistered(agent); + this.OnAgentUnregistered?.Invoke(actionProvider); + this.goapEvents?.AgentUnregistered(actionProvider); } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs index 400ff1f2..7747f699 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs @@ -28,7 +28,7 @@ public void SetConfig(IActionConfig config) this.Config = config; } - public virtual float GetCost(IMonoAgent agent, IComponentReference references) + public virtual float GetCost(IActionReceiver agent, IComponentReference references) { return this.Config.BaseCost; } @@ -45,31 +45,31 @@ public virtual bool IsInRange(IMonoAgent agent, float distance, IActionData data public abstract void Created(); - public bool IsValid(IMonoAgent agent, IActionData data) + public bool IsValid(IActionReceiver agent, IActionData data) { - var goapAgent = agent.Injector.GetCachedComponent(); + var goapAgent = agent.Injector.GetCachedComponent(); if (goapAgent == null) return false; if (!goapAgent.AgentType.AllConditionsMet(goapAgent, this)) { - agent.Logger.Warning($"Conditions not met for {agent.name}: {this.Config.Name}"); + agent.Logger.Warning($"Conditions not met: {this.Config.Name}"); return false; } if (this.Config.RequiresTarget && goapAgent.WorldData.GetTarget(this) == null) { - agent.Logger.Warning($"No target found for {agent.name}: {this.Config.Name}"); + agent.Logger.Warning($"No target found for: {this.Config.Name}"); return false; } return base.IsValid(agent, (TActionData) data); } - public bool IsExecutable(IMonoAgent agent, bool conditionsMet) + public bool IsExecutable(IActionReceiver agent, bool conditionsMet) { - var goapAgent = agent.Injector.GetCachedComponent(); + var goapAgent = agent.Injector.GetCachedComponent(); if (goapAgent == null) return false; diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs similarity index 82% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs rename to Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs index b0ceeeaa..c758830e 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs @@ -7,8 +7,7 @@ namespace CrashKonijn.Goap.Behaviours { - [RequireComponent(typeof(AgentBehaviour))] - public class GoapAgentBehaviour : MonoBehaviour, IMonoGoapAgent + public class GoapActionProvider : ActionProviderBase, IMonoGoapActionProvider { [field: SerializeField] public LoggerConfig LoggerConfig { get; set; } = new LoggerConfig(); @@ -16,6 +15,9 @@ public class GoapAgentBehaviour : MonoBehaviour, IMonoGoapAgent [field: SerializeField] public AgentTypeBehaviour AgentTypeBehaviour { get; set; } + [field: SerializeField] + public float DistanceMultiplier { get; set; } = 1f; + private IAgentType agentType; public IAgentType AgentType { @@ -33,19 +35,21 @@ public IAgentType AgentType public ILocalWorldData WorldData { get; } = new LocalWorldData(); public IConnectable[] CurrentPlan { get; private set; } = Array.Empty(); public IGoapAgentEvents Events { get; } = new GoapAgentEvents(); - public ILogger Logger { get; } = new GoapAgentLogger(); + public ILogger Logger { get; } = new GoapAgentLogger(); - private IMonoAgent agent; - public IMonoAgent Agent + private IActionReceiver agent; + public IActionReceiver Agent { get { if (this.agent == null) this.agent = this.GetComponent(); - + return this.agent; } } + + public Vector3 Position => this.transform.position; private void Awake() { @@ -103,10 +107,10 @@ public void SetGoal(IGoal goal, bool endAction) this.StopAction(); } - public void SetAction(IGoapAction action, IConnectable[] path, ITarget target) + public void SetAction(IGoapAction action, IConnectable[] path) { this.CurrentPlan = path; - this.Agent.SetAction(this, action, target); + this.Agent.SetAction(this, action, this.WorldData.GetTarget(action)); } public void StopAction(bool resolveAction = true) @@ -114,7 +118,7 @@ public void StopAction(bool resolveAction = true) this.Agent.StopAction(resolveAction); } - public void ResolveAction() + public override void ResolveAction() { this.Events.Resolve(); this.Agent.Timers.Resolve.Touch(); @@ -124,5 +128,10 @@ public void ClearGoal() { this.CurrentGoal = null; } + + public void SetDistanceMultiplierSpeed(float speed) + { + this.DistanceMultiplier = 1f / speed; + } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs index f70c50b9..f6d6be12 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs @@ -5,33 +5,34 @@ namespace CrashKonijn.Goap.Behaviours { public class GoapAgentEvents : IGoapAgentEvents { - private IMonoGoapAgent agent; + private IMonoGoapActionProvider actionProvider; private IAgentTypeEvents typeEvents; - public void Bind(IMonoGoapAgent agent, IAgentTypeEvents events) + public void Bind(IMonoGoapActionProvider actionProvider, IAgentTypeEvents events) { this.typeEvents = events; - this.agent = agent; + this.actionProvider = actionProvider; - agent.Agent.Events.OnActionStart += this.ActionStart; - agent.Agent.Events.OnActionEnd += this.ActionEnd; - agent.Agent.Events.OnActionStop += this.ActionStop; - agent.Agent.Events.OnActionComplete += this.ActionComplete; + // Todo + // actionProvider.Agent.Events.OnActionStart += this.ActionStart; + // actionProvider.Agent.Events.OnActionEnd += this.ActionEnd; + // actionProvider.Agent.Events.OnActionStop += this.ActionStop; + // actionProvider.Agent.Events.OnActionComplete += this.ActionComplete; } public void Unbind() { - this.agent.Agent.Events.OnActionStart -= this.ActionStart; - this.agent.Agent.Events.OnActionEnd -= this.ActionEnd; - this.agent.Agent.Events.OnActionStop -= this.ActionStop; - this.agent.Agent.Events.OnActionComplete -= this.ActionComplete; + // this.actionProvider.Agent.Events.OnActionStart -= this.ActionStart; + // this.actionProvider.Agent.Events.OnActionEnd -= this.ActionEnd; + // this.actionProvider.Agent.Events.OnActionStop -= this.ActionStop; + // this.actionProvider.Agent.Events.OnActionComplete -= this.ActionComplete; } public event GoalDelegate OnNoActionFound; public void NoActionFound(IGoal goal) { this.OnNoActionFound?.Invoke(goal); - this.typeEvents?.NoActionFound(this.agent, goal); + this.typeEvents?.NoActionFound(this.actionProvider, goal); } // Goals @@ -39,14 +40,14 @@ public void NoActionFound(IGoal goal) public void GoalStart(IGoal goal) { this.OnGoalStart?.Invoke(goal); - this.typeEvents?.GoalStart(this.agent, goal); + this.typeEvents?.GoalStart(this.actionProvider, goal); } public event GoalDelegate OnGoalCompleted; public void GoalCompleted(IGoal goal) { this.OnGoalCompleted?.Invoke(goal); - this.typeEvents?.GoalCompleted(this.agent, goal); + this.typeEvents?.GoalCompleted(this.actionProvider, goal); } // General @@ -54,7 +55,7 @@ public void GoalCompleted(IGoal goal) public void Resolve() { this.OnResolve?.Invoke(); - this.typeEvents?.AgentResolve(this.agent); + this.typeEvents?.AgentResolve(this.actionProvider); } // Agent events @@ -70,7 +71,7 @@ private void ActionStart(IAction action) return; this.OnActionStart?.Invoke(goapAction); - this.typeEvents.ActionStart(this.agent, goapAction); + this.typeEvents.ActionStart(this.actionProvider, goapAction); } private void ActionEnd(IAction action) @@ -79,8 +80,7 @@ private void ActionEnd(IAction action) return; this.OnActionEnd?.Invoke(goapAction); - this.typeEvents.ActionEnd(this.agent, goapAction); - + this.typeEvents.ActionEnd(this.actionProvider, goapAction); } private void ActionStop(IAction action) @@ -89,7 +89,7 @@ private void ActionStop(IAction action) return; this.OnActionStop?.Invoke(goapAction); - this.typeEvents.ActionStop(this.agent, goapAction); + this.typeEvents.ActionStop(this.actionProvider, goapAction); } private void ActionComplete(IAction action) @@ -98,7 +98,7 @@ private void ActionComplete(IAction action) return; this.OnActionComplete?.Invoke(goapAction); - this.typeEvents.ActionComplete(this.agent, goapAction); + this.typeEvents.ActionComplete(this.actionProvider, goapAction); } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs index 2e646c34..2397d969 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs @@ -86,7 +86,7 @@ private void CreateAgentTypes() public IGoapController Controller => this.goap.Controller; public IGraph GetGraph(IAgentType agentType) => this.goap.GetGraph(agentType); public bool Knows(IAgentType agentType) => this.goap.Knows(agentType); - public List Agents => this.goap.Agents; + public List Agents => this.goap.Agents; public IAgentType[] AgentTypes => this.goap.AgentTypes; public IAgentType GetAgentType(string id) diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs index f2adbf34..636389a4 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs @@ -6,63 +6,63 @@ namespace CrashKonijn.Goap.Behaviours public class GoapEvents : IGoapEvents { public event GoapAgentActionDelegate OnActionStart; - public void ActionStart(IMonoGoapAgent agent, IGoapAction action) + public void ActionStart(IMonoGoapActionProvider actionProvider, IGoapAction action) { - this.OnActionStart?.Invoke(agent, action); + this.OnActionStart?.Invoke(actionProvider, action); } public event GoapAgentActionDelegate OnActionEnd; - public void ActionEnd(IMonoGoapAgent agent, IGoapAction action) + public void ActionEnd(IMonoGoapActionProvider actionProvider, IGoapAction action) { - this.OnActionEnd?.Invoke(agent, action); + this.OnActionEnd?.Invoke(actionProvider, action); } public event GoapAgentActionDelegate OnActionStop; - public void ActionStop(IMonoGoapAgent agent, IGoapAction action) + public void ActionStop(IMonoGoapActionProvider actionProvider, IGoapAction action) { - this.OnActionStop?.Invoke(agent, action); + this.OnActionStop?.Invoke(actionProvider, action); } public event GoapAgentActionDelegate OnActionComplete; - public void ActionComplete(IMonoGoapAgent agent, IGoapAction action) + public void ActionComplete(IMonoGoapActionProvider actionProvider, IGoapAction action) { - this.OnActionComplete?.Invoke(agent, action); + this.OnActionComplete?.Invoke(actionProvider, action); } public event AgentGoalDelegate OnNoActionFound; - public void NoActionFound(IMonoGoapAgent agent, IGoal goal) + public void NoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal) { - this.OnNoActionFound?.Invoke(agent, goal); + this.OnNoActionFound?.Invoke(actionProvider, goal); } public event AgentGoalDelegate OnGoalStart; - public void GoalStart(IMonoGoapAgent agent, IGoal goal) + public void GoalStart(IMonoGoapActionProvider actionProvider, IGoal goal) { - this.OnGoalStart?.Invoke(agent, goal); + this.OnGoalStart?.Invoke(actionProvider, goal); } public event AgentGoalDelegate OnGoalCompleted; - public void GoalCompleted(IMonoGoapAgent agent, IGoal goal) + public void GoalCompleted(IMonoGoapActionProvider actionProvider, IGoal goal) { - this.OnGoalCompleted?.Invoke(agent, goal); + this.OnGoalCompleted?.Invoke(actionProvider, goal); } public event GoapAgentDelegate OnAgentResolve; - public void AgentResolve(IMonoGoapAgent agent) + public void AgentResolve(IMonoGoapActionProvider actionProvider) { - this.OnAgentResolve?.Invoke(agent); + this.OnAgentResolve?.Invoke(actionProvider); } public event GoapAgentDelegate OnAgentRegistered; - public void AgentRegistered(IMonoGoapAgent agent) + public void AgentRegistered(IMonoGoapActionProvider actionProvider) { - this.OnAgentRegistered?.Invoke(agent); + this.OnAgentRegistered?.Invoke(actionProvider); } public event GoapAgentDelegate OnAgentUnregistered; - public void AgentUnregistered(IMonoGoapAgent agent) + public void AgentUnregistered(IMonoGoapActionProvider actionProvider) { - this.OnAgentUnregistered?.Invoke(agent); + this.OnAgentUnregistered?.Invoke(actionProvider); } public event AgentTypeDelegate OnAgentTypeRegistered; diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs b/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs index 7ef64c18..f3bb0588 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs @@ -33,14 +33,14 @@ public AgentType(string id, IGoapConfig config, List goals, List() diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetKeyBuilder.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetKeyBuilder.cs index acfffeaa..a7310fcb 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetKeyBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetKeyBuilder.cs @@ -1,8 +1,6 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Validators; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Builders +namespace CrashKonijn.Goap { public class TargetKeyBuilder : KeyBuilderBase { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs index ac170771..a70ffc5b 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs @@ -32,7 +32,7 @@ private void OnAgentResolve(IGoapAgent agent) { var runner = this.GetRunner(agent); - runner.Run(new HashSet() { agent as IMonoGoapAgent }); + runner.Run(new HashSet() { agent as IMonoGoapActionProvider }); runner.Complete(); } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs index dc5e4b9f..7b0d5324 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs @@ -6,7 +6,7 @@ namespace CrashKonijn.Goap.Classes.Controllers public class ProactiveController : IGoapController { private IGoap goap; - private Dictionary> agents = new(); + private Dictionary> agents = new(); public float ResolveTime { get; set; } = 1f; @@ -53,7 +53,7 @@ public void OnUpdate() // Update the action sensors for the agent agent.AgentType.SensorRunner.SenseLocal(agent, agent.Agent.ActionState.Action as IGoapAction); - agent.Agent.Run(); + // agent.Agent.Run(); } } @@ -65,20 +65,20 @@ public void OnLateUpdate() } } - private void OnNoActionFound(IMonoGoapAgent agent, IGoal goal) + private void OnNoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal) { - this.GetQueue(agent.AgentType).Add(agent); + this.GetQueue(actionProvider.AgentType).Add(actionProvider); } - private void OnAgentResolve(IMonoGoapAgent agent) + private void OnAgentResolve(IMonoGoapActionProvider actionProvider) { - this.GetQueue(agent.AgentType).Add(agent); + this.GetQueue(actionProvider.AgentType).Add(actionProvider); } - private HashSet GetQueue(IAgentType agentType) + private HashSet GetQueue(IAgentType agentType) { if (!this.agents.ContainsKey(agentType)) - this.agents.Add(agentType, new HashSet()); + this.agents.Add(agentType, new HashSet()); return this.agents[agentType]; } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs index 7d41c362..1ca0af2f 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs @@ -6,7 +6,7 @@ namespace CrashKonijn.Goap.Classes.Controllers public class ReactiveController : IGoapController { private IGoap goap; - private Dictionary> agents = new(); + private Dictionary> agents = new(); public void Initialize(IGoap goap) { @@ -40,7 +40,7 @@ public void OnUpdate() // Update the action sensors for the agent agent.AgentType.SensorRunner.SenseLocal(agent, agent.Agent.ActionState.Action as IGoapAction); - agent.Agent.Run(); + // agent.Agent.Run(); } } @@ -52,20 +52,20 @@ public void OnLateUpdate() } } - private void OnNoActionFound(IMonoGoapAgent agent, IGoal goal) + private void OnNoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal) { - this.GetQueue(agent.AgentType).Add(agent); + this.GetQueue(actionProvider.AgentType).Add(actionProvider); } - private void OnAgentResolve(IMonoGoapAgent agent) + private void OnAgentResolve(IMonoGoapActionProvider actionProvider) { - this.GetQueue(agent.AgentType).Add(agent); + this.GetQueue(actionProvider.AgentType).Add(actionProvider); } - private HashSet GetQueue(IAgentType agentType) + private HashSet GetQueue(IAgentType agentType) { if (!this.agents.ContainsKey(agentType)) - this.agents.Add(agentType, new HashSet()); + this.agents.Add(agentType, new HashSet()); return this.agents[agentType]; } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs b/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs index 605960c9..f7ec1799 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs @@ -4,7 +4,7 @@ namespace CrashKonijn.Goap.Classes { - public class GoapAgentLogger : LoggerBase + public class GoapAgentLogger : LoggerBase { protected override string Name => this.source.name; diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs index 52eb4e00..57812382 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs @@ -32,7 +32,7 @@ public AgentTypeJobRunner(IAgentType agentType, IGraphResolver graphResolver) this.conditionBuilder = this.resolver.GetConditionBuilder(); } - public void Run(HashSet queue) + public void Run(HashSet queue) { this.resolveHandles.Clear(); @@ -45,46 +45,46 @@ public void Run(HashSet queue) } } - private void Run(IMonoGoapAgent agent) + private void Run(IMonoGoapActionProvider actionProvider) { - if (agent.IsNull()) + if (actionProvider.IsNull()) return; - if (agent.CurrentGoal == null) + if (actionProvider.CurrentGoal == null) return; - this.agentType.SensorRunner.SenseLocal(agent); + this.agentType.SensorRunner.SenseLocal(actionProvider); - if (this.IsGoalCompleted(agent)) + if (this.IsGoalCompleted(actionProvider)) { - var goal = agent.CurrentGoal; - agent.ClearGoal(); - agent.Events.GoalCompleted(goal); + var goal = actionProvider.CurrentGoal; + actionProvider.ClearGoal(); + actionProvider.Events.GoalCompleted(goal); return; } - this.FillBuilders(agent); + this.FillBuilders(actionProvider); - this.resolveHandles.Add(new JobRunHandle(agent) + this.resolveHandles.Add(new JobRunHandle(actionProvider) { Handle = this.resolver.StartResolve(new RunData { - StartIndex = new NativeArray(new []{ this.resolver.GetIndex(agent.CurrentGoal) }, Allocator.TempJob), - AgentPosition = agent.Agent.Position, + StartIndex = new NativeArray(new []{ this.resolver.GetIndex(actionProvider.CurrentGoal) }, Allocator.TempJob), + AgentPosition = actionProvider.Position, IsEnabled = new NativeArray(this.enabledBuilder.Build(), Allocator.TempJob), IsExecutable = new NativeArray(this.executableBuilder.Build(), Allocator.TempJob), Positions = new NativeArray(this.positionBuilder.Build(), Allocator.TempJob), Costs = new NativeArray(this.costBuilder.Build(), Allocator.TempJob), ConditionsMet = new NativeArray(this.conditionBuilder.Build(), Allocator.TempJob), - DistanceMultiplier = agent.Agent.DistanceMultiplier + DistanceMultiplier = actionProvider.DistanceMultiplier }) }); } - private void FillBuilders(IMonoGoapAgent agent) + private void FillBuilders(IMonoGoapActionProvider actionProvider) { var conditionObserver = this.agentType.GoapConfig.ConditionObserver; - conditionObserver.SetWorldData(agent.WorldData); + conditionObserver.SetWorldData(actionProvider.WorldData); this.enabledBuilder.Clear(); this.executableBuilder.Clear(); @@ -106,11 +106,11 @@ private void FillBuilders(IMonoGoapAgent agent) this.conditionBuilder.SetConditionMet(condition, true); } - var target = agent.WorldData.GetTarget(node); + var target = actionProvider.WorldData.GetTarget(node); - this.executableBuilder.SetExecutable(node, node.IsExecutable(agent.Agent, allMet)); - this.enabledBuilder.SetEnabled(node, node.IsEnabled(agent.Agent)); - this.costBuilder.SetCost(node, node.GetCost(agent.Agent, agent.Agent.Injector)); + this.executableBuilder.SetExecutable(node, node.IsExecutable(actionProvider.Agent, allMet)); + this.enabledBuilder.SetEnabled(node, node.IsEnabled(actionProvider.Agent)); + this.costBuilder.SetCost(node, node.GetCost(actionProvider.Agent, actionProvider.Agent.Injector)); this.positionBuilder.SetPosition(node, target?.Position); } @@ -136,20 +136,20 @@ public void Complete() { var result = resolveHandle.Handle.Complete(); - if (resolveHandle.Agent.IsNull()) + if (resolveHandle.ActionProvider.IsNull()) continue; var action = result.FirstOrDefault() as IGoapAction; if (action is null) { - resolveHandle.Agent.Events.NoActionFound(resolveHandle.Agent.CurrentGoal); + resolveHandle.ActionProvider.Events.NoActionFound(resolveHandle.ActionProvider.CurrentGoal); continue; } - if (action != resolveHandle.Agent.Agent.ActionState.Action) + if (action != resolveHandle.ActionProvider.Agent.ActionState.Action) { - resolveHandle.Agent.SetAction(action, result, resolveHandle.Agent.WorldData.GetTarget(action)); + resolveHandle.ActionProvider.SetAction(action, result); } } @@ -168,12 +168,12 @@ public void Dispose() private class JobRunHandle { - public IMonoGoapAgent Agent { get; } + public IMonoGoapActionProvider ActionProvider { get; } public IResolveHandle Handle { get; set; } - public JobRunHandle(IMonoGoapAgent agent) + public JobRunHandle(IMonoGoapActionProvider actionProvider) { - this.Agent = agent; + this.ActionProvider = actionProvider; } } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs index fb7451f4..11d2c572 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs @@ -12,7 +12,7 @@ public class Goap : IGoap private Stopwatch stopwatch = new(); /** GC caches **/ - private List agentsGC = new(); + private List agentsGC = new(); /** **/ public IGoapEvents Events { get; } = new GoapEvents(); @@ -64,7 +64,7 @@ private float GetElapsedMs() public IGraph GetGraph(IAgentType agentType) => this.AgentTypeRunners[agentType].GetGraph(); public bool Knows(IAgentType agentType) => this.AgentTypeRunners.ContainsKey(agentType); - public List Agents + public List Agents { get { this.agentsGC.Clear(); diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs index c541ce73..8311d0b6 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs @@ -81,17 +81,17 @@ public void SenseGlobal(IGoapAction action) } } - public void SenseLocal(IMonoGoapAgent agent) + public void SenseLocal(IMonoGoapActionProvider actionProvider) { foreach (var localSensor in this.defaultSet.LocalSensors) { - localSensor.Sense(agent.WorldData, agent.Agent, agent.Agent.Injector); + localSensor.Sense(actionProvider.WorldData, actionProvider.Agent, actionProvider.Agent.Injector); } } - public void SenseLocal(IMonoGoapAgent agent, IGoapAction action) + public void SenseLocal(IMonoGoapActionProvider actionProvider, IGoapAction action) { - if (agent.IsNull()) + if (actionProvider.IsNull()) return; if (action == null) @@ -101,7 +101,7 @@ public void SenseLocal(IMonoGoapAgent agent, IGoapAction action) foreach (var localSensor in set.LocalSensors) { - localSensor.Sense(agent.WorldData, agent.Agent, agent.Agent.Injector); + localSensor.Sense(actionProvider.WorldData, actionProvider.Agent, actionProvider.Agent.Injector); } } diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionClassTypeValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionClassTypeValidator.cs index f7d65d75..30596cf6 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionClassTypeValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionClassTypeValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class ActionClassTypeValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionConditionKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionConditionKeyValidator.cs index 5228ceb2..fe54b46e 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionConditionKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionConditionKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class ActionConditionKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectKeyValidator.cs index a940d88d..8c0fb3ec 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class ActionEffectKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectsValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectsValidator.cs index 44f82f75..eddb2238 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectsValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectsValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class ActionEffectsValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionTargetValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionTargetValidator.cs index d921f8f7..32bee0c7 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionTargetValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionTargetValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class ActionTargetValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/AgentTypeConfigValidatorRunner.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/AgentTypeConfigValidatorRunner.cs index 80dba33b..2983cd79 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/AgentTypeConfigValidatorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/AgentTypeConfigValidatorRunner.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class AgentTypeConfigValidatorRunner : IAgentTypeConfigValidatorRunner { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/Extensions.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/Extensions.cs deleted file mode 100644 index 900cb648..00000000 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/Extensions.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; - -namespace CrashKonijn.Goap.Classes.Validators -{ - public static class Extensions - { - public static IWorldKey[] GetWorldKeys(this IAgentTypeConfig agentTypeConfig) - { - return agentTypeConfig.Actions - .SelectMany((action) => - { - return action.Conditions - .Where(x => x.WorldKey != null) - .Select(y => y.WorldKey); - }) - .Distinct() - .ToArray(); - } - - public static ITargetKey[] GetTargetKeys(this IAgentTypeConfig agentTypeConfig) - { - return agentTypeConfig.Actions - .Where(x => x.Target != null) - .Select(x => x.Target) - .Distinct() - .ToArray(); - } - - public static string GetGenericTypeName(this Type type) - { - var typeName = type.Name; - - if (type.IsGenericType) - { - var genericArguments = type.GetGenericArguments(); - var genericTypeName = typeName.Substring(0, typeName.IndexOf('`')); - var typeArgumentNames = string.Join(",", genericArguments.Select(a => a.GetGenericTypeName())); - typeName = $"{genericTypeName}<{typeArgumentNames}>"; - } - - return typeName; - } - } -} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/Extensions.cs.meta b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/Extensions.cs.meta deleted file mode 100644 index e71dab0e..00000000 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/Extensions.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: a1bd1789e6684fa1af7ba353538f3d75 -timeCreated: 1677683253 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalClassTypeValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalClassTypeValidator.cs index c13f4402..b34cc3d2 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalClassTypeValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalClassTypeValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class GoalClassTypeValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionKeyValidator.cs index 4058f65b..11676758 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class GoalConditionKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionsValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionsValidator.cs index bb45fc8c..f1fdbdda 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionsValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionsValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class GoalConditionsValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetKeySensorsValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetKeySensorsValidator.cs index e19eb0df..356cd884 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetKeySensorsValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetKeySensorsValidator.cs @@ -1,9 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolvers; -using UnityEngine; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class TargetKeySensorsValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorClassTypeValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorClassTypeValidator.cs index d51ec4b9..aa093861 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorClassTypeValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorClassTypeValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class TargetSensorClassTypeValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorKeyValidator.cs index c154606b..45b69816 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class TargetSensorKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ValidationResults.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ValidationResults.cs index 03bc13e1..6e7882f1 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ValidationResults.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ValidationResults.cs @@ -2,7 +2,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class ValidationResults : IValidationResults { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldKeySensorsValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldKeySensorsValidator.cs index f48a856e..56e07247 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldKeySensorsValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldKeySensorsValidator.cs @@ -1,9 +1,7 @@ -using System; -using System.Linq; +using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolvers; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class WorldKeySensorsValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorClassTypeValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorClassTypeValidator.cs index d6f2f186..3f193c3c 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorClassTypeValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorClassTypeValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class WorldSensorClassTypeValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorKeyValidator.cs index 47da9a96..1616c2a4 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Classes.Validators +namespace CrashKonijn.Goap { public class WorldSensorKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Extensions.cs b/Package/Runtime/CrashKonijn.Goap/Extensions.cs index ca69a0b1..4fc2099d 100644 --- a/Package/Runtime/CrashKonijn.Goap/Extensions.cs +++ b/Package/Runtime/CrashKonijn.Goap/Extensions.cs @@ -15,8 +15,8 @@ public static class Extensions public static bool IsNull(this IMonoAgent agent) => agent is MonoBehaviour mono && mono == null; - public static bool IsNull(this IMonoGoapAgent agent) - => agent is MonoBehaviour mono && mono == null; + public static bool IsNull(this IMonoGoapActionProvider actionProvider) + => actionProvider is MonoBehaviour mono && mono == null; public static string ToName(this Comparison comparison) { @@ -134,5 +134,42 @@ public static IEnumerable DistinctBy } } } + + public static IWorldKey[] GetWorldKeys(this IAgentTypeConfig agentTypeConfig) + { + return agentTypeConfig.Actions + .SelectMany((action) => + { + return action.Conditions + .Where(x => x.WorldKey != null) + .Select(y => y.WorldKey); + }) + .Distinct() + .ToArray(); + } + + public static ITargetKey[] GetTargetKeys(this IAgentTypeConfig agentTypeConfig) + { + return agentTypeConfig.Actions + .Where(x => x.Target != null) + .Select(x => x.Target) + .Distinct() + .ToArray(); + } + + public static string GetGenericTypeName(this Type type) + { + var typeName = type.Name; + + if (type.IsGenericType) + { + var genericArguments = type.GetGenericArguments(); + var genericTypeName = typeName.Substring(0, typeName.IndexOf('`')); + var typeArgumentNames = string.Join(",", genericArguments.Select(a => a.GetGenericTypeName())); + typeName = $"{genericTypeName}<{typeArgumentNames}>"; + } + + return typeName; + } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalTargetSensorBase.cs b/Package/Runtime/CrashKonijn.Goap/Sensors/LocalTargetSensorBase.cs index e3efccac..ec3e3300 100644 --- a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalTargetSensorBase.cs +++ b/Package/Runtime/CrashKonijn.Goap/Sensors/LocalTargetSensorBase.cs @@ -14,11 +14,11 @@ public abstract class LocalTargetSensorBase : ILocalTargetSensor public abstract void Update(); public Type[] GetKeys() => new[] { this.Key.GetType() }; - public void Sense(IWorldData worldData, IMonoAgent agent, IComponentReference references) + public void Sense(IWorldData worldData, IActionReceiver agent, IComponentReference references) { worldData.SetTarget(this.Key, this.Sense(agent, references)); } - public abstract ITarget Sense(IMonoAgent agent, IComponentReference references); + public abstract ITarget Sense(IActionReceiver agent, IComponentReference references); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalWorldSensorBase.cs b/Package/Runtime/CrashKonijn.Goap/Sensors/LocalWorldSensorBase.cs index 0ec4cd93..36a804a7 100644 --- a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalWorldSensorBase.cs +++ b/Package/Runtime/CrashKonijn.Goap/Sensors/LocalWorldSensorBase.cs @@ -18,11 +18,11 @@ public abstract class LocalWorldSensorBase : ILocalWorldSensor public abstract void Update(); public Type[] GetKeys() => new[] { this.Key.GetType() }; - public void Sense(IWorldData data, IMonoAgent agent, IComponentReference references) + public void Sense(IWorldData data, IActionReceiver agent, IComponentReference references) { data.SetState(this.Key, this.Sense(agent, references)); } - public abstract SenseValue Sense(IMonoAgent agent, IComponentReference references); + public abstract SenseValue Sense(IActionReceiver agent, IComponentReference references); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/MultiSensorBase.cs b/Package/Runtime/CrashKonijn.Goap/Sensors/MultiSensorBase.cs index 7e1daf96..72640619 100644 --- a/Package/Runtime/CrashKonijn.Goap/Sensors/MultiSensorBase.cs +++ b/Package/Runtime/CrashKonijn.Goap/Sensors/MultiSensorBase.cs @@ -58,7 +58,7 @@ public void Sense(IWorldData data, Type[] keys) } } - public void Sense(IWorldData data, IMonoAgent agent, IComponentReference references) + public void Sense(IWorldData data, IActionReceiver agent, IComponentReference references) { foreach (var sensor in this.LocalSensors.Values) { @@ -66,7 +66,7 @@ public void Sense(IWorldData data, IMonoAgent agent, IComponentReference referen } } - public void Sense(IWorldData data, IMonoAgent agent, IComponentReference references, Type[] keys) + public void Sense(IWorldData data, IActionReceiver agent, IComponentReference references, Type[] keys) { foreach (var key in keys) { @@ -77,13 +77,13 @@ public void Sense(IWorldData data, IMonoAgent agent, IComponentReference referen } } - public void AddLocalWorldSensor(Func sense) + public void AddLocalWorldSensor(Func sense) where TKey : IWorldKey { this.LocalSensors.Add(typeof(TKey), new LocalSensor { Key = typeof(TKey), - Sense = (IWorldData data, IMonoAgent agent, IComponentReference references) => + Sense = (IWorldData data, IActionReceiver agent, IComponentReference references) => { data.SetState(sense(agent, references)); } @@ -103,13 +103,13 @@ public void AddGlobalWorldSensor(Func sense) }); } - public void AddLocalTargetSensor(Func sense) + public void AddLocalTargetSensor(Func sense) where TKey : ITargetKey { this.LocalSensors.Add(typeof(TKey), new LocalSensor { Key = typeof(TKey), - Sense = (IWorldData data, IMonoAgent agent, IComponentReference references) => + Sense = (IWorldData data, IActionReceiver agent, IComponentReference references) => { data.SetTarget(sense(agent, references)); } @@ -156,6 +156,6 @@ public class GlobalSensor public class LocalSensor { public Type Key; - public Action Sense; + public Action Sense; } } \ No newline at end of file diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs index b890c265..5f555aea 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs @@ -1,9 +1,7 @@ using System; -using System.Collections.Generic; using CrashKonijn.Goap.Behaviours; using CrashKonijn.Goap.Classes; using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; using CrashKonijn.Goap.Core.Interfaces; using CrashKonijn.Goap.UnitTests.Classes; using CrashKonijn.Goap.UnitTests.Support; @@ -16,144 +14,140 @@ namespace CrashKonijn.Goap.UnitTests { public class AgentBehaviourTests { + private IAgentType agentType; + private AgentBehaviour agent; + private GoapActionProvider provider; + + [SetUp] + public void Setup() + { + this.agentType = Substitute.For(); + + var go = new GameObject("Agent"); + + this.agent = go.AddComponent(); + + this.provider = go.AddComponent(); + this.provider.AgentType = this.agentType; + } + [Test] public void OnEnable_CallsRegister() { // Arrange - var agentType = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); - agent.AgentType = agentType; // Act Action act = () => { - agent.CallOnEnable(); + this.provider.CallOnEnable(); }; // Assert - agentType.Received(1).Register(agent); + this.agentType.Received(1).Register(this.provider); act(); - - agentType.Received(2).Register(agent); + + this.agentType.Received(2).Register(this.provider); } [Test] public void OnDisable_CallsUnregister() { // Arrange - var agentType = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); - agent.AgentType = agentType; // Act Action act = () => { - agent.CallOnDisable(); + this.provider.CallOnDisable(); }; // Assert - agentType.Received(0).Unregister(agent); + this.agentType.Received(0).Unregister(this.provider); act(); - - agentType.Received(1).Unregister(agent); + + this.agentType.Received(1).Unregister(this.provider); } [Test] public void ActionPerform_WithRunStateStop_CallsEnd() { // Arrange - var agentType = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); - agent.AgentType = agentType; - agent.CallAwake(); - agent.Agent.Initialize(); + this.provider.CallAwake(); + this.agent.Initialize(); var action = Substitute.For(); action.IsValid(Arg.Any(), Arg.Any()).Returns(true); - action.IsInRange(agent.Agent, Arg.Any(), Arg.Any(), Arg.Any()).Returns(true); - action.Perform(agent.Agent, Arg.Any(), Arg.Any()).Returns(ActionRunState.Stop); - - agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); + action.IsInRange(this.agent, Arg.Any(), Arg.Any(), Arg.Any()).Returns(true); + action.Perform(this.agent, Arg.Any(), Arg.Any()).Returns(ActionRunState.Stop); + + this.provider.SetAction(action, Array.Empty()); // Act - agent.Agent.Run(); + this.agent.Run(); // Assert - action.Received(1).Perform(agent.Agent, Arg.Any(), Arg.Any()); - action.Received(1).Stop(agent.Agent, Arg.Any()); + action.Received(1).Perform(this.agent, Arg.Any(), Arg.Any()); + action.Received(1).Stop(this.agent, Arg.Any()); } [Test] public void SetGoal_SetsGoal() { // Arrange - var agentType = Substitute.For(); - agentType.ResolveGoal().Returns(new TestGoal()); - - var agent = new GameObject("Agent").AddComponent(); - agent.AgentType = agentType; + this.agentType.ResolveGoal().Returns(new TestGoal()); + + this.provider.AgentType = this.agentType; // Act - agent.SetGoal(false); + this.provider.SetGoal(false); // Assert - agent.CurrentGoal.Should().BeOfType(); + this.provider.CurrentGoal.Should().BeOfType(); } [Test] public void SetGoal_ResolvesAgent() { // Arrange - var agentType = Substitute.For(); - agentType.ResolveGoal().Returns(new TestGoal()); - - var agent = new GameObject("Agent").AddComponent(); - agent.AgentType = agentType; - agent.MockEvents(); + this.agentType.ResolveGoal().Returns(new TestGoal()); + + this.provider.MockEvents(); // Act - agent.SetGoal(false); + this.provider.SetGoal(false); // Assert - agent.Events.Received(1).Resolve(); + this.provider.Events.Received(1).Resolve(); } [Test] public void SetGoal_CallsGoalStartEvent() { // Arrange - var agentType = Substitute.For(); - agentType.ResolveGoal().Returns(new TestGoal()); - - var agent = new GameObject("Agent").AddComponent(); - agent.AgentType = agentType; - agent.MockEvents(); + this.agentType.ResolveGoal().Returns(new TestGoal()); + + this.provider.MockEvents(); // Act - agent.SetGoal(false); + this.provider.SetGoal(false); // Assert - agent.Events.Received(1).GoalStart(Arg.Any()); + this.provider.Events.Received(1).GoalStart(Arg.Any()); } [Test] public void SetGoal_EndActionFalse_DoesntCallEnd() { // Arrange - var agentType = Substitute.For(); - agentType.ResolveGoal().Returns(new TestGoal()); - - var agent = new GameObject("Agent").AddComponent(); - agent.AgentType = agentType; + this.agentType.ResolveGoal().Returns(new TestGoal()); // Set Action property through reflection var action = Substitute.For(); - agent.InsertAction(action); + this.provider.InsertAction(action); // Act - agent.SetGoal(false); + this.provider.SetGoal(false); // Assert action.Received(0).Stop(Arg.Any(), Arg.Any()); @@ -163,19 +157,16 @@ public void SetGoal_EndActionFalse_DoesntCallEnd() public void SetGoal_EndActionTrue_DoesCallEnd() { // Arrange - var agentType = Substitute.For(); - agentType.ResolveGoal().Returns(new TestGoal()); - - var agent = new GameObject("Agent").AddComponent(); - agent.AgentType = agentType; - agent.Agent.ActionResolver = Substitute.For(); + this.agentType.ResolveGoal().Returns(new TestGoal()); + + this.agent.ActionResolver = Substitute.For(); // Set Action property through reflection var action = Substitute.For(); - agent.InsertAction(action); + this.provider.InsertAction(action); // Act - agent.SetGoal(true); + this.provider.SetGoal(true); // Assert action.Received(1).Stop(Arg.Any(), Arg.Any()); @@ -185,54 +176,49 @@ public void SetGoal_EndActionTrue_DoesCallEnd() public void SetAction_SetsAction() { // Arrange - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); + this.provider.CallAwake(); + this.agent.Initialize(); var action = Substitute.For(); // Act - agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); + this.provider.SetAction(action, Array.Empty()); // Assert - agent.Agent.ActionState.Action.Should().Be(action); + this.provider.Agent.ActionState.Action.Should().Be(action); } [Test] public void SetAction_CallsEndOnOldAction() { // Arrange - var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); - agent.AgentType = set; - agent.CallAwake(); - agent.Agent.Initialize(); + this.provider.CallAwake(); + this.agent.Initialize(); var action = Substitute.For(); // Set Action property through reflection var oldAction = Substitute.For(); - agent.InsertAction(oldAction); + this.provider.InsertAction(oldAction); // Act - agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); + this.provider.SetAction(action, Array.Empty()); // Assert - oldAction.Received(1).Stop(agent.Agent, Arg.Any()); + oldAction.Received(1).Stop(this.agent, Arg.Any()); } [Test] public void SetAction_CallsGetData() { // Arrange - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); + this.provider.CallAwake(); + this.agent.Initialize(); var action = Substitute.For(); // Act - agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); + this.provider.SetAction(action, Array.Empty()); // Assert action.Received(1).GetData(); @@ -242,66 +228,64 @@ public void SetAction_CallsGetData() public void SetAction_StoresData() { // Arrange - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); + this.provider.CallAwake(); + this.agent.Initialize(); var actionData = Substitute.For(); var action = Substitute.For(); action.GetData().Returns(actionData); // Act - agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); + this.provider.SetAction(action, Array.Empty()); // Assert - agent.Agent.ActionState.Data.Should().Be(actionData); + this.provider.Agent.ActionState.Data.Should().Be(actionData); } - [Test] - public void SetAction_SetsDataTarget() - { - // Arrange - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); - - var actionData = Substitute.For(); - var action = Substitute.For(); - action.GetData().Returns(actionData); - - var target = new PositionTarget(Vector3.zero); - - // Act - agent.SetAction(action, Array.Empty(), target); - - // Assert - actionData.Target.Should().Be(target); - } + // TODO + // [Test] + // public void SetAction_SetsDataTarget() + // { + // // Arrange + // var agent = new GameObject("Agent").AddComponent(); + // agent.CallAwake(); + // agent.Agent.Initialize(); + // + // var actionData = Substitute.For(); + // var action = Substitute.For(); + // action.GetData().Returns(actionData); + // + // var target = new PositionTarget(Vector3.zero); + // + // // Act + // agent.SetAction(action, Array.Empty(), target); + // + // // Assert + // actionData.Target.Should().Be(target); + // } [Test] public void SetAction_CallsStartOnAction() { // Arrange - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); + this.provider.CallAwake(); + this.agent.Initialize(); var action = Substitute.For(); // Act - agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); + this.provider.SetAction(action, Array.Empty()); // Assert - action.Received(1).Start(agent.Agent, Arg.Any()); + action.Received(1).Start(this.agent, Arg.Any()); } [Test] public void SetAction_StoresPath() { // Arrange - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); + this.provider.CallAwake(); + this.agent.Initialize(); var action = Substitute.For(); var path = new IConnectable[] @@ -310,126 +294,109 @@ public void SetAction_StoresPath() }; // Act - agent.SetAction(action, path, new PositionTarget(Vector3.zero)); + this.provider.SetAction(action, path); // Assert - agent.CurrentPlan.Should().BeSameAs(path); + this.provider.CurrentPlan.Should().BeSameAs(path); } [Test] public void SetAction_CallsActionStartEvent() { // Arrange - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); - agent.Agent.MockEvents(); + this.provider.CallAwake(); + this.agent.Initialize(); + this.agent.MockEvents(); var action = Substitute.For(); // Act - agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); + this.provider.SetAction(action, Array.Empty()); // Assert - agent.Agent.Events.Received(1).ActionStart(action); + this.agent.Events.Received(1).ActionStart(action); } [Test] public void EndAction_CallsEndOnAction() { // Arrange - var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); - agent.Agent.ActionResolver = Substitute.For(); - agent.CallAwake(); - agent.Agent.Initialize(); - agent.AgentType = set; + this.agent.ActionResolver = Substitute.For(); + this.provider.CallAwake(); + this.agent.Initialize(); var action = Substitute.For(); - agent.InsertAction(action); + this.provider.InsertAction(action); // Act - agent.StopAction(); + this.provider.StopAction(); // Assert - action.Received(1).Stop(agent.Agent, Arg.Any()); + action.Received(1).Stop(this.agent, Arg.Any()); } [Test] public void EndAction_ClearsAction() { // Arrange - var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); - agent.AgentType = set; + this.provider.CallAwake(); + this.agent.Initialize(); // Act - agent.SetAction(Substitute.For(), Array.Empty(), new PositionTarget(Vector3.zero)); - agent.StopAction(); + this.provider.SetAction(Substitute.For(), Array.Empty()); + this.provider.StopAction(); // Assert - agent.Agent.ActionState.Action.Should().BeNull(); + this.provider.Agent.ActionState.Action.Should().BeNull(); } [Test] public void EndAction_ClearsActionData() { // Arrange - var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); - agent.AgentType = set; + this.provider.CallAwake(); + this.agent.Initialize(); // Act - agent.SetAction(Substitute.For(), Array.Empty(), new PositionTarget(Vector3.zero)); - agent.StopAction(); + this.provider.SetAction(Substitute.For(), Array.Empty()); + this.provider.StopAction(); // Assert - agent.Agent.ActionState.Data.Should().BeNull(); + this.provider.Agent.ActionState.Data.Should().BeNull(); } [Test] public void EndAction_ShouldResolveAgent() { // Arrange - var set = Substitute.For(); - - var agent = new GameObject("Agent").AddComponent(); - agent.Agent.ActionResolver = agent; - agent.CallAwake(); - agent.Agent.Initialize(); - agent.AgentType = set; - agent.MockEvents(); + this.agent.ActionResolver = this.provider; + this.provider.CallAwake(); + this.agent.Initialize(); + this.provider.MockEvents(); // Act - agent.StopAction(); + this.provider.StopAction(); // Assert - agent.Events.Received(1).Resolve(); + this.provider.Events.Received(1).Resolve(); } [Test] public void EndAction_CallsActionEndEvent() { // Arrange - var set = Substitute.For(); - var agent = new GameObject("Agent").AddComponent(); - agent.CallAwake(); - agent.Agent.Initialize(); - agent.AgentType = set; - agent.Agent.MockEvents(); + this.provider.CallAwake(); + this.agent.Initialize(); + this.agent.MockEvents(); var action = Substitute.For(); - agent.SetAction(action, Array.Empty(), new PositionTarget(Vector3.zero)); + this.provider.SetAction(action, Array.Empty()); // Act - agent.StopAction(); + this.provider.StopAction(); // Assert - agent.Agent.Events.Received(1).ActionStop(action); + this.agent.Events.Received(1).ActionStop(action); } } } \ No newline at end of file diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs index ec4a0e23..d8b2ff07 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs @@ -15,17 +15,17 @@ namespace CrashKonijn.Goap.UnitTests { public class AgentTypeJobRunnerTests { - private IMonoGoapAgent goapAgent; + private IMonoGoapActionProvider goapActionProvider; private IAgent agent; [SetUp] public void Setup() { this.agent = Substitute.For(); - this.agent.Position.Returns(Vector3.zero); - this.goapAgent = Substitute.For(); - this.goapAgent.Agent.Returns(this.agent); + this.goapActionProvider = Substitute.For(); + this.goapActionProvider.Agent.Returns(this.agent); + this.goapActionProvider.Position.Returns(Vector3.zero); } [Test] @@ -43,7 +43,7 @@ public void Run_UpdatesSensorRunner() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.goapAgent }); + runner.Run(new HashSet() { this.goapActionProvider }); runner.Dispose(); // Assert @@ -65,7 +65,7 @@ public void Run_WithNoAgens_SensesGlobalSensors() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet()); + runner.Run(new HashSet()); runner.Dispose(); // Assert @@ -87,7 +87,7 @@ public void Run_WithAtLeastOneAgent_SensesGlobalSensors() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.goapAgent }); + runner.Run(new HashSet() { this.goapActionProvider }); runner.Dispose(); // Assert @@ -98,8 +98,8 @@ public void Run_WithAtLeastOneAgent_SensesGlobalSensors() public void Run_AgentHasNoCurrentGoal_DoesNotRun() { // Arrange - this.goapAgent.CurrentGoal.ReturnsNull(); - this.goapAgent.Agent.ActionState.Action.ReturnsNull(); + this.goapActionProvider.CurrentGoal.ReturnsNull(); + this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -113,11 +113,11 @@ public void Run_AgentHasNoCurrentGoal_DoesNotRun() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet()); + runner.Run(new HashSet()); runner.Dispose(); // Assert - sensorRunner.Received(0).SenseLocal(this.goapAgent); + sensorRunner.Received(0).SenseLocal(this.goapActionProvider); resolver.Received(0).StartResolve(Arg.Any()); } @@ -128,8 +128,8 @@ public void Run_AgentHasCurrentGoalAndNoAction_Runs() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - this.goapAgent.CurrentGoal.Returns(goal); - this.goapAgent.Agent.ActionState.Action.ReturnsNull(); + this.goapActionProvider.CurrentGoal.Returns(goal); + this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -143,11 +143,11 @@ public void Run_AgentHasCurrentGoalAndNoAction_Runs() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.goapAgent }); + runner.Run(new HashSet() { this.goapActionProvider }); runner.Dispose(); // Assert - sensorRunner.Received(1).SenseLocal(this.goapAgent); + sensorRunner.Received(1).SenseLocal(this.goapActionProvider); resolver.Received(1).StartResolve(Arg.Any()); } @@ -158,8 +158,8 @@ public void Run_AgentHasCurrentGoalAndDoesHaveAction_Runs() var goal = Substitute.For(); goal.Conditions.Returns(new []{ Substitute.For() }); - this.goapAgent.CurrentGoal.Returns(goal); - this.goapAgent.Agent.ActionState.Action.Returns(Substitute.For()); + this.goapActionProvider.CurrentGoal.Returns(goal); + this.goapActionProvider.Agent.ActionState.Action.Returns(Substitute.For()); var sensorRunner = Substitute.For(); @@ -173,11 +173,11 @@ public void Run_AgentHasCurrentGoalAndDoesHaveAction_Runs() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.goapAgent }); + runner.Run(new HashSet() { this.goapActionProvider }); runner.Dispose(); // Assert - sensorRunner.Received(1).SenseLocal(this.goapAgent); + sensorRunner.Received(1).SenseLocal(this.goapActionProvider); resolver.Received(1).StartResolve(Arg.Any()); } @@ -188,8 +188,8 @@ public void Run_AgentHasCompletedGoal_CallsGoalCompleteEvent() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - this.goapAgent.CurrentGoal.Returns(goal); - this.goapAgent.Agent.ActionState.Action.ReturnsNull(); + this.goapActionProvider.CurrentGoal.Returns(goal); + this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -205,13 +205,13 @@ public void Run_AgentHasCompletedGoal_CallsGoalCompleteEvent() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.goapAgent }); + runner.Run(new HashSet() { this.goapActionProvider }); runner.Dispose(); // Assert - sensorRunner.Received(1).SenseLocal(this.goapAgent); + sensorRunner.Received(1).SenseLocal(this.goapActionProvider); resolver.Received(0).StartResolve(Arg.Any()); - this.goapAgent.Events.Received(1).GoalCompleted(this.goapAgent.CurrentGoal); + this.goapActionProvider.Events.Received(1).GoalCompleted(this.goapActionProvider.CurrentGoal); } [Test] @@ -221,8 +221,8 @@ public void Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - this.goapAgent.CurrentGoal.Returns(goal); - this.goapAgent.Agent.ActionState.Action.ReturnsNull(); + this.goapActionProvider.CurrentGoal.Returns(goal); + this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -238,13 +238,13 @@ public void Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.goapAgent }); + runner.Run(new HashSet() { this.goapActionProvider }); runner.Dispose(); // Assert - sensorRunner.Received(1).SenseLocal(this.goapAgent); + sensorRunner.Received(1).SenseLocal(this.goapActionProvider); resolver.Received(1).StartResolve(Arg.Any()); - this.goapAgent.Events.Received(0).GoalCompleted(this.goapAgent.CurrentGoal); + this.goapActionProvider.Events.Received(0).GoalCompleted(this.goapActionProvider.CurrentGoal); } [Test] @@ -256,8 +256,8 @@ public void Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent() var action = Substitute.For(); - this.goapAgent.CurrentGoal.Returns(goal); - this.goapAgent.Agent.ActionState.Action.ReturnsNull(); + this.goapActionProvider.CurrentGoal.Returns(goal); + this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -275,11 +275,11 @@ public void Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.goapAgent }); + runner.Run(new HashSet() { this.goapActionProvider }); runner.Complete(); // Assert - this.goapAgent.Received(1).SetAction(action, Arg.Any(), Arg.Any()); + this.goapActionProvider.Received(1).SetAction(action, Arg.Any()); } [Test] @@ -291,8 +291,8 @@ public void Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet() var action = Substitute.For(); - this.goapAgent.CurrentGoal.Returns(goal); - this.goapAgent.Agent.ActionState.Action.Returns(action); + this.goapActionProvider.CurrentGoal.Returns(goal); + this.goapActionProvider.Agent.ActionState.Action.Returns(action); var sensorRunner = Substitute.For(); @@ -310,11 +310,11 @@ public void Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet() var runner = new AgentTypeJobRunner(agentType, resolver); // Act - runner.Run(new HashSet() { this.goapAgent }); + runner.Run(new HashSet() { this.goapActionProvider }); runner.Complete(); // Assert - this.goapAgent.Received(0).SetAction(Arg.Any(), Arg.Any(), Arg.Any()); + this.goapActionProvider.Received(0).SetAction(Arg.Any(), Arg.Any()); } } } \ No newline at end of file diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalTargetSensor.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalTargetSensor.cs index 344c29cb..98100087 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalTargetSensor.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalTargetSensor.cs @@ -14,7 +14,7 @@ public override void Update() { } - public override ITarget Sense(IMonoAgent agent, IComponentReference references) + public override ITarget Sense(IActionReceiver agent, IComponentReference references) { return default; } diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalWorldSensor.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalWorldSensor.cs index 3cd9d725..c86def1f 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalWorldSensor.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalWorldSensor.cs @@ -16,7 +16,7 @@ public override void Update() { } - public override SenseValue Sense(IMonoAgent agent, IComponentReference references) + public override SenseValue Sense(IActionReceiver agent, IComponentReference references) { return default; } diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs index cec722ad..1b1cf6ef 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs @@ -32,7 +32,7 @@ public void OnAgentResolve_CallsRunAndComplete() // Arrange var agentType = Substitute.For(); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.AgentType.Returns(agentType); var jobRunner = Substitute.For(); @@ -47,7 +47,7 @@ public void OnAgentResolve_CallsRunAndComplete() this.goap.Events.OnAgentResolve += Raise.Event(agent); // Assert - jobRunner.Received(1).Run(Arg.Any>()); + jobRunner.Received(1).Run(Arg.Any>()); jobRunner.Received(1).Complete(); } } diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/MultiSensorBaseTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/MultiSensorBaseTests.cs index ef621364..92771d68 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/MultiSensorBaseTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/MultiSensorBaseTests.cs @@ -58,7 +58,7 @@ public void AddLocalAndGlobalTargetSensor_AddsSensorsCorrectly() public void Sense_CallsLocalAndGlobalSensors() { // Arrange - var localSensor = Substitute.For>(); + var localSensor = Substitute.For>(); var globalSensor = Substitute.For>(); this.multiSensorBase.AddLocalWorldSensor(localSensor); diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs index 4848f1cf..09a67961 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs @@ -13,7 +13,7 @@ public class ProactiveControllerTests private ProactiveController proactiveController; private IGoapEvents events; private Dictionary typeRunners; - private IMonoGoapAgent agent; + private IMonoGoapActionProvider actionProvider; private IAgentType agentType; private IAgentTypeJobRunner runner; @@ -23,8 +23,8 @@ public void SetUp() this.agentType = Substitute.For(); this.agentType.SensorRunner.Returns(Substitute.For()); - this.agent = Substitute.For(); - this.agent.AgentType.Returns(this.agentType); + this.actionProvider = Substitute.For(); + this.actionProvider.AgentType.Returns(this.agentType); this.events = Substitute.For(); this.runner = Substitute.For(); @@ -35,7 +35,7 @@ public void SetUp() }; this.goap = Substitute.For(); - this.goap.Agents.Returns(new List()); + this.goap.Agents.Returns(new List()); this.goap.AgentTypeRunners.Returns(this.typeRunners); this.goap.Events.Returns(this.events); @@ -46,33 +46,33 @@ public void SetUp() public void OnUpdate_ResolveActionCalledWhenResolveTimeExpired() { // Arrange - this.agent.Agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(true); + this.actionProvider.Agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(true); - this.goap.Agents.Returns(new List() { this.agent }); + this.goap.Agents.Returns(new List() { this.actionProvider }); this.proactiveController.Initialize(this.goap); // Act this.proactiveController.OnUpdate(); // Assert - this.agent.Received().ResolveAction(); + this.actionProvider.Received().ResolveAction(); } [Test] public void OnUpdate_ResolveActionNotCalledWhenResolveTimeNotExpired() { // Arrange - this.agent = Substitute.For(); - this.agent.Agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(false); + this.actionProvider = Substitute.For(); + this.actionProvider.Agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(false); - this.goap.Agents.Returns(new List() { this.agent }); + this.goap.Agents.Returns(new List() { this.actionProvider }); this.proactiveController.Initialize(this.goap); // Act this.proactiveController.OnUpdate(); // Assert - this.agent.DidNotReceive().ResolveAction(); + this.actionProvider.DidNotReceive().ResolveAction(); } [Test] @@ -85,7 +85,7 @@ public void OnUpdate_RunCalledOnAgentTypeRunners() this.proactiveController.OnUpdate(); // Assert - this.runner.Received().Run(Arg.Any>()); + this.runner.Received().Run(Arg.Any>()); } [Test] diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs index 19ebb879..71a97b2a 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs @@ -13,7 +13,7 @@ public class ReactiveControllerTests private ReactiveController controller; private IGoapEvents events; private Dictionary typeRunners; - private IMonoGoapAgent agent; + private IMonoGoapActionProvider actionProvider; private IAgentType agentType; private IAgentTypeJobRunner runner; @@ -22,8 +22,8 @@ public void SetUp() { this.agentType = Substitute.For(); - this.agent = Substitute.For(); - this.agent.AgentType.Returns(this.agentType); + this.actionProvider = Substitute.For(); + this.actionProvider.AgentType.Returns(this.agentType); this.events = Substitute.For(); this.runner = Substitute.For(); @@ -34,7 +34,7 @@ public void SetUp() }; this.goap = Substitute.For(); - this.goap.Agents.Returns(new List()); + this.goap.Agents.Returns(new List()); this.goap.AgentTypeRunners.Returns(this.typeRunners); this.goap.Events.Returns(this.events); @@ -51,7 +51,7 @@ public void OnUpdate_RunCalledOnAgentTypeRunners() this.controller.OnUpdate(); // Assert - this.runner.Received().Run(Arg.Any>()); + this.runner.Received().Run(Arg.Any>()); } [Test] diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs index 4b05b0bc..e144314d 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs @@ -61,7 +61,7 @@ public void SenseLocal_GlobalSensor_DoesntCallsSense() var runner = new SensorRunner(new IWorldSensor[] { sensor }, new ITargetSensor[] { }, new IMultiSensor[] { }, Substitute.For()); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.WorldData.Returns(new LocalWorldData()); // Act @@ -79,7 +79,7 @@ public void SenseLocal_LocalSensor_CallsSense() var runner = new SensorRunner(new IWorldSensor[] { sensor }, new ITargetSensor[] { }, new IMultiSensor[] { }, Substitute.For()); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.WorldData.Returns(new LocalWorldData()); // Act @@ -97,7 +97,7 @@ public void SenseLocal_MultiSensor_CallsSense() var runner = new SensorRunner(new IWorldSensor[] { }, new ITargetSensor[] { }, new IMultiSensor[] { sensor }, Substitute.For()); - var agent = Substitute.For(); + var agent = Substitute.For(); agent.WorldData.Returns(new LocalWorldData()); // Act @@ -128,11 +128,11 @@ public void SenseLocal_WithAgent_OnlyRunsMatchingKey() var runner = new SensorRunner(new IWorldSensor[] { matchedSensor, unMatchedSensor }, new ITargetSensor[] { }, new IMultiSensor[] { }, Substitute.For()); // Act - runner.SenseLocal(Substitute.For(), action); + runner.SenseLocal(Substitute.For(), action); // Assert - matchedSensor.Received().Sense(Arg.Any(), Arg.Any(), Arg.Any()); - unMatchedSensor.DidNotReceive().Sense(Arg.Any(), Arg.Any(), Arg.Any()); + matchedSensor.Received().Sense(Arg.Any(), Arg.Any(), Arg.Any()); + unMatchedSensor.DidNotReceive().Sense(Arg.Any(), Arg.Any(), Arg.Any()); } } } \ No newline at end of file diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs index 5b001d48..aa1af73e 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs @@ -53,7 +53,7 @@ public static IGoapAgentEvents MockEvents(this IGoapAgent agent) { var events = Substitute.For(); // Set Events property through reflection - typeof(GoapAgentBehaviour) + typeof(GoapActionProvider) .GetField("k__BackingField", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)! .SetValue(agent, events); @@ -71,12 +71,12 @@ public static IAgentEvents MockEvents(this IAgent agent) return events; } - public static void InsertAction(this GoapAgentBehaviour agent, IAction action) + public static void InsertAction(this GoapActionProvider agent, IAction action) { agent.Agent.InsertAction(action); } - public static void InsertAction(this IAgent agent, IAction action) + public static void InsertAction(this IActionReceiver agent, IAction action) { var actionState = new ActionState(); actionState.SetAction(action, action.GetData()); From 7f66517424463d741e3b638b6703995241872e0b Mon Sep 17 00:00:00 2001 From: Peter Klooster Date: Fri, 28 Jun 2024 18:27:23 +0200 Subject: [PATCH 4/6] Fixes #129 --- .../Demos/Complex/Actions/CreateItemAction.cs | 7 +++---- .../GOAP/Demos/Complex/Actions/EatAction.cs | 7 +++---- .../Demos/Complex/Actions/GatherItemAction.cs | 8 +++----- .../Demos/Complex/Actions/HaulItemAction.cs | 8 +++----- .../Demos/Complex/Actions/PickupItemAction.cs | 8 +++----- .../Demos/Complex/Actions/WanderAction.cs | 5 ++--- .../Complex/Behaviours/AgentMoveBehaviour.cs | 4 ++-- .../Complex/Behaviours/AgentSpawnBehaviour.cs | 4 ++-- .../Complex/Behaviours/AnimationBehaviour.cs | 4 ++-- .../Complex/Behaviours/ComplexAgentBrain.cs | 5 +++-- .../Behaviours/ComplexTextBehaviour.cs | 6 +++--- .../GOAP/Demos/Complex/Extensions.cs | 1 - .../Factories/Capabilities/BaseCapability.cs | 9 +++------ .../Capabilities/HungerCapability.cs | 9 +++------ .../Capabilities/WanderCapability.cs | 6 ++---- .../CleanerAgentTypeConfigFactory.cs | 9 ++++----- .../Factories/Extensions/ActionExtensions.cs | 4 ++-- .../Factories/Extensions/GoalExtensions.cs | 4 ++-- .../Extensions/TargetSensorExtensions.cs | 4 ++-- .../Extensions/WorldSensorExtensions.cs | 4 ++-- .../Factories/MinerAgentTypeConfigFactory.cs | 5 ++--- .../Factories/SmithAgentTypeConfigFactory.cs | 5 ++--- .../WoodCutterAgentTypeConfigFactory.cs | 5 ++--- .../Demos/Complex/Goals/CleanItemsGoal.cs | 2 +- .../Demos/Complex/Goals/CreateItemGoal.cs | 4 ++-- .../GOAP/Demos/Complex/Goals/FixHungerGoal.cs | 2 +- .../Demos/Complex/Goals/GatherItemGoal.cs | 4 ++-- .../Demos/Complex/Goals/PickupItemGoal.cs | 4 ++-- .../GOAP/Demos/Complex/Goals/WanderGoal.cs | 2 +- .../Complex/Goap/GoapConfigInitializer.cs | 3 +-- .../GOAP/Demos/Complex/Goap/GoapInjector.cs | 3 ++- .../Sensors/Target/ClosestItemSensor.cs | 5 ++--- .../Sensors/Target/ClosestObjectSensor.cs | 5 ++--- .../Sensors/Target/ClosestSourceSensor.cs | 5 ++--- .../Complex/Sensors/Target/TransformSensor.cs | 5 ++--- .../Sensors/Target/WanderTargetSensor.cs | 5 ++--- .../Complex/Sensors/World/IsHoldingSensor.cs | 6 +++--- .../Complex/Sensors/World/IsInWorldSensor.cs | 6 +++--- .../Sensors/World/ItemOnFloorSensor.cs | 2 +- .../Complex/Targets/ClosestSourceTarget.cs | 4 ++-- .../Demos/Complex/Targets/ClosestTarget.cs | 2 +- .../Demos/Complex/Targets/TransformTarget.cs | 2 +- .../Demos/Complex/Targets/WanderTarget.cs | 2 +- .../Demos/Complex/WorldKeys/CreatedItem.cs | 4 ++-- .../GOAP/Demos/Complex/WorldKeys/IsHolding.cs | 4 ++-- .../GOAP/Demos/Complex/WorldKeys/IsHungry.cs | 2 +- .../GOAP/Demos/Complex/WorldKeys/IsInWorld.cs | 4 ++-- .../Demos/Complex/WorldKeys/IsWandering.cs | 2 +- .../Demos/Complex/WorldKeys/ItemsOnFloor.cs | 2 +- .../GOAP/Demos/Shared/Actions/WanderAction.cs | 8 +++----- .../Shared/Behaviours/AgentMoveBehaviour.cs | 4 ++-- .../Shared/Behaviours/AnimationBehaviour.cs | 3 +-- .../GOAP/Demos/Shared/Goals/FixHungerGoal.cs | 3 ++- .../GOAP/Demos/Shared/Goals/WanderGoal.cs | 3 ++- .../Shared/Sensors/Target/TransformSensor.cs | 7 +++---- .../Sensors/Target/WanderTargetSensor.cs | 7 +++---- .../Simple/Behaviours/AgentMoveBehaviour.cs | 4 ++-- .../Simple/Behaviours/AnimationBehaviour.cs | 4 ++-- .../Simple/Behaviours/SettingsBehaviour.cs | 3 +-- .../Simple/Behaviours/SimpleAgentBrain.cs | 4 ++-- .../Behaviours/SimpleHungerBehaviour.cs | 2 +- .../Simple/Behaviours/SimpleTextBehaviour.cs | 7 ++++--- .../GOAP/Demos/Simple/Extensions.cs | 1 - .../Simple/Goap/Actions/EatAppleAction.cs | 9 +++------ .../Simple/Goap/Actions/PickupAppleAction.cs | 10 +++------- .../Simple/Goap/Actions/PluckAppleAction.cs | 11 +++-------- .../Demos/Simple/Goap/Actions/WanderAction.cs | 6 ++---- .../Goap/Factories/BaseCapabilityFactory.cs | 5 ++--- .../Demos/Simple/Goap/Goals/FixHungerGoal.cs | 3 +-- .../Demos/Simple/Goap/Goals/WanderGoal.cs | 3 +-- .../Simple/Goap/Sensors/Multi/AppleSensor.cs | 6 ++---- .../Simple/Goap/Sensors/Target/AgentSensor.cs | 6 ++---- .../Goap/Sensors/Target/ClosestTreeSensor.cs | 6 ++---- .../Goap/Sensors/Target/WanderTargetSensor.cs | 6 ++---- .../Goap/Sensors/World/IsAliveSensor.cs | 5 ++--- .../Goap/Sensors/World/IsHungrySensor.cs | 5 ++--- .../Sensors/World/ThereAreApplesSensor.cs | 5 ++--- .../Simple/Goap/TargetKeys/AgentTarget.cs | 3 +-- .../Simple/Goap/TargetKeys/ClosestApple.cs | 3 +-- .../Simple/Goap/TargetKeys/ClosestTree.cs | 3 +-- .../Simple/Goap/TargetKeys/WanderTarget.cs | 3 +-- .../Demos/Simple/Goap/WorldKeys/HasApple.cs | 3 +-- .../Demos/Simple/Goap/WorldKeys/IsHungry.cs | 3 +-- .../Simple/Goap/WorldKeys/IsWandering.cs | 3 +-- .../Simple/Goap/WorldKeys/ThereAreApples.cs | 3 +-- .../CrashKonijn.Agent.Core.csproj.DotSettings | 3 +++ ...ashKonijn.Agent.Runtime.csproj.DotSettings | 2 ++ Demo/CrashKonijn.Goap.Core.csproj.DotSettings | 3 +++ ...ashKonijn.Goap.Resolver.csproj.DotSettings | 3 +++ ...rashKonijn.Goap.Runtime.csproj.DotSettings | 19 +++++++++++++++++++ .../Attributes/ActionClassDrawer.cs | 4 ++-- .../Attributes/GoalClassDrawer.cs | 4 ++-- .../Attributes/TargetSensorDrawer.cs | 4 ++-- .../Attributes/WorldSensorDrawer.cs | 4 ++-- .../Classes/Mappers.cs | 2 +- .../Classes/Models/Node.cs | 3 +-- .../Classes/Models/NodeEffect.cs | 3 +-- .../Drawers/AgentTypeDrawer.cs | 2 +- .../Drawers/LogDrawer.cs | 3 +-- .../Drawers/ObjectDrawer.cs | 2 +- .../Drawers/SerializableEffectDrawer.cs | 4 ++-- .../Drawers/WorldDataDrawer.cs | 4 ++-- .../Elements/ActionList.cs | 4 ++-- .../Elements/ActionPropertiesElement.cs | 8 ++++---- .../Elements/CapabilityActionElement.cs | 4 ++-- .../Elements/CapabilityConditionElement.cs | 4 ++-- .../Elements/CapabilityEffectElement.cs | 4 ++-- .../Elements/CapabilityGoalElement.cs | 2 +- .../Elements/CapabilitySensorElement.cs | 3 +-- .../Elements/ClassRefField.cs | 4 ++-- .../Elements/ConditionList.cs | 4 ++-- .../Elements/EffectList.cs | 4 ++-- .../Elements/GoalList.cs | 2 +- .../Elements/SensorList.cs | 5 ++--- .../CrashKonijn.Goap.Editor/Extensions.cs | 3 ++- .../GraphViewer/ConditionElement.cs | 3 +-- .../GraphViewer/ConnectionElement.cs | 2 +- .../GraphViewer/EffectElement.cs | 2 +- .../GraphViewer/GraphViewerEditorWindow.cs | 6 ++---- .../GraphViewer/NodeElement.cs | 5 +++-- .../TypeDrawers/AgentEditor.cs | 4 ++-- .../TypeDrawers/AgentTypeConfigEditor.cs | 4 +--- .../TypeDrawers/AgentTypeFactoryBaseEditor.cs | 3 +-- .../CapabilityConfigScriptableEditor.cs | 2 +- .../TypeDrawers/GeneratorEditor.cs | 2 +- .../TypeDrawers/GoapActionProviderEditor.cs | 6 +++--- .../TypeDrawers/GoapRunnerEditor.cs | 2 +- .../CrashKonijn.Agent.Core/Delegates.cs | 4 +--- .../Enums/ActionMoveMode.cs | 2 +- .../Enums/AgentMoveState.cs | 2 +- .../Enums/AgentState.cs | 2 +- .../CrashKonijn.Agent.Core/Enums/DebugMode.cs | 2 +- .../Enums/DebugSeverity.cs | 2 +- .../Interfaces/IAction.cs | 5 +---- .../Interfaces/IActionContext.cs | 2 +- .../Interfaces/IActionData.cs | 2 +- .../Interfaces/IActionProperties.cs | 2 +- .../Interfaces/IActionProvider.cs | 2 +- .../Interfaces/IActionReceiver.cs | 2 +- .../Interfaces/IActionRequest.cs | 2 +- .../Interfaces/IActionResolver.cs | 2 +- .../Interfaces/IActionRunState.cs | 2 +- .../Interfaces/IActionState.cs | 2 +- .../Interfaces/IAgent.cs | 4 +--- .../Interfaces/IAgentDistanceObserver.cs | 2 +- .../Interfaces/IAgentEvents.cs | 2 +- .../Interfaces/IAgentTimers.cs | 2 +- .../Interfaces/IComponentReference.cs | 2 +- .../Interfaces/IDataReferenceInjector.cs | 2 +- .../Interfaces/ILogger.cs | 2 +- .../Interfaces/ILoggerConfig.cs | 4 +--- .../Interfaces/IMonoAgent.cs | 2 +- .../Interfaces/IMonoBehaviour.cs | 2 +- .../Interfaces/ITarget.cs | 6 ++---- .../Interfaces/ITimer.cs | 2 +- ...ap.meta => CrashKonijn.Agent.Runtime.meta} | 2 +- .../ActionBase.cs | 6 ++---- .../ActionBase.cs.meta | 0 .../ActionContext.cs | 4 ++-- .../ActionContext.cs.meta | 0 .../ActionProviderBase.cs | 4 ++-- .../ActionProviderBase.cs.meta | 0 .../ActionRunner.cs | 6 ++---- .../ActionRunner.cs.meta | 0 .../ActionState.cs | 4 ++-- .../ActionState.cs.meta | 0 .../AgentBehaviour.cs | 10 ++-------- .../AgentBehaviour.cs.meta | 0 .../AgentEvents.cs | 5 ++--- .../AgentEvents.cs.meta | 0 .../AgentException.cs | 2 +- .../AgentException.cs.meta | 0 .../AgentLogger.cs | 6 ++---- .../AgentLogger.cs.meta | 0 .../AgentTimers.cs | 4 ++-- .../AgentTimers.cs.meta | 0 .../DataReferenceInjector.cs | 5 ++--- .../DataReferenceInjector.cs.meta | 0 .../Extensions.cs | 2 +- .../Extensions.cs.meta | 0 .../LoggerBase.cs | 5 ++--- .../LoggerBase.cs.meta | 0 .../LoggerConfig.cs | 5 ++--- .../LoggerConfig.cs.meta | 0 .../References.meta | 0 .../References/GetComponentAttribute.cs | 2 +- .../References/GetComponentAttribute.cs.meta | 0 .../GetComponentInChildrenAttribute.cs | 2 +- .../GetComponentInChildrenAttribute.cs.meta | 0 .../GetComponentInParentAttribute.cs | 2 +- .../GetComponentInParentAttribute.cs.meta | 0 .../Timer.cs | 4 ++-- .../Timer.cs.meta | 0 .../VectorDistanceObserver.cs | 4 ++-- .../VectorDistanceObserver.cs.meta | 0 .../com.crashkonijn.agent.runtime.asmdef} | 4 ++-- ...com.crashkonijn.agent.runtime.asmdef.meta} | 0 Package/Runtime/CrashKonijn.Agent.meta | 3 --- .../CrashKonijn.Goap.Core/Delegates.cs | 4 +--- .../Enums/ClassRefStatus.cs | 2 +- .../CrashKonijn.Goap.Core/Enums/Comparison.cs | 2 +- .../CrashKonijn.Goap.Core/Enums/EffectType.cs | 2 +- .../Interfaces/IActionConfig.cs | 4 ++-- .../Interfaces/IAgentCollection.cs | 2 +- .../Interfaces/IAgentType.cs | 2 +- .../Interfaces/IAgentTypeConfig.cs | 2 +- .../IAgentTypeConfigValidatorRunner.cs | 2 +- .../Interfaces/IAgentTypeEvents.cs | 2 +- .../Interfaces/IAgentTypeJobRunner.cs | 2 +- .../Interfaces/IClassConfig.cs | 2 +- .../Interfaces/IClassRef.cs | 2 +- .../Interfaces/ICondition.cs | 4 +--- .../Interfaces/IConditionObserver.cs | 2 +- .../Interfaces/IConfig.cs | 2 +- .../Interfaces/IConnectable.cs | 2 +- .../Interfaces/ICostObserver.cs | 2 +- .../Interfaces/IEffect.cs | 2 +- .../Interfaces/IGlobalTargetSensor.cs | 2 +- .../Interfaces/IGlobalWorldData.cs | 2 +- .../Interfaces/IGlobalWorldSensor.cs | 2 +- .../CrashKonijn.Goap.Core/Interfaces/IGoal.cs | 2 +- .../Interfaces/IGoalConfig.cs | 2 +- .../CrashKonijn.Goap.Core/Interfaces/IGoap.cs | 2 +- .../Interfaces/IGoapAction.cs | 4 +++- .../Interfaces/IGoapActionProviderEvent.cs | 2 +- .../Interfaces/IGoapAgent.cs | 5 +++-- .../Interfaces/IGoapAgentEvents.cs | 4 +++- .../Interfaces/IGoapConfig.cs | 2 +- .../Interfaces/IGoapController.cs | 2 +- .../Interfaces/IGoapEvents.cs | 2 +- .../Interfaces/IGoapInjector.cs | 4 +++- .../Interfaces/IGoapResolver.cs | 2 +- .../Interfaces/IGraph.cs | 2 +- .../Interfaces/IHasConfig.cs | 2 +- .../Interfaces/IKeyResolver.cs | 2 +- .../Interfaces/ILocalTargetSensor.cs | 2 +- .../Interfaces/ILocalWorldData.cs | 2 +- .../Interfaces/ILocalWorldSensor.cs | 2 +- .../Interfaces/IMonoGoapActionProvider.cs | 4 +++- .../Interfaces/IMultiSensor.cs | 3 ++- .../Interfaces/IMultiSensorConfig.cs | 2 +- .../CrashKonijn.Goap.Core/Interfaces/INode.cs | 2 +- .../Interfaces/INodeCondition.cs | 2 +- .../Interfaces/INodeEffect.cs | 2 +- .../Interfaces/ISensorRunner.cs | 2 +- .../Interfaces/ITargetKey.cs | 2 +- .../Interfaces/ITargetSensor.cs | 2 +- .../Interfaces/ITargetSensorConfig.cs | 2 +- .../Interfaces/IValidationResults.cs | 2 +- .../Interfaces/IValidator.cs | 2 +- .../Interfaces/IWorldData.cs | 4 ++-- .../Interfaces/IWorldKey.cs | 2 +- .../Interfaces/IWorldSensor.cs | 2 +- .../Interfaces/IWorldSensorConfig.cs | 2 +- .../ConditionBuilder.cs | 3 +-- .../CrashKonijn.Goap.Resolver/CostBuilder.cs | 3 +-- .../EnabledBuilder.cs | 3 +-- .../ExecutableBuilder.cs | 3 +-- .../CrashKonijn.Goap.Resolver/Extensions.cs | 4 +--- .../CrashKonijn.Goap.Resolver/GraphBuilder.cs | 4 +--- .../GraphResolver.cs | 5 +---- .../GraphResolverJob.cs | 1 - .../Interfaces/IConditionBuilder.cs | 4 ++-- .../Interfaces/ICostBuilder.cs | 4 ++-- .../Interfaces/IEnabledBuilder.cs | 4 ++-- .../Interfaces/IExecutableBuilder.cs | 4 ++-- .../Interfaces/IGraphResolver.cs | 5 ++--- .../Interfaces/IPositionBuilder.cs | 4 ++-- .../Interfaces/IResolveHandle.cs | 4 ++-- .../CrashKonijn.Goap.Resolver/Models/Graph.cs | 5 ++--- .../CrashKonijn.Goap.Resolver/Models/Node.cs | 6 ++---- .../Models/NodeCondition.cs | 4 ++-- .../Models/NodeEffect.cs | 4 ++-- .../PositionBuilder.cs | 3 +-- .../ResolveHandle.cs | 4 +--- Package/Runtime/CrashKonijn.Goap.Runtime.meta | 8 ++++++++ .../Attributes.meta | 0 .../Attributes/ActionClassAttribute.cs | 2 +- .../Attributes/ActionClassAttribute.cs.meta | 0 .../Attributes/GoalClassAttribute.cs | 2 +- .../Attributes/GoalClassAttribute.cs.meta | 0 .../Attributes/GoapIdAttribute.cs | 2 +- .../Attributes/GoapIdAttribute.cs.meta | 0 .../Attributes/TargetSensorAttribute.cs | 2 +- .../Attributes/TargetSensorAttribute.cs.meta | 0 .../Attributes/WorldSensorAttribute.cs | 2 +- .../Attributes/WorldSensorAttribute.cs.meta | 0 .../Behaviours.meta | 0 .../Behaviours/AgentCollection.cs | 5 ++--- .../Behaviours/AgentCollection.cs.meta | 0 .../Behaviours/AgentTypeBehaviour.cs | 6 ++---- .../Behaviours/AgentTypeBehaviour.cs.meta | 0 .../Behaviours/AgentTypeEvents.cs | 6 ++---- .../Behaviours/AgentTypeEvents.cs.meta | 0 .../Behaviours/AgentTypeFactoryBase.cs | 4 ++-- .../Behaviours/AgentTypeFactoryBase.cs.meta | 0 .../Behaviours/GoalBase.cs | 5 ++--- .../Behaviours/GoalBase.cs.meta | 0 .../Behaviours/GoapActionBase.cs | 7 ++++--- .../Behaviours/GoapActionBase.cs.meta | 0 .../Behaviours/GoapActionProvider.cs | 8 ++++---- .../Behaviours/GoapActionProvider.cs.meta | 0 .../Behaviours/GoapAgentEvents.cs | 6 +++--- .../Behaviours/GoapAgentEvents.cs.meta | 0 .../Behaviours/GoapBehaviour.cs | 9 ++++----- .../Behaviours/GoapBehaviour.cs.meta | 0 .../Behaviours/GoapConfigBase.cs | 5 ++--- .../Behaviours/GoapConfigBase.cs.meta | 0 .../Behaviours/GoapEvents.cs | 3 +-- .../Behaviours/GoapEvents.cs.meta | 0 .../Behaviours/GoapSetBehaviour.cs | 6 ++---- .../Behaviours/GoapSetBehaviour.cs.meta | 0 .../Behaviours/ManualControllerBehaviour.cs | 6 ++---- .../ManualControllerBehaviour.cs.meta | 0 .../ProactiveControllerBehaviour.cs | 7 ++----- .../ProactiveControllerBehaviour.cs.meta | 0 .../Behaviours/ReactiveControllerBehaviour.cs | 5 ++--- .../ReactiveControllerBehaviour.cs.meta | 0 .../Behaviours/TargetKeyBase.cs | 4 ++-- .../Behaviours/TargetKeyBase.cs.meta | 0 .../Behaviours/WorldKeyBase.cs | 4 ++-- .../Behaviours/WorldKeyBase.cs.meta | 0 .../ClassScanner.cs | 7 +++---- .../ClassScanner.cs.meta | 0 .../Classes.meta | 0 .../Classes/AgentType.cs | 6 ++---- .../Classes/AgentType.cs.meta | 0 .../Classes/AgentTypeFactory.cs | 8 ++------ .../Classes/AgentTypeFactory.cs.meta | 0 .../Classes/Builders.meta | 0 .../Classes/Builders/ActionBuilder.cs | 11 ++++------- .../Classes/Builders/ActionBuilder.cs.meta | 0 .../Classes/Builders/AgentTypeBuilder.cs | 6 +++--- .../Classes/Builders/AgentTypeBuilder.cs.meta | 0 .../Classes/Builders/GoalBuilder.cs | 7 ++----- .../Classes/Builders/GoalBuilder.cs.meta | 0 .../Classes/Builders/KeyBuilderBase.cs | 2 +- .../Classes/Builders/KeyBuilderBase.cs.meta | 0 .../Classes/Builders/MultiSensorBuilder.cs | 5 ++--- .../Builders/MultiSensorBuilder.cs.meta | 0 .../Classes/Builders/TargetKeyBuilder.cs | 4 ++-- .../Classes/Builders/TargetKeyBuilder.cs.meta | 0 .../Classes/Builders/TargetSensorBuilder.cs | 5 ++--- .../Builders/TargetSensorBuilder.cs.meta | 0 .../Classes/Builders/WorldKeyBuilder.cs | 6 ++---- .../Classes/Builders/WorldKeyBuilder.cs.meta | 0 .../Classes/Builders/WorldSensorBuilder.cs | 5 ++--- .../Builders/WorldSensorBuilder.cs.meta | 0 .../Classes/CapabilityFactory.cs | 4 ++-- .../Classes/CapabilityFactory.cs.meta | 0 .../Classes/Condition.cs | 6 ++---- .../Classes/Condition.cs.meta | 0 .../Classes/Controllers.meta | 0 .../Classes/Controllers/ManualController.cs | 4 ++-- .../Controllers/ManualController.cs.meta | 0 .../Controllers/ProactiveController.cs | 4 ++-- .../Controllers/ProactiveController.cs.meta | 0 .../Classes/Controllers/ReactiveController.cs | 4 ++-- .../Controllers/ReactiveController.cs.meta | 0 .../Classes/Effect.cs | 4 ++-- .../Classes/Effect.cs.meta | 0 .../Classes/GoapAgentLogger.cs | 8 ++++---- .../Classes/GoapAgentLogger.cs.meta | 0 .../Classes/GoapConfig.cs | 9 +++------ .../Classes/GoapConfig.cs.meta | 0 .../Classes/Injectors.meta | 0 .../Classes/Injectors/DefaultGoapInjector.cs} | 7 ++++--- .../Injectors/DefaultGoapInjector.cs.meta} | 0 .../Classes/PositionTarget.cs | 5 ++--- .../Classes/PositionTarget.cs.meta | 0 .../Classes/RunStates.meta | 0 .../Classes/RunStates/ActionRunState.cs | 4 ++-- .../Classes/RunStates/ActionRunState.cs.meta | 0 .../RunStates/CompletedActionRunState.cs | 4 ++-- .../RunStates/CompletedActionRunState.cs.meta | 0 .../RunStates/ContinueActionRunState.cs | 4 ++-- .../RunStates/ContinueActionRunState.cs.meta | 0 .../ContinueOrResolveActionRunState.cs | 4 ++-- .../ContinueOrResolveActionRunState.cs.meta | 0 .../Classes/RunStates/StopActionRunState.cs | 4 ++-- .../RunStates/StopActionRunState.cs.meta | 0 .../Classes/RunStates/WaitActionRunState.cs | 4 ++-- .../RunStates/WaitActionRunState.cs.meta | 0 .../WaitThenCompleteActionRunState.cs | 4 ++-- .../WaitThenCompleteActionRunState.cs.meta | 0 .../RunStates/WaitThenStopActionRunState.cs | 4 ++-- .../WaitThenStopActionRunState.cs.meta | 0 .../Classes/Runners.meta | 0 .../Classes/Runners/AgentTypeJobRunner.cs | 5 ++--- .../Runners/AgentTypeJobRunner.cs.meta | 0 .../Classes/Runners/Goap.cs | 5 ++--- .../Classes/Runners/Goap.cs.meta | 0 .../Classes/Runners/SensorRunner.cs | 4 ++-- .../Classes/Runners/SensorRunner.cs.meta | 0 .../Classes/TransformTarget.cs | 5 ++--- .../Classes/TransformTarget.cs.meta | 0 .../Classes/Validators.meta | 0 .../Validators/ActionClassTypeValidator.cs | 4 ++-- .../ActionClassTypeValidator.cs.meta | 0 .../Validators/ActionConditionKeyValidator.cs | 4 ++-- .../ActionConditionKeyValidator.cs.meta | 0 .../Validators/ActionEffectKeyValidator.cs | 4 ++-- .../ActionEffectKeyValidator.cs.meta | 0 .../Validators/ActionEffectsValidator.cs | 4 ++-- .../Validators/ActionEffectsValidator.cs.meta | 0 .../Validators/ActionTargetValidator.cs | 4 ++-- .../Validators/ActionTargetValidator.cs.meta | 0 .../AgentTypeConfigValidatorRunner.cs | 4 ++-- .../AgentTypeConfigValidatorRunner.cs.meta | 0 .../Validators/GoalClassTypeValidator.cs | 4 ++-- .../Validators/GoalClassTypeValidator.cs.meta | 0 .../Validators/GoalConditionKeyValidator.cs | 4 ++-- .../GoalConditionKeyValidator.cs.meta | 0 .../Validators/GoalConditionsValidator.cs | 4 ++-- .../GoalConditionsValidator.cs.meta | 0 .../Validators/TargetKeySensorsValidator.cs | 4 ++-- .../TargetKeySensorsValidator.cs.meta | 0 .../TargetSensorClassTypeValidator.cs | 4 ++-- .../TargetSensorClassTypeValidator.cs.meta | 0 .../Validators/TargetSensorKeyValidator.cs | 4 ++-- .../TargetSensorKeyValidator.cs.meta | 0 .../Classes/Validators/ValidationResults.cs | 4 ++-- .../Validators/ValidationResults.cs.meta | 0 .../Validators/WorldKeySensorsValidator.cs | 4 ++-- .../WorldKeySensorsValidator.cs.meta | 0 .../WorldSensorClassTypeValidator.cs | 4 ++-- .../WorldSensorClassTypeValidator.cs.meta | 0 .../Validators/WorldSensorKeyValidator.cs | 4 ++-- .../WorldSensorKeyValidator.cs.meta | 0 .../Configs.meta | 0 .../Configs/ActionConfig.cs | 6 +++--- .../Configs/ActionConfig.cs.meta | 0 .../Configs/AgentTypeConfig.cs | 4 ++-- .../Configs/AgentTypeConfig.cs.meta | 0 .../Configs/GoalConfig.cs | 4 ++-- .../Configs/GoalConfig.cs.meta | 0 .../Configs/MultiSensorConfig.cs | 4 ++-- .../Configs/MultiSensorConfig.cs.meta | 0 .../Configs/TargetKey.cs | 4 ++-- .../Configs/TargetKey.cs.meta | 0 .../Configs/TargetSensorConfig.cs | 4 ++-- .../Configs/TargetSensorConfig.cs.meta | 0 .../Configs/WorldKey.cs | 4 ++-- .../Configs/WorldKey.cs.meta | 0 .../Configs/WorldSensorConfig.cs | 4 ++-- .../Configs/WorldSensorConfig.cs.meta | 0 .../Exceptions.meta | 0 .../Exceptions/GoapException.cs | 2 +- .../Exceptions/GoapException.cs.meta | 0 .../Extensions.cs | 8 +++----- .../Extensions.cs.meta | 0 .../Generators.meta | 0 .../Generators/ClassGenerator.cs | 3 +-- .../Generators/ClassGenerator.cs.meta | 0 .../Generators/Templates.meta | 0 .../Generators/Templates/action.template | 0 .../Generators/Templates/action.template.meta | 0 .../Generators/Templates/goal.template | 0 .../Generators/Templates/goal.template.meta | 0 .../Templates/multi-sensor.template | 0 .../Templates/multi-sensor.template.meta | 0 .../Generators/Templates/target-key.template | 0 .../Templates/target-key.template.meta | 0 .../Generators/Templates/world-key.template | 0 .../Templates/world-key.template.meta | 0 .../GlobalWorldData.cs | 5 +++-- .../GlobalWorldData.cs.meta | 0 .../LocalWorldData.cs | 5 +++-- .../LocalWorldData.cs.meta | 0 .../Observers.meta | 0 .../Observers/ConditionObserver.cs | 4 ++-- .../Observers/ConditionObserver.cs.meta | 0 .../Observers/ConditionObserverBase.cs | 4 ++-- .../Observers/ConditionObserverBase.cs.meta | 0 .../Resolvers.meta | 0 .../Resolvers/ClassResolver.cs | 4 ++-- .../Resolvers/ClassResolver.cs.meta | 0 .../Resolvers/KeyResolver.cs | 7 +++---- .../Resolvers/KeyResolver.cs.meta | 0 .../Resolvers/KeyResolverBase.cs | 5 +++-- .../Resolvers/KeyResolverBase.cs.meta | 0 .../ScriptIdValidator.cs | 5 ++--- .../ScriptIdValidator.cs.meta | 0 .../Scriptables.meta | 0 .../Scriptables/ActionConfigScriptable.cs | 8 +++----- .../ActionConfigScriptable.cs.meta | 0 .../Scriptables/AgentTypeScriptable.cs | 6 ++---- .../Scriptables/AgentTypeScriptable.cs.meta | 0 .../Scriptables/CapabilityConfigScriptable.cs | 8 +++----- .../CapabilityConfigScriptable.cs.meta | 0 .../Scriptables/GeneratorScriptable.cs | 3 +-- .../Scriptables/GeneratorScriptable.cs.meta | 0 .../Scriptables/GoalConfigScriptable.cs | 6 ++---- .../Scriptables/GoalConfigScriptable.cs.meta | 0 .../Scriptables/GoapSetConfigScriptable.cs | 5 ++--- .../GoapSetConfigScriptable.cs.meta | 0 .../Scriptables/TargetKeyScriptable.cs | 4 ++-- .../Scriptables/TargetKeyScriptable.cs.meta | 0 .../TargetSensorConfigScriptable.cs | 5 ++--- .../TargetSensorConfigScriptable.cs.meta | 0 .../Scriptables/WorldKeyScriptable.cs | 4 ++-- .../Scriptables/WorldKeyScriptable.cs.meta | 0 .../WorldSensorConfigScriptable.cs | 5 ++--- .../WorldSensorConfigScriptable.cs.meta | 0 .../Sensors.meta | 0 .../Sensors/GlobalTargetSensorBase.cs | 6 +++--- .../Sensors/GlobalTargetSensorBase.cs.meta | 0 .../Sensors/GlobalWorldSensorBase.cs | 5 +---- .../Sensors/GlobalWorldSensorBase.cs.meta | 0 .../Sensors/LocalTargetSensorBase.cs | 6 +++--- .../Sensors/LocalTargetSensorBase.cs.meta | 0 .../Sensors/LocalWorldSensorBase.cs | 6 ++---- .../Sensors/LocalWorldSensorBase.cs.meta | 0 .../Sensors/MultiSensorBase.cs | 5 ++--- .../Sensors/MultiSensorBase.cs.meta | 0 .../Serializables.meta | 0 .../Serializables/SerializableCondition.cs | 7 ++----- .../SerializableCondition.cs.meta | 0 .../Serializables/SerializableEffect.cs | 5 ++--- .../Serializables/SerializableEffect.cs.meta | 0 .../WorldDataBase.cs | 6 +++--- .../WorldDataBase.cs.meta | 0 .../WorldSensorBase.cs | 4 ++-- .../WorldSensorBase.cs.meta | 0 .../com.crashkonijn.goap.runtime.asmdef} | 4 ++-- .../com.crashkonijn.goap.runtime.asmdef.meta} | 0 .../UnitTests/ActionRunnerTests.cs | 9 ++++----- .../UnitTests/AgentBehaviourTests.cs | 8 ++++---- .../UnitTests/AgentTypeJobRunnerTests.cs | 9 ++++----- .../UnitTests/ClassResolverTests.cs | 5 ++--- .../UnitTests/Classes/TestAction.cs | 7 ++----- .../UnitTests/Classes/TestGoal.cs | 2 +- .../UnitTests/Classes/TestKeys.cs | 3 +-- .../UnitTests/ConditionObserverTests.cs | 7 ++----- .../UnitTests/Data/Action.cs | 5 ++--- .../UnitTests/Data/Goal.cs | 2 +- .../UnitTests/Data/LocalTargetSensor.cs | 5 ++--- .../UnitTests/Data/LocalWorldSensor.cs | 6 ++---- .../UnitTests/Data/StringCondition.cs | 4 +--- .../UnitTests/Data/StringEffect.cs | 4 +--- .../UnitTests/Data/TestConditionObserver.cs | 3 +-- .../UnitTests/Data/TestConnection.cs | 4 +--- .../UnitTests/Data/TestKeyResolver.cs | 3 +-- .../UnitTests/GraphResolverTests.cs | 3 +-- .../UnitTests/Interfaces/ITestAction.cs | 2 +- .../UnitTests/Interfaces/ITestGoal.cs | 2 +- .../UnitTests/ManualControllerTests.cs | 3 +-- .../UnitTests/MultiSensorBaseTests.cs | 4 ++-- .../UnitTests/ProactiveControllerTests.cs | 4 ++-- .../UnitTests/ReactiveControllerTests.cs | 4 ++-- .../UnitTests/SensorRunnerTests.cs | 5 +++-- .../UnitTests/Support/Extensions.cs | 7 ++++--- .../TargetKeySensorsValidatorTests.cs | 4 ++-- .../WorldKeySensorsValidatorTests.cs | 4 ++-- .../UnitTests/WorldDataBaseTests.cs | 7 +++---- .../com.crashkonijn.goap.tests.asmdef | 6 +++--- 556 files changed, 724 insertions(+), 893 deletions(-) create mode 100644 Demo/CrashKonijn.Agent.Core.csproj.DotSettings create mode 100644 Demo/CrashKonijn.Agent.Runtime.csproj.DotSettings create mode 100644 Demo/CrashKonijn.Goap.Core.csproj.DotSettings create mode 100644 Demo/CrashKonijn.Goap.Resolver.csproj.DotSettings create mode 100644 Demo/CrashKonijn.Goap.Runtime.csproj.DotSettings rename Package/Runtime/{CrashKonijn.Goap.meta => CrashKonijn.Agent.Runtime.meta} (77%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionBase.cs (95%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionContext.cs (66%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionContext.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionProviderBase.cs (69%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionProviderBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionRunner.cs (97%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionRunner.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionState.cs (88%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/ActionState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentBehaviour.cs (95%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentBehaviour.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentEvents.cs (94%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentEvents.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentException.cs (81%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentException.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentLogger.cs (94%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentLogger.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentTimers.cs (72%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/AgentTimers.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/DataReferenceInjector.cs (98%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/DataReferenceInjector.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/Extensions.cs (94%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/Extensions.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/LoggerBase.cs (96%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/LoggerBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/LoggerConfig.cs (74%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/LoggerConfig.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/References.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/References/GetComponentAttribute.cs (74%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/References/GetComponentAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/References/GetComponentInChildrenAttribute.cs (75%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/References/GetComponentInChildrenAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/References/GetComponentInParentAttribute.cs (75%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/References/GetComponentInParentAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/Timer.cs (85%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/Timer.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/VectorDistanceObserver.cs (83%) rename Package/Runtime/{CrashKonijn.Agent => CrashKonijn.Agent.Runtime}/VectorDistanceObserver.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Agent/com.crashkonijn.agent.asmdef => CrashKonijn.Agent.Runtime/com.crashkonijn.agent.runtime.asmdef} (78%) rename Package/Runtime/{CrashKonijn.Agent/com.crashkonijn.agent.asmdef.meta => CrashKonijn.Agent.Runtime/com.crashkonijn.agent.runtime.asmdef.meta} (100%) delete mode 100644 Package/Runtime/CrashKonijn.Agent.meta create mode 100644 Package/Runtime/CrashKonijn.Goap.Runtime.meta rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/ActionClassAttribute.cs (71%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/ActionClassAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/GoalClassAttribute.cs (71%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/GoalClassAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/GoapIdAttribute.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/GoapIdAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/TargetSensorAttribute.cs (71%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/TargetSensorAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/WorldSensorAttribute.cs (71%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Attributes/WorldSensorAttribute.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/AgentCollection.cs (93%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/AgentCollection.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/AgentTypeBehaviour.cs (80%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/AgentTypeBehaviour.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/AgentTypeEvents.cs (95%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/AgentTypeEvents.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/AgentTypeFactoryBase.cs (64%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/AgentTypeFactoryBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoalBase.cs (85%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoalBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapActionBase.cs (95%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapActionBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapActionProvider.cs (96%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapActionProvider.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapAgentEvents.cs (96%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapAgentEvents.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapBehaviour.cs (93%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapBehaviour.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapConfigBase.cs (61%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapConfigBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapEvents.cs (97%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapEvents.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapSetBehaviour.cs (78%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/GoapSetBehaviour.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/ManualControllerBehaviour.cs (78%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/ManualControllerBehaviour.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/ProactiveControllerBehaviour.cs (81%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/ProactiveControllerBehaviour.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/ReactiveControllerBehaviour.cs (82%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/ReactiveControllerBehaviour.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/TargetKeyBase.cs (57%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/TargetKeyBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/WorldKeyBase.cs (57%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Behaviours/WorldKeyBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/ClassScanner.cs (96%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/ClassScanner.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/AgentType.cs (94%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/AgentType.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/AgentTypeFactory.cs (94%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/AgentTypeFactory.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/ActionBuilder.cs (95%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/ActionBuilder.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/AgentTypeBuilder.cs (98%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/AgentTypeBuilder.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/GoalBuilder.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/GoalBuilder.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/KeyBuilderBase.cs (93%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/KeyBuilderBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/MultiSensorBuilder.cs (87%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/MultiSensorBuilder.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/TargetKeyBuilder.cs (79%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/TargetKeyBuilder.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/TargetSensorBuilder.cs (90%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/TargetSensorBuilder.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/WorldKeyBuilder.cs (61%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/WorldKeyBuilder.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/WorldSensorBuilder.cs (90%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Builders/WorldSensorBuilder.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/CapabilityFactory.cs (84%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/CapabilityFactory.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Condition.cs (75%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Condition.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Controllers.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Controllers/ManualController.cs (91%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Controllers/ManualController.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Controllers/ProactiveController.cs (96%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Controllers/ProactiveController.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Controllers/ReactiveController.cs (96%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Controllers/ReactiveController.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Effect.cs (64%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Effect.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/GoapAgentLogger.cs (90%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/GoapAgentLogger.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/GoapConfig.cs (64%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/GoapConfig.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Injectors.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/Classes/Injectors/GoapInjector.cs => CrashKonijn.Goap.Runtime/Classes/Injectors/DefaultGoapInjector.cs} (57%) rename Package/Runtime/{CrashKonijn.Goap/Classes/Injectors/GoapInjector.cs.meta => CrashKonijn.Goap.Runtime/Classes/Injectors/DefaultGoapInjector.cs.meta} (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/PositionTarget.cs (70%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/PositionTarget.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/ActionRunState.cs (90%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/ActionRunState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/CompletedActionRunState.cs (87%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/CompletedActionRunState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/ContinueActionRunState.cs (87%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/ContinueActionRunState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/ContinueOrResolveActionRunState.cs (87%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/ContinueOrResolveActionRunState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/StopActionRunState.cs (87%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/StopActionRunState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/WaitActionRunState.cs (91%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/WaitActionRunState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/WaitThenCompleteActionRunState.cs (91%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/WaitThenCompleteActionRunState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/WaitThenStopActionRunState.cs (91%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/RunStates/WaitThenStopActionRunState.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Runners.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Runners/AgentTypeJobRunner.cs (98%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Runners/AgentTypeJobRunner.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Runners/Goap.cs (95%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Runners/Goap.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Runners/SensorRunner.cs (98%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Runners/SensorRunner.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/TransformTarget.cs (83%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/TransformTarget.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionClassTypeValidator.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionClassTypeValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionConditionKeyValidator.cs (90%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionConditionKeyValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionEffectKeyValidator.cs (90%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionEffectKeyValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionEffectsValidator.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionEffectsValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionTargetValidator.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ActionTargetValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/AgentTypeConfigValidatorRunner.cs (94%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/AgentTypeConfigValidatorRunner.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/GoalClassTypeValidator.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/GoalClassTypeValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/GoalConditionKeyValidator.cs (89%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/GoalConditionKeyValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/GoalConditionsValidator.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/GoalConditionsValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/TargetKeySensorsValidator.cs (95%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/TargetKeySensorsValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/TargetSensorClassTypeValidator.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/TargetSensorClassTypeValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/TargetSensorKeyValidator.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/TargetSensorKeyValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ValidationResults.cs (93%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/ValidationResults.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/WorldKeySensorsValidator.cs (95%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/WorldKeySensorsValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/WorldSensorClassTypeValidator.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/WorldSensorClassTypeValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/WorldSensorKeyValidator.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Classes/Validators/WorldSensorKeyValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/ActionConfig.cs (83%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/ActionConfig.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/AgentTypeConfig.cs (93%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/AgentTypeConfig.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/GoalConfig.cs (90%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/GoalConfig.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/MultiSensorConfig.cs (67%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/MultiSensorConfig.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/TargetKey.cs (70%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/TargetKey.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/TargetSensorConfig.cs (89%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/TargetSensorConfig.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/WorldKey.cs (70%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/WorldKey.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/WorldSensorConfig.cs (89%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Configs/WorldSensorConfig.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Exceptions.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Exceptions/GoapException.cs (80%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Exceptions/GoapException.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Extensions.cs (97%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Extensions.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/ClassGenerator.cs (98%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/ClassGenerator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/action.template (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/action.template.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/goal.template (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/goal.template.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/multi-sensor.template (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/multi-sensor.template.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/target-key.template (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/target-key.template.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/world-key.template (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Generators/Templates/world-key.template.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/GlobalWorldData.cs (85%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/GlobalWorldData.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/LocalWorldData.cs (89%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/LocalWorldData.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Observers.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Observers/ConditionObserver.cs (76%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Observers/ConditionObserver.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Observers/ConditionObserverBase.cs (80%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Observers/ConditionObserverBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Resolvers.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Resolvers/ClassResolver.cs (94%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Resolvers/ClassResolver.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Resolvers/KeyResolver.cs (89%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Resolvers/KeyResolver.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Resolvers/KeyResolverBase.cs (91%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Resolvers/KeyResolverBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/ScriptIdValidator.cs (98%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/ScriptIdValidator.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/ActionConfigScriptable.cs (87%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/ActionConfigScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/AgentTypeScriptable.cs (88%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/AgentTypeScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/CapabilityConfigScriptable.cs (97%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/CapabilityConfigScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/GeneratorScriptable.cs (96%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/GeneratorScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/GoalConfigScriptable.cs (83%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/GoalConfigScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/GoapSetConfigScriptable.cs (90%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/GoapSetConfigScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/TargetKeyScriptable.cs (70%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/TargetKeyScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/TargetSensorConfigScriptable.cs (80%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/TargetSensorConfigScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/WorldKeyScriptable.cs (70%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/WorldKeyScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/WorldSensorConfigScriptable.cs (80%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Scriptables/WorldSensorConfigScriptable.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/GlobalTargetSensorBase.cs (86%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/GlobalTargetSensorBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/GlobalWorldSensorBase.cs (82%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/GlobalWorldSensorBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/LocalTargetSensorBase.cs (86%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/LocalTargetSensorBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/LocalWorldSensorBase.cs (83%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/LocalWorldSensorBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/MultiSensorBase.cs (98%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Sensors/MultiSensorBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Serializables.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Serializables/SerializableCondition.cs (67%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Serializables/SerializableCondition.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Serializables/SerializableEffect.cs (71%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/Serializables/SerializableEffect.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/WorldDataBase.cs (96%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/WorldDataBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/WorldSensorBase.cs (76%) rename Package/Runtime/{CrashKonijn.Goap => CrashKonijn.Goap.Runtime}/WorldSensorBase.cs.meta (100%) rename Package/Runtime/{CrashKonijn.Goap/com.crashkonijn.goap.asmdef => CrashKonijn.Goap.Runtime/com.crashkonijn.goap.runtime.asmdef} (85%) rename Package/Runtime/{CrashKonijn.Goap/com.crashkonijn.goap.asmdef.meta => CrashKonijn.Goap.Runtime/com.crashkonijn.goap.runtime.asmdef.meta} (100%) diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/CreateItemAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/CreateItemAction.cs index f925a9ae..a58ae68e 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/CreateItemAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/CreateItemAction.cs @@ -1,13 +1,12 @@ using System; using System.Linq; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Classes.Items; using CrashKonijn.Goap.Demos.Complex.Goap; using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; using UnityEngine; using Random = UnityEngine.Random; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs index 105bf7ec..f32072fc 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs @@ -1,11 +1,10 @@ using System.Linq; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Goap; using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Actions { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/GatherItemAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/GatherItemAction.cs index 361f585e..a75cbd08 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/GatherItemAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/GatherItemAction.cs @@ -1,12 +1,10 @@ using System; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Goap; using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; using UnityEngine; using Random = UnityEngine.Random; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/HaulItemAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/HaulItemAction.cs index 6c42f080..b9560ba3 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/HaulItemAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/HaulItemAction.cs @@ -1,13 +1,11 @@ using System.Linq; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Classes.Sources; using CrashKonijn.Goap.Demos.Complex.Goap; using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Actions diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs index 1bc489df..85ed4688 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/PickupItemAction.cs @@ -1,12 +1,10 @@ using System.Linq; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Goap; using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Actions { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/WanderAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/WanderAction.cs index ed613bd8..955efcec 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/WanderAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/WanderAction.cs @@ -1,7 +1,6 @@ using System; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; using Random = UnityEngine.Random; namespace CrashKonijn.Goap.Demos.Complex.Actions diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentMoveBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentMoveBehaviour.cs index e9f054d2..ea307a41 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentMoveBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentMoveBehaviour.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Behaviours diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs index 793952b3..a640f6bc 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Classes; +using CrashKonijn.Goap.Runtime; using UnityEngine; using Random = UnityEngine.Random; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AnimationBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AnimationBehaviour.cs index bf4d0f24..83419e8f 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AnimationBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AnimationBehaviour.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Behaviours diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs index 531cc234..f27f3f06 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs @@ -1,7 +1,8 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Classes.Items; using CrashKonijn.Goap.Demos.Complex.Goals; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Behaviours diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs index 8c9f548e..e9cbce23 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Validators; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Runtime; using TMPro; using UnityEngine; @@ -35,7 +35,7 @@ private string GetText() if (this.actionProvider.Agent.ActionState.Action is null) return $"{this.GetTypeText()}\nIdle"; - return $"{this.GetTypeText()}\n{this.actionProvider.CurrentGoal.GetType().GetGenericTypeName()}\n{this.actionProvider.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; + return $"{this.GetTypeText()}\n{Runtime.Extensions.GetGenericTypeName(this.actionProvider.CurrentGoal.GetType())}\n{Runtime.Extensions.GetGenericTypeName(this.actionProvider.Agent.ActionState.Action.GetType())}\n{this.agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; } private string GetTypeText() diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Extensions.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Extensions.cs index 4d72ac52..c793daa6 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Extensions.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Extensions.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Behaviours; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/BaseCapability.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/BaseCapability.cs index 5cc680cd..d9dc4e81 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/BaseCapability.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/BaseCapability.cs @@ -1,9 +1,6 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Demos.Complex.Factories.Extensions; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Sensors.Target; -using TransformTarget = CrashKonijn.Goap.Demos.Complex.Targets.TransformTarget; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories.Capabilities { @@ -14,7 +11,7 @@ public override ICapabilityConfig Create() var builder = new CapabilityBuilder("BaseCapability"); builder.AddTargetSensor() - .SetTarget(); + .SetTarget(); return builder.Build(); } diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/HungerCapability.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/HungerCapability.cs index 60202311..2db1c4bd 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/HungerCapability.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/HungerCapability.cs @@ -1,7 +1,4 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Actions; using CrashKonijn.Goap.Demos.Complex.Classes.Items; using CrashKonijn.Goap.Demos.Complex.Factories.Extensions; @@ -9,7 +6,7 @@ using CrashKonijn.Goap.Demos.Complex.Interfaces; using CrashKonijn.Goap.Demos.Complex.Targets; using CrashKonijn.Goap.Demos.Complex.WorldKeys; -using TransformTarget = CrashKonijn.Goap.Demos.Complex.Targets.TransformTarget; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories.Capabilities { @@ -25,7 +22,7 @@ public override ICapabilityConfig Create() // Actions builder.AddAction() - .SetTarget() + .SetTarget() .AddEffect(EffectType.Decrease) .AddCondition>(Comparison.GreaterThanOrEqual, 1); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/WanderCapability.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/WanderCapability.cs index 6724b79e..5fe8b586 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/WanderCapability.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/WanderCapability.cs @@ -1,13 +1,11 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Actions; using CrashKonijn.Goap.Demos.Complex.Factories.Extensions; using CrashKonijn.Goap.Demos.Complex.Goals; using CrashKonijn.Goap.Demos.Complex.Sensors.Target; using CrashKonijn.Goap.Demos.Complex.Targets; using CrashKonijn.Goap.Demos.Complex.WorldKeys; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories.Capabilities { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/CleanerAgentTypeConfigFactory.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/CleanerAgentTypeConfigFactory.cs index 42eabcaf..4a1ee5f2 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/CleanerAgentTypeConfigFactory.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/CleanerAgentTypeConfigFactory.cs @@ -1,7 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Actions; using CrashKonijn.Goap.Demos.Complex.Classes; using CrashKonijn.Goap.Demos.Complex.Factories.Capabilities; @@ -9,6 +7,7 @@ using CrashKonijn.Goap.Demos.Complex.Sensors.World; using CrashKonijn.Goap.Demos.Complex.Targets; using CrashKonijn.Goap.Demos.Complex.WorldKeys; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories { @@ -28,7 +27,7 @@ public override IAgentTypeConfig Create() .AddCondition(Comparison.SmallerThanOrEqual, 0); capability.AddAction() - .SetTarget() + .SetTarget() .AddEffect(EffectType.Decrease) .AddCondition(Comparison.GreaterThanOrEqual, 1) .SetMoveMode(ActionMoveMode.PerformWhileMoving); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/ActionExtensions.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/ActionExtensions.cs index a2b8ae4e..d83a9f11 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/ActionExtensions.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/ActionExtensions.cs @@ -1,6 +1,5 @@ using System; -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Actions; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Classes.Items; @@ -8,6 +7,7 @@ using CrashKonijn.Goap.Demos.Complex.Interfaces; using CrashKonijn.Goap.Demos.Complex.Targets; using CrashKonijn.Goap.Demos.Complex.WorldKeys; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories.Extensions { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/GoalExtensions.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/GoalExtensions.cs index dc1383f3..f3c5baf0 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/GoalExtensions.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/GoalExtensions.cs @@ -1,8 +1,8 @@ -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Goals; using CrashKonijn.Goap.Demos.Complex.Interfaces; using CrashKonijn.Goap.Demos.Complex.WorldKeys; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories.Extensions { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/TargetSensorExtensions.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/TargetSensorExtensions.cs index fec4e0f2..d36aefaa 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/TargetSensorExtensions.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/TargetSensorExtensions.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Interfaces; using CrashKonijn.Goap.Demos.Complex.Sensors.Target; using CrashKonijn.Goap.Demos.Complex.Targets; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Factories.Extensions diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/WorldSensorExtensions.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/WorldSensorExtensions.cs index 1f33075d..a9efffd5 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/WorldSensorExtensions.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Extensions/WorldSensorExtensions.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Interfaces; using CrashKonijn.Goap.Demos.Complex.Sensors.World; using CrashKonijn.Goap.Demos.Complex.WorldKeys; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories.Extensions { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/MinerAgentTypeConfigFactory.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/MinerAgentTypeConfigFactory.cs index 42efde2b..972bedf6 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/MinerAgentTypeConfigFactory.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/MinerAgentTypeConfigFactory.cs @@ -1,10 +1,9 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Classes; using CrashKonijn.Goap.Demos.Complex.Classes.Items; using CrashKonijn.Goap.Demos.Complex.Factories.Capabilities; using CrashKonijn.Goap.Demos.Complex.Factories.Extensions; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/SmithAgentTypeConfigFactory.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/SmithAgentTypeConfigFactory.cs index c81fcd5d..cfc1d00b 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/SmithAgentTypeConfigFactory.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/SmithAgentTypeConfigFactory.cs @@ -1,11 +1,10 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Classes; using CrashKonijn.Goap.Demos.Complex.Classes.Items; using CrashKonijn.Goap.Demos.Complex.Classes.Sources; using CrashKonijn.Goap.Demos.Complex.Factories.Capabilities; using CrashKonijn.Goap.Demos.Complex.Factories.Extensions; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/WoodCutterAgentTypeConfigFactory.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/WoodCutterAgentTypeConfigFactory.cs index ef7b099f..b3647c24 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/WoodCutterAgentTypeConfigFactory.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/WoodCutterAgentTypeConfigFactory.cs @@ -1,10 +1,9 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Classes; using CrashKonijn.Goap.Demos.Complex.Classes.Items; using CrashKonijn.Goap.Demos.Complex.Factories.Capabilities; using CrashKonijn.Goap.Demos.Complex.Factories.Extensions; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Factories { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/CleanItemsGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/CleanItemsGoal.cs index c4370f37..96d41a17 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/CleanItemsGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/CleanItemsGoal.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/CreateItemGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/CreateItemGoal.cs index 718eaf05..7acb3593 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/CreateItemGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/CreateItemGoal.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/FixHungerGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/FixHungerGoal.cs index ebba089c..7f7a6da6 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/FixHungerGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/FixHungerGoal.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/GatherItemGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/GatherItemGoal.cs index d911ab9f..6a1aa32a 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/GatherItemGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/GatherItemGoal.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/PickupItemGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/PickupItemGoal.cs index d3b8be8d..8f81266d 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/PickupItemGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/PickupItemGoal.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/WanderGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/WanderGoal.cs index 5e252cd0..2711cc6a 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/WanderGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/WanderGoal.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goap/GoapConfigInitializer.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goap/GoapConfigInitializer.cs index 657cc7da..597bff51 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goap/GoapConfigInitializer.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goap/GoapConfigInitializer.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Goap { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goap/GoapInjector.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goap/GoapInjector.cs index 10860eb5..d3e862f4 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goap/GoapInjector.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goap/GoapInjector.cs @@ -1,4 +1,5 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Interfaces; using UnityEngine; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestItemSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestItemSensor.cs index 279e1fed..3c39d544 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestItemSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestItemSensor.cs @@ -1,9 +1,8 @@ using System.Linq; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Sensors.Target diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestObjectSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestObjectSensor.cs index 78403166..e95936a6 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestObjectSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestObjectSensor.cs @@ -1,6 +1,5 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Sensors.Target diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestSourceSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestSourceSensor.cs index aff6ac23..5c27f1ed 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestSourceSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/ClosestSourceSensor.cs @@ -1,8 +1,7 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Sensors.Target diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/TransformSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/TransformSensor.cs index d9aaf8de..5c1dd908 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/TransformSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/TransformSensor.cs @@ -1,6 +1,5 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Sensors.Target { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/WanderTargetSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/WanderTargetSensor.cs index 266e6591..16628d4e 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/WanderTargetSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/Target/WanderTargetSensor.cs @@ -1,6 +1,5 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Sensors.Target diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsHoldingSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsHoldingSensor.cs index 8e4e7d36..1568a06c 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsHoldingSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsHoldingSensor.cs @@ -1,8 +1,8 @@ -using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Sensors.World { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsInWorldSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsInWorldSensor.cs index 9312e8ef..9207b3b9 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsInWorldSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/IsInWorldSensor.cs @@ -1,8 +1,8 @@ -using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Behaviours; using CrashKonijn.Goap.Demos.Complex.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Sensors.World diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/ItemOnFloorSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/ItemOnFloorSensor.cs index 7fd37843..c4acf3bf 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/ItemOnFloorSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/ItemOnFloorSensor.cs @@ -1,6 +1,6 @@ using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Behaviours; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Sensors.World diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/ClosestSourceTarget.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/ClosestSourceTarget.cs index ce270aba..e7b2be60 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/ClosestSourceTarget.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/ClosestSourceTarget.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Targets { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/ClosestTarget.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/ClosestTarget.cs index 82bf56ac..9d7400aa 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/ClosestTarget.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/ClosestTarget.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Targets { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/TransformTarget.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/TransformTarget.cs index 575efde0..ae2cc612 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/TransformTarget.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/TransformTarget.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Targets { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/WanderTarget.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/WanderTarget.cs index a83117ae..4b86393c 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/WanderTarget.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Targets/WanderTarget.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.Targets { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/CreatedItem.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/CreatedItem.cs index 24850dd6..bb997caa 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/CreatedItem.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/CreatedItem.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.WorldKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHolding.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHolding.cs index d0c77c48..be0af3cd 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHolding.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHolding.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.WorldKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs index 8a9d69e1..c47c5ca4 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.WorldKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsInWorld.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsInWorld.cs index 9896477b..8203685a 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsInWorld.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsInWorld.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.WorldKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsWandering.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsWandering.cs index 868be229..d74af35d 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsWandering.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsWandering.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.WorldKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/ItemsOnFloor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/ItemsOnFloor.cs index fe1a1033..7135c57c 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/ItemsOnFloor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/ItemsOnFloor.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Complex.WorldKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Actions/WanderAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Actions/WanderAction.cs index 37c367b3..f76edf3d 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Actions/WanderAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Actions/WanderAction.cs @@ -1,8 +1,6 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace Demos.Shared.Actions diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Behaviours/AgentMoveBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Behaviours/AgentMoveBehaviour.cs index 8adfbd8f..e45edb8e 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Behaviours/AgentMoveBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Behaviours/AgentMoveBehaviour.cs @@ -1,6 +1,6 @@ using System; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using UnityEngine; namespace Demos.Shared.Behaviours diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Behaviours/AnimationBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Behaviours/AnimationBehaviour.cs index 7f20de85..099e92c7 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Behaviours/AnimationBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Behaviours/AnimationBehaviour.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Agent.Runtime; using UnityEngine; namespace Demos.Shared.Behaviours diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Goals/FixHungerGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Goals/FixHungerGoal.cs index 95f8126c..64d4266a 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Goals/FixHungerGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Goals/FixHungerGoal.cs @@ -1,4 +1,5 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap; +using CrashKonijn.Goap.Runtime; namespace Demos.Shared.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Goals/WanderGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Goals/WanderGoal.cs index c73c977b..d6f53c50 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Goals/WanderGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Goals/WanderGoal.cs @@ -1,4 +1,5 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap; +using CrashKonijn.Goap.Runtime; namespace Demos.Shared.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/TransformSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/TransformSensor.cs index 60183708..13bb8a3f 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/TransformSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/TransformSensor.cs @@ -1,7 +1,6 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap; +using CrashKonijn.Goap.Runtime; namespace Demos.Shared.Sensors.Target { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/WanderTargetSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/WanderTargetSensor.cs index 59ff0fb9..2e9c12b6 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/WanderTargetSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Shared/Sensors/Target/WanderTargetSensor.cs @@ -1,7 +1,6 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace Demos.Simple.Sensors.Target diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/AgentMoveBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/AgentMoveBehaviour.cs index 418b861f..0115d258 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/AgentMoveBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/AgentMoveBehaviour.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Simple.Behaviours diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/AnimationBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/AnimationBehaviour.cs index 87e719e4..fad5cd72 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/AnimationBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/AnimationBehaviour.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Simple.Behaviours diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs index 0d1f1a83..c07d7f93 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SettingsBehaviour.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Configs; +using CrashKonijn.Goap.Runtime; using TMPro; using UnityEngine; using UnityEngine.Serialization; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs index 7f14369a..ef93997e 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Demos.Simple.Goap.Goals; +using CrashKonijn.Goap.Demos.Simple.Goap.Goals; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Simple.Behaviours diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleHungerBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleHungerBehaviour.cs index 024f4802..02176d74 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleHungerBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleHungerBehaviour.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Simple.Goap.Actions; using CrashKonijn.Goap.Editor.Attributes; using UnityEngine; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs index 8f25b181..e02aa85f 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs @@ -1,7 +1,8 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Validators; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Runtime; using TMPro; using UnityEngine; +using Extensions = CrashKonijn.Goap.Runtime.Extensions; namespace CrashKonijn.Goap.Demos.Simple.Behaviours { @@ -33,7 +34,7 @@ private string GetText() if (this.actionProvider.Agent.ActionState.Action is null) return "Idle"; - return $"{this.actionProvider.CurrentGoal.GetType().GetGenericTypeName()}\n{this.actionProvider.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; + return $"{Extensions.GetGenericTypeName(this.actionProvider.CurrentGoal.GetType())}\n{Extensions.GetGenericTypeName(this.actionProvider.Agent.ActionState.Action.GetType())}\n{this.agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Extensions.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Extensions.cs index fe2ca65f..3fee232d 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Extensions.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Extensions.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Behaviours; using UnityEngine; namespace Demos diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs index 17d8cc09..0805e233 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs @@ -1,10 +1,7 @@ -using System.Linq; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Simple.Behaviours; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Simple.Goap.Actions diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs index 42039b9c..ff6a1048 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PickupAppleAction.cs @@ -1,12 +1,8 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Simple.Behaviours; using CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Simple.Goap.Actions diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PluckAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PluckAppleAction.cs index b106d023..7d1e7ab1 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PluckAppleAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/PluckAppleAction.cs @@ -1,12 +1,7 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Simple.Behaviours; -using CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.Actions { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/WanderAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/WanderAction.cs index bda910c3..80341eed 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/WanderAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/WanderAction.cs @@ -1,8 +1,6 @@ using System; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; using Random = UnityEngine.Random; namespace CrashKonijn.Goap.Demos.Simple.Goap.Actions diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Factories/BaseCapabilityFactory.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Factories/BaseCapabilityFactory.cs index 1a64da69..0a079948 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Factories/BaseCapabilityFactory.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Factories/BaseCapabilityFactory.cs @@ -1,8 +1,7 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.Builders; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Simple.Goap.Sensors.Target; using CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Simple.Goap.Factories diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Goals/FixHungerGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Goals/FixHungerGoal.cs index 1db2e6fe..c87d153a 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Goals/FixHungerGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Goals/FixHungerGoal.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Goals/WanderGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Goals/WanderGoal.cs index d4718fd7..5166660d 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Goals/WanderGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Goals/WanderGoal.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.Goals { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Multi/AppleSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Multi/AppleSensor.cs index 9681a2df..ee33030b 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Multi/AppleSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Multi/AppleSensor.cs @@ -1,9 +1,7 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Demos.Simple.Behaviours; +using CrashKonijn.Goap.Demos.Simple.Behaviours; using CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys; using CrashKonijn.Goap.Demos.Simple.Goap.WorldKeys; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; using Demos; using UnityEngine; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/AgentSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/AgentSensor.cs index 99f9c711..9fd252f7 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/AgentSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/AgentSensor.cs @@ -1,8 +1,6 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.Sensors.Target { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/ClosestTreeSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/ClosestTreeSensor.cs index 234171bd..32bb4a52 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/ClosestTreeSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/ClosestTreeSensor.cs @@ -1,9 +1,7 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Demos.Simple.Behaviours; using CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; using Demos; using UnityEngine; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/WanderTargetSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/WanderTargetSensor.cs index c48aae6d..0f05a6d1 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/WanderTargetSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/Target/WanderTargetSensor.cs @@ -1,7 +1,5 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Simple.Goap.Sensors.Target diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsAliveSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsAliveSensor.cs index 5b90da74..3eb9f043 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsAliveSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsAliveSensor.cs @@ -1,7 +1,6 @@ -using CrashKonijn.Goap.Attributes; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.Sensors.World { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsHungrySensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsHungrySensor.cs index a7a3aed4..eb865319 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsHungrySensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/IsHungrySensor.cs @@ -1,8 +1,7 @@ -using CrashKonijn.Goap.Attributes; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; using CrashKonijn.Goap.Demos.Simple.Behaviours; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.Sensors.World { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/ThereAreApplesSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/ThereAreApplesSensor.cs index 1cd3c858..51e20e06 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/ThereAreApplesSensor.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Sensors/World/ThereAreApplesSensor.cs @@ -1,7 +1,6 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Simple.Behaviours; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; using UnityEngine; namespace CrashKonijn.Goap.Demos.Simple.Goap.Sensors.World diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/AgentTarget.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/AgentTarget.cs index 175622b2..323cec57 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/AgentTarget.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/AgentTarget.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/ClosestApple.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/ClosestApple.cs index a34c10a3..57883fcb 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/ClosestApple.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/ClosestApple.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/ClosestTree.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/ClosestTree.cs index 851c747b..86d5486b 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/ClosestTree.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/ClosestTree.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/WanderTarget.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/WanderTarget.cs index 7e633c6e..f53e2818 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/WanderTarget.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/TargetKeys/WanderTarget.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.TargetKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/HasApple.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/HasApple.cs index 28fbaa6e..cc6602a2 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/HasApple.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/HasApple.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.WorldKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/IsHungry.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/IsHungry.cs index 4518447f..b9f325ec 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/IsHungry.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/IsHungry.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.WorldKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/IsWandering.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/IsWandering.cs index d0fa8f70..11870d59 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/IsWandering.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/IsWandering.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.WorldKeys { diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/ThereAreApples.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/ThereAreApples.cs index e5b09742..60a152ad 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/ThereAreApples.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/WorldKeys/ThereAreApples.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.Demos.Simple.Goap.WorldKeys { diff --git a/Demo/CrashKonijn.Agent.Core.csproj.DotSettings b/Demo/CrashKonijn.Agent.Core.csproj.DotSettings new file mode 100644 index 00000000..6059fc65 --- /dev/null +++ b/Demo/CrashKonijn.Agent.Core.csproj.DotSettings @@ -0,0 +1,3 @@ + + True + True \ No newline at end of file diff --git a/Demo/CrashKonijn.Agent.Runtime.csproj.DotSettings b/Demo/CrashKonijn.Agent.Runtime.csproj.DotSettings new file mode 100644 index 00000000..f51e5ca7 --- /dev/null +++ b/Demo/CrashKonijn.Agent.Runtime.csproj.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file diff --git a/Demo/CrashKonijn.Goap.Core.csproj.DotSettings b/Demo/CrashKonijn.Goap.Core.csproj.DotSettings new file mode 100644 index 00000000..d343168a --- /dev/null +++ b/Demo/CrashKonijn.Goap.Core.csproj.DotSettings @@ -0,0 +1,3 @@ + + True + True \ No newline at end of file diff --git a/Demo/CrashKonijn.Goap.Resolver.csproj.DotSettings b/Demo/CrashKonijn.Goap.Resolver.csproj.DotSettings new file mode 100644 index 00000000..01e06feb --- /dev/null +++ b/Demo/CrashKonijn.Goap.Resolver.csproj.DotSettings @@ -0,0 +1,3 @@ + + True + True \ No newline at end of file diff --git a/Demo/CrashKonijn.Goap.Runtime.csproj.DotSettings b/Demo/CrashKonijn.Goap.Runtime.csproj.DotSettings new file mode 100644 index 00000000..48bf74f4 --- /dev/null +++ b/Demo/CrashKonijn.Goap.Runtime.csproj.DotSettings @@ -0,0 +1,19 @@ + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True \ No newline at end of file diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ActionClassDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ActionClassDrawer.cs index 206cc0ad..c003e548 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ActionClassDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ActionClassDrawer.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; namespace CrashKonijn.Goap.Editor.Attributes diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/GoalClassDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/GoalClassDrawer.cs index ce25e7fc..58f7473d 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/GoalClassDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/GoalClassDrawer.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; namespace CrashKonijn.Goap.Editor.Attributes diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/TargetSensorDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/TargetSensorDrawer.cs index 0c54d273..6edf7511 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/TargetSensorDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/TargetSensorDrawer.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; namespace CrashKonijn.Goap.Editor.Attributes diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/WorldSensorDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/WorldSensorDrawer.cs index 93a16753..c04ec3dd 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/WorldSensorDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/WorldSensorDrawer.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; namespace CrashKonijn.Goap.Editor.Attributes diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Mappers.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Mappers.cs index 95f68b18..35d6497f 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Mappers.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Mappers.cs @@ -1,5 +1,5 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Editor.Classes.Models; namespace CrashKonijn.Goap.Editor.Classes diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Node.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Node.cs index 9b452809..050e008d 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Node.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Node.cs @@ -1,6 +1,5 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Editor.Classes.Models { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeEffect.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeEffect.cs index a3936c9f..256f7162 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeEffect.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeEffect.cs @@ -1,6 +1,5 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Editor.Classes.Models { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/AgentTypeDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/AgentTypeDrawer.cs index bb98e993..7dcf1894 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/AgentTypeDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/AgentTypeDrawer.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Editor.Elements; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LogDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LogDrawer.cs index 93ae24ec..897869e2 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LogDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LogDrawer.cs @@ -1,6 +1,5 @@ using System.Linq; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Editor.Elements; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/ObjectDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/ObjectDrawer.cs index 50a791c7..9d84d03d 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/ObjectDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/ObjectDrawer.cs @@ -1,6 +1,6 @@ using System.Linq; using System.Reflection; -using CrashKonijn.Goap.Classes; +using CrashKonijn.Goap.Runtime; using UnityEngine; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/SerializableEffectDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/SerializableEffectDrawer.cs index 03989133..f266edc6 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/SerializableEffectDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/SerializableEffectDrawer.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Serializables; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/WorldDataDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/WorldDataDrawer.cs index dc655393..39cc965e 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/WorldDataDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/WorldDataDrawer.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Validators; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Editor.Elements; +using CrashKonijn.Goap.Runtime; using UnityEngine.UIElements; namespace CrashKonijn.Goap.Editor.Drawers diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionList.cs index c8f19142..785ffea4 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionList.cs @@ -1,7 +1,7 @@ using System; using System.Linq; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs index 67466403..757705a6 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs @@ -1,9 +1,9 @@ using System; using System.Reflection; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityActionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityActionElement.cs index ae33ed59..72de4902 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityActionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityActionElement.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityConditionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityConditionElement.cs index 7fccea03..4dc0447e 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityConditionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityConditionElement.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEngine.UIElements; namespace CrashKonijn.Goap.Editor.Elements diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityEffectElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityEffectElement.cs index 37f65827..e04e6940 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityEffectElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityEffectElement.cs @@ -1,5 +1,5 @@ -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEngine.UIElements; namespace CrashKonijn.Goap.Editor.Elements diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityGoalElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityGoalElement.cs index ce34af2f..ac5b824d 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityGoalElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityGoalElement.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilitySensorElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilitySensorElement.cs index 63a7b771..9e66f7fa 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilitySensorElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilitySensorElement.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Runtime; using UnityEngine.UIElements; namespace CrashKonijn.Goap.Editor.Elements diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ClassRefField.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ClassRefField.cs index 1cd331da..ffc0c5ce 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ClassRefField.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ClassRefField.cs @@ -1,7 +1,7 @@ using System; using System.Linq; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ConditionList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ConditionList.cs index ecf696e1..a21e8506 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ConditionList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ConditionList.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/EffectList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/EffectList.cs index 971754e6..7935bd35 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/EffectList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/EffectList.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/GoalList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/GoalList.cs index a79f96dd..9e7d5cdd 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/GoalList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/GoalList.cs @@ -1,5 +1,5 @@ using System.Linq; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Runtime; using UnityEditor; namespace CrashKonijn.Goap.Editor.Elements diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/SensorList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/SensorList.cs index 632b6ad0..53d03883 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/SensorList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/SensorList.cs @@ -1,8 +1,7 @@ using System; using System.Collections.Generic; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using UnityEditor; namespace CrashKonijn.Goap.Editor.Elements diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs b/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs index 557789ea..affc6343 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs @@ -1,5 +1,6 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using UnityEngine; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs index bea476f3..ae87aa40 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs @@ -1,6 +1,5 @@ using System.Linq; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Editor.Elements; using UnityEngine; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs index 7db59bac..a8dd942c 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs @@ -1,5 +1,5 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Editor.Drawers; using UnityEngine; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EffectElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EffectElement.cs index 1769b470..decdae20 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EffectElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EffectElement.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine.UIElements; namespace CrashKonijn.Goap.Editor.GraphViewer diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs index 7cec57e0..947ca79b 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs @@ -1,9 +1,7 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Editor.Drawers; using CrashKonijn.Goap.Resolver; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.Graphs; using UnityEditor.TextCore.Text; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs index bfec7f47..9ec9bed4 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs @@ -1,7 +1,8 @@ using System.Linq; -using CrashKonijn.Goap.Classes.Validators; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Editor.Elements; +using CrashKonijn.Goap.Runtime; using UnityEngine; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs index 4644b89d..08879365 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Validators; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Editor.Drawers; using CrashKonijn.Goap.Editor.Elements; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeConfigEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeConfigEditor.cs index cdd07dbe..f6eb9bbb 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeConfigEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeConfigEditor.cs @@ -1,8 +1,6 @@ using System; -using System.Linq; -using CrashKonijn.Goap.Classes.Validators; using CrashKonijn.Goap.Editor.Elements; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeFactoryBaseEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeFactoryBaseEditor.cs index be6cfa06..7c448009 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeFactoryBaseEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeFactoryBaseEditor.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Validators; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/CapabilityConfigScriptableEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/CapabilityConfigScriptableEditor.cs index 5e657d93..18693028 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/CapabilityConfigScriptableEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/CapabilityConfigScriptableEditor.cs @@ -1,6 +1,6 @@ using System.Linq; using CrashKonijn.Goap.Editor.Elements; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GeneratorEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GeneratorEditor.cs index ac5efe56..81385197 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GeneratorEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GeneratorEditor.cs @@ -1,6 +1,6 @@ using System; using System.IO; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs index f4600ab2..edee8466 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs @@ -1,7 +1,7 @@ using CrashKonijn.Agent; -using CrashKonijn.Goap.Behaviours; using CrashKonijn.Goap.Editor.Drawers; using CrashKonijn.Goap.Editor.Elements; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine.Device; @@ -54,9 +54,9 @@ public override VisualElement CreateInspectorGUI() private string GetText(GoapActionProvider provider) { - return $@"Goal: {provider.CurrentGoal?.GetType().GetGenericTypeName()} + return $@"Goal: {Runtime.Extensions.GetGenericTypeName(provider.CurrentGoal?.GetType())} AgentType: {provider.AgentType.Id} -Receiver: {provider.Agent?.GetType().GetGenericTypeName()}"; +Receiver: {Runtime.Extensions.GetGenericTypeName(provider.Agent?.GetType())}"; } } } \ No newline at end of file diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapRunnerEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapRunnerEditor.cs index 539933bc..b315ad29 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapRunnerEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapRunnerEditor.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Behaviours; using CrashKonijn.Goap.Editor.Drawers; using CrashKonijn.Goap.Editor.Elements; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs b/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs index d980f95b..83ab40d6 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Delegates.cs @@ -1,6 +1,4 @@ -using CrashKonijn.Goap.Core.Interfaces; - -namespace CrashKonijn.Goap.Core +namespace CrashKonijn.Agent.Core { public delegate void ActionDelegate(IAction action); public delegate void AgentActionDelegate(IAgent agent, IAction action); diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Enums/ActionMoveMode.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/ActionMoveMode.cs index 84b02443..4915d219 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Enums/ActionMoveMode.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Enums/ActionMoveMode.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Enums +namespace CrashKonijn.Agent.Core { public enum ActionMoveMode { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentMoveState.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentMoveState.cs index 48b2f77e..498a2a26 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentMoveState.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentMoveState.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Enums +namespace CrashKonijn.Agent.Core { public enum AgentMoveState { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentState.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentState.cs index 9d434b16..bb1f5745 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentState.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Enums/AgentState.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Enums +namespace CrashKonijn.Agent.Core { public enum AgentState { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugMode.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugMode.cs index 927dd323..428bf4db 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugMode.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugMode.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Enums +namespace CrashKonijn.Agent.Core { public enum DebugMode { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugSeverity.cs b/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugSeverity.cs index a41b41cd..277f2f5e 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugSeverity.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Enums/DebugSeverity.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Enums +namespace CrashKonijn.Agent.Core { public enum DebugSeverity { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs index d1ea0935..d6efe9de 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAction.cs @@ -1,7 +1,4 @@ -using System; -using CrashKonijn.Goap.Core.Enums; - -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IAction { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionContext.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionContext.cs index faa47988..fb502d69 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionContext.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionContext.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IActionContext { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionData.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionData.cs index 7be76403..00a810c2 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionData.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionData.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IActionData { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProperties.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProperties.cs index e04e60e0..f811d23e 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProperties.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProperties.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IActionProperties { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs index 88b180cb..7d0faf3e 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IActionProvider { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs index 5d3735ce..e008bac9 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IActionReceiver { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs index 14651500..40751148 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IActionRequest { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs index 8cd445be..e2d1930b 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IActionResolver { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRunState.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRunState.cs index 6c74e1ad..bb3cb7f9 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRunState.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IActionRunState { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionState.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionState.cs index 1e9f7ead..6fcad690 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionState.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionState.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IActionState { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs index ffc1d3df..39a8d84d 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; -using CrashKonijn.Goap.Core.Enums; -using UnityEngine; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IAgent : IActionReceiver { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentDistanceObserver.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentDistanceObserver.cs index 1464d896..8c44cc2a 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentDistanceObserver.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentDistanceObserver.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IAgentDistanceObserver { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentEvents.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentEvents.cs index db96d782..ef175f0a 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentEvents.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IAgentEvents { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentTimers.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentTimers.cs index 2ff7e77c..1ff8af8d 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentTimers.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgentTimers.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IAgentTimers { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IComponentReference.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IComponentReference.cs index 4fb9bb68..b92d89c4 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IComponentReference.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IComponentReference.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IComponentReference { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IDataReferenceInjector.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IDataReferenceInjector.cs index cdb8abf2..3505c669 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IDataReferenceInjector.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IDataReferenceInjector.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IDataReferenceInjector : IComponentReference { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILogger.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILogger.cs index cd3ff5ae..1673a61b 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILogger.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILogger.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface ILogger : ILogger { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs index 66e57285..93383fba 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ILoggerConfig.cs @@ -1,6 +1,4 @@ -using CrashKonijn.Goap.Core.Enums; - -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface ILoggerConfig { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoAgent.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoAgent.cs index 3ce21848..3b1f9ad9 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoAgent.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoAgent.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IMonoAgent : IAgent, IMonoBehaviour { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoBehaviour.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoBehaviour.cs index 07bc6064..50750b48 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IMonoBehaviour.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using UnityEngine; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface IMonoBehaviour { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITarget.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITarget.cs index eca348b8..b99a8049 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITarget.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITarget.cs @@ -1,8 +1,6 @@ - -using System; -using UnityEngine; +using UnityEngine; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface ITarget { diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITimer.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITimer.cs index 5611c467..7a87198f 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITimer.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/ITimer.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Agent.Core { public interface ITimer { diff --git a/Package/Runtime/CrashKonijn.Goap.meta b/Package/Runtime/CrashKonijn.Agent.Runtime.meta similarity index 77% rename from Package/Runtime/CrashKonijn.Goap.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime.meta index 36ab4228..2e8e6d60 100644 --- a/Package/Runtime/CrashKonijn.Goap.meta +++ b/Package/Runtime/CrashKonijn.Agent.Runtime.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 470348c48c56df94f9003daf60cac1d2 +guid: 2fe8c57323c912847abd740331deeab0 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Package/Runtime/CrashKonijn.Agent/ActionBase.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionBase.cs similarity index 95% rename from Package/Runtime/CrashKonijn.Agent/ActionBase.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionBase.cs index 9adee5cb..ef91be42 100644 --- a/Package/Runtime/CrashKonijn.Agent/ActionBase.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionBase.cs @@ -1,8 +1,6 @@ -using System; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Agent.Runtime { public class EmptyActionProperties : IActionProperties { diff --git a/Package/Runtime/CrashKonijn.Agent/ActionBase.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/ActionBase.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/ActionContext.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionContext.cs similarity index 66% rename from Package/Runtime/CrashKonijn.Agent/ActionContext.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionContext.cs index 32dd4416..cda31123 100644 --- a/Package/Runtime/CrashKonijn.Agent/ActionContext.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionContext.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Agent.Runtime { public class ActionContext : IActionContext { diff --git a/Package/Runtime/CrashKonijn.Agent/ActionContext.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionContext.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/ActionContext.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionContext.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionProviderBase.cs similarity index 69% rename from Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionProviderBase.cs index 4d52f592..f3dddac9 100644 --- a/Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionProviderBase.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using UnityEngine; -namespace CrashKonijn.Agent +namespace CrashKonijn.Agent.Runtime { public abstract class ActionProviderBase : MonoBehaviour, IActionProvider { diff --git a/Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionProviderBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/ActionProviderBase.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionProviderBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/ActionRunner.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionRunner.cs similarity index 97% rename from Package/Runtime/CrashKonijn.Agent/ActionRunner.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionRunner.cs index 2d95bb9f..190f07e9 100644 --- a/Package/Runtime/CrashKonijn.Agent/ActionRunner.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionRunner.cs @@ -1,10 +1,8 @@ using System; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Agent.Runtime { public class ActionRunner { diff --git a/Package/Runtime/CrashKonijn.Agent/ActionRunner.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionRunner.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/ActionRunner.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionRunner.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/ActionState.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionState.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Agent/ActionState.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionState.cs index 0569c5a5..e51b872e 100644 --- a/Package/Runtime/CrashKonijn.Agent/ActionState.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionState.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Agent.Runtime { public class ActionState : IActionState { diff --git a/Package/Runtime/CrashKonijn.Agent/ActionState.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/ActionState.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/ActionState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentBehaviour.cs similarity index 95% rename from Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentBehaviour.cs index bdd49917..f5ffdb9e 100644 --- a/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentBehaviour.cs @@ -1,15 +1,9 @@ using System; using System.Collections.Generic; -using CrashKonijn.Agent; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Observers; +using CrashKonijn.Agent.Core; using UnityEngine; -using ILogger = CrashKonijn.Goap.Core.Interfaces.ILogger; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Agent.Runtime { public class AgentBehaviour : MonoBehaviour, IMonoAgent { diff --git a/Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentBehaviour.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/AgentBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentBehaviour.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/AgentEvents.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentEvents.cs similarity index 94% rename from Package/Runtime/CrashKonijn.Agent/AgentEvents.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentEvents.cs index 84405c44..6bcd2021 100644 --- a/Package/Runtime/CrashKonijn.Agent/AgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentEvents.cs @@ -1,7 +1,6 @@ -using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Agent.Runtime { public class AgentEvents : IAgentEvents { diff --git a/Package/Runtime/CrashKonijn.Agent/AgentEvents.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentEvents.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/AgentEvents.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentEvents.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/AgentException.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentException.cs similarity index 81% rename from Package/Runtime/CrashKonijn.Agent/AgentException.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentException.cs index b1de9250..0afca25c 100644 --- a/Package/Runtime/CrashKonijn.Agent/AgentException.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentException.cs @@ -1,6 +1,6 @@ using System; -namespace CrashKonijn.Agent +namespace CrashKonijn.Agent.Runtime { public class AgentException : Exception { diff --git a/Package/Runtime/CrashKonijn.Agent/AgentException.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentException.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/AgentException.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentException.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/AgentLogger.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentLogger.cs similarity index 94% rename from Package/Runtime/CrashKonijn.Agent/AgentLogger.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentLogger.cs index f5e1f881..1995c5bc 100644 --- a/Package/Runtime/CrashKonijn.Agent/AgentLogger.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentLogger.cs @@ -1,8 +1,6 @@ -using CrashKonijn.Agent; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Agent.Runtime { public class AgentLogger : LoggerBase { diff --git a/Package/Runtime/CrashKonijn.Agent/AgentLogger.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentLogger.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/AgentLogger.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentLogger.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/AgentTimers.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentTimers.cs similarity index 72% rename from Package/Runtime/CrashKonijn.Agent/AgentTimers.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentTimers.cs index 7c74675d..10e628c7 100644 --- a/Package/Runtime/CrashKonijn.Agent/AgentTimers.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentTimers.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Agent.Runtime { public class AgentTimers : IAgentTimers { diff --git a/Package/Runtime/CrashKonijn.Agent/AgentTimers.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentTimers.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/AgentTimers.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/AgentTimers.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/DataReferenceInjector.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/DataReferenceInjector.cs similarity index 98% rename from Package/Runtime/CrashKonijn.Agent/DataReferenceInjector.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/DataReferenceInjector.cs index c4387137..bde620f0 100644 --- a/Package/Runtime/CrashKonijn.Agent/DataReferenceInjector.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/DataReferenceInjector.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Reflection; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using UnityEngine; -namespace CrashKonijn.Goap.Classes.References +namespace CrashKonijn.Agent.Runtime { public class DataReferenceInjector : IDataReferenceInjector { diff --git a/Package/Runtime/CrashKonijn.Agent/DataReferenceInjector.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/DataReferenceInjector.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/DataReferenceInjector.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/DataReferenceInjector.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/Extensions.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/Extensions.cs similarity index 94% rename from Package/Runtime/CrashKonijn.Agent/Extensions.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/Extensions.cs index a1309e08..2fdc4314 100644 --- a/Package/Runtime/CrashKonijn.Agent/Extensions.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/Extensions.cs @@ -1,7 +1,7 @@ using System; using System.Linq; -namespace CrashKonijn.Agent +namespace CrashKonijn.Agent.Runtime { public static class Extensions { diff --git a/Package/Runtime/CrashKonijn.Agent/Extensions.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/Extensions.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/Extensions.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/Extensions.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/LoggerBase.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/LoggerBase.cs similarity index 96% rename from Package/Runtime/CrashKonijn.Agent/LoggerBase.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/LoggerBase.cs index e81864d0..f93a42cb 100644 --- a/Package/Runtime/CrashKonijn.Agent/LoggerBase.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/LoggerBase.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Agent.Runtime { public abstract class LoggerBase : ILogger { diff --git a/Package/Runtime/CrashKonijn.Agent/LoggerBase.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/LoggerBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/LoggerBase.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/LoggerBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/LoggerConfig.cs similarity index 74% rename from Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/LoggerConfig.cs index 97e26bf6..13ec7c33 100644 --- a/Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/LoggerConfig.cs @@ -1,9 +1,8 @@ using System; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using UnityEngine; -namespace CrashKonijn.Agent +namespace CrashKonijn.Agent.Runtime { [Serializable] public class LoggerConfig : ILoggerConfig diff --git a/Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/LoggerConfig.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/LoggerConfig.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/LoggerConfig.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/References.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/References.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/References.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/References.meta diff --git a/Package/Runtime/CrashKonijn.Agent/References/GetComponentAttribute.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentAttribute.cs similarity index 74% rename from Package/Runtime/CrashKonijn.Agent/References/GetComponentAttribute.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentAttribute.cs index ba2af28a..b48d77a0 100644 --- a/Package/Runtime/CrashKonijn.Agent/References/GetComponentAttribute.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace CrashKonijn.Goap.Classes.References +namespace CrashKonijn.Agent.Runtime { [AttributeUsage(AttributeTargets.Property)] public class GetComponentAttribute : Attribute diff --git a/Package/Runtime/CrashKonijn.Agent/References/GetComponentAttribute.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/References/GetComponentAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/References/GetComponentInChildrenAttribute.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInChildrenAttribute.cs similarity index 75% rename from Package/Runtime/CrashKonijn.Agent/References/GetComponentInChildrenAttribute.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInChildrenAttribute.cs index 50c9f466..efa008f9 100644 --- a/Package/Runtime/CrashKonijn.Agent/References/GetComponentInChildrenAttribute.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInChildrenAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace CrashKonijn.Goap.Classes.References +namespace CrashKonijn.Agent.Runtime { [AttributeUsage(AttributeTargets.Property)] public class GetComponentInChildrenAttribute : Attribute diff --git a/Package/Runtime/CrashKonijn.Agent/References/GetComponentInChildrenAttribute.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInChildrenAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/References/GetComponentInChildrenAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInChildrenAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/References/GetComponentInParentAttribute.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInParentAttribute.cs similarity index 75% rename from Package/Runtime/CrashKonijn.Agent/References/GetComponentInParentAttribute.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInParentAttribute.cs index ec7c1387..fd0f762c 100644 --- a/Package/Runtime/CrashKonijn.Agent/References/GetComponentInParentAttribute.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInParentAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace CrashKonijn.Goap.Classes.References +namespace CrashKonijn.Agent.Runtime { [AttributeUsage(AttributeTargets.Property)] public class GetComponentInParentAttribute : Attribute diff --git a/Package/Runtime/CrashKonijn.Agent/References/GetComponentInParentAttribute.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInParentAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/References/GetComponentInParentAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/References/GetComponentInParentAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/Timer.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/Timer.cs similarity index 85% rename from Package/Runtime/CrashKonijn.Agent/Timer.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/Timer.cs index 5bc2a7c6..919fc437 100644 --- a/Package/Runtime/CrashKonijn.Agent/Timer.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/Timer.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Agent.Runtime { public class Timer : ITimer { diff --git a/Package/Runtime/CrashKonijn.Agent/Timer.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/Timer.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/Timer.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/Timer.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/VectorDistanceObserver.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/VectorDistanceObserver.cs similarity index 83% rename from Package/Runtime/CrashKonijn.Agent/VectorDistanceObserver.cs rename to Package/Runtime/CrashKonijn.Agent.Runtime/VectorDistanceObserver.cs index a439ed76..d22eb003 100644 --- a/Package/Runtime/CrashKonijn.Agent/VectorDistanceObserver.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/VectorDistanceObserver.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using UnityEngine; -namespace CrashKonijn.Goap.Observers +namespace CrashKonijn.Agent.Runtime { public class VectorDistanceObserver : IAgentDistanceObserver { diff --git a/Package/Runtime/CrashKonijn.Agent/VectorDistanceObserver.cs.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/VectorDistanceObserver.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/VectorDistanceObserver.cs.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/VectorDistanceObserver.cs.meta diff --git a/Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef b/Package/Runtime/CrashKonijn.Agent.Runtime/com.crashkonijn.agent.runtime.asmdef similarity index 78% rename from Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef rename to Package/Runtime/CrashKonijn.Agent.Runtime/com.crashkonijn.agent.runtime.asmdef index 34e97c15..bfb5b25a 100644 --- a/Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/com.crashkonijn.agent.runtime.asmdef @@ -1,6 +1,6 @@ { - "name": "CrashKonijn.Agent", - "rootNamespace": "CrashKonijn.Agent", + "name": "CrashKonijn.Agent.Runtime", + "rootNamespace": "CrashKonijn.Agent.Runtime", "references": [ "GUID:0d347051544a4880a72466503e27985a"], "includePlatforms": [], diff --git a/Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef.meta b/Package/Runtime/CrashKonijn.Agent.Runtime/com.crashkonijn.agent.runtime.asmdef.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Agent/com.crashkonijn.agent.asmdef.meta rename to Package/Runtime/CrashKonijn.Agent.Runtime/com.crashkonijn.agent.runtime.asmdef.meta diff --git a/Package/Runtime/CrashKonijn.Agent.meta b/Package/Runtime/CrashKonijn.Agent.meta deleted file mode 100644 index ae53fe59..00000000 --- a/Package/Runtime/CrashKonijn.Agent.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b71aaf4a52504dca95c486d2553ee632 -timeCreated: 1719322466 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs b/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs index 1d3eda58..84ddf389 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs @@ -1,6 +1,4 @@ -using CrashKonijn.Goap.Core.Interfaces; - -namespace CrashKonijn.Goap.Core +namespace CrashKonijn.Goap.Core { public delegate void GoalDelegate(IGoal goal); public delegate void AgentGoalDelegate(IMonoGoapActionProvider actionProvider, IGoal goal); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/ClassRefStatus.cs b/Package/Runtime/CrashKonijn.Goap.Core/Enums/ClassRefStatus.cs index b0579a1c..bfc6bc81 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Enums/ClassRefStatus.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Enums/ClassRefStatus.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Enums +namespace CrashKonijn.Goap.Core { public enum ClassRefStatus { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/Comparison.cs b/Package/Runtime/CrashKonijn.Goap.Core/Enums/Comparison.cs index b52184db..e57c005e 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Enums/Comparison.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Enums/Comparison.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Enums +namespace CrashKonijn.Goap.Core { public enum Comparison { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Enums/EffectType.cs b/Package/Runtime/CrashKonijn.Goap.Core/Enums/EffectType.cs index a4d2f0cd..7fbe4ccb 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Enums/EffectType.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Enums/EffectType.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Enums +namespace CrashKonijn.Goap.Core { public enum EffectType { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionConfig.cs index 31fb0c6a..219f7e66 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionConfig.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IActionConfig : IClassConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs index a43fb6e2..115e8e04 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentCollection.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IAgentCollection { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs index e75d44db..36f5c28f 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IAgentType { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeConfig.cs index 13d79d42..1d348f54 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeConfig.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IAgentTypeConfig : IConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeConfigValidatorRunner.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeConfigValidatorRunner.cs index 02e44271..dc40ef70 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeConfigValidatorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeConfigValidatorRunner.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IAgentTypeConfigValidatorRunner { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs index 18ec7e2c..7cf0f5a2 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IAgentTypeEvents { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs index f3426cd6..07411a0a 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeJobRunner.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IAgentTypeJobRunner { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IClassConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IClassConfig.cs index 1e24d172..58d84c46 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IClassConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IClassConfig.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IClassConfig : IConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IClassRef.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IClassRef.cs index 141b2c26..86971000 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IClassRef.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IClassRef.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IClassRef { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ICondition.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ICondition.cs index 26707568..a84af4a2 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ICondition.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ICondition.cs @@ -1,6 +1,4 @@ -using CrashKonijn.Goap.Core.Enums; - -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface ICondition { public IWorldKey WorldKey { get; } diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConditionObserver.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConditionObserver.cs index e7fb3d22..c9c7dbdb 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConditionObserver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConditionObserver.cs @@ -1,5 +1,5 @@  -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IConditionObserver { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConfig.cs index 83f4407d..8f0e5c14 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConfig.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConnectable.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConnectable.cs index bfd08a56..5fa728f3 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConnectable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IConnectable.cs @@ -1,6 +1,6 @@ using System; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IConnectable { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ICostObserver.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ICostObserver.cs index 6925fca9..3ede9783 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ICostObserver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ICostObserver.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface ICostObserver { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IEffect.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IEffect.cs index 54be793b..2e74063f 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IEffect.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IEffect.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IEffect { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalTargetSensor.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalTargetSensor.cs index e75fd5a3..b7183e6f 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalTargetSensor.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalTargetSensor.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGlobalTargetSensor : ITargetSensor, IGlobalSensor { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalWorldData.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalWorldData.cs index f1a24fd6..69fec60f 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalWorldData.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalWorldData.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGlobalWorldData : IWorldData { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalWorldSensor.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalWorldSensor.cs index ee3edd1d..ec0f24ce 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalWorldSensor.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGlobalWorldSensor.cs @@ -1,5 +1,5 @@  -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGlobalWorldSensor : IWorldSensor, IGlobalSensor { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoal.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoal.cs index 31b28930..764548ff 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoal.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoal.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGoal : IConnectable, IHasConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalConfig.cs index 3bf9212e..edf889d3 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalConfig.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGoalConfig : IClassConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs index 6bf06de3..759cc33a 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoap.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGoap { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs index cf61b97e..214de273 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAction.cs @@ -1,4 +1,6 @@ -namespace CrashKonijn.Goap.Core.Interfaces +using CrashKonijn.Agent.Core; + +namespace CrashKonijn.Goap.Core { public interface IGoapAction : IAction, IConnectable, IHasConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs index 072f0c3a..0211d8c7 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProviderEvent.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGoapActionProviderEvent { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs index 355e8b7b..e29e9ba8 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs @@ -1,6 +1,7 @@ -using UnityEngine; +using CrashKonijn.Agent.Core; +using UnityEngine; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGoapAgent : IActionResolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs index 7b07c11c..cfcc16d0 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs @@ -1,4 +1,6 @@ -namespace CrashKonijn.Goap.Core.Interfaces +using CrashKonijn.Agent.Core; + +namespace CrashKonijn.Goap.Core { public interface IGoapAgentEvents { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapConfig.cs index d2db5fef..b2b6cda0 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapConfig.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGoapConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapController.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapController.cs index 5b2b1055..c83ec269 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapController.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapController.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGoapController { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs index 13d413c2..11003e20 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGoapEvents { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapInjector.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapInjector.cs index 7bfb2d75..485df800 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapInjector.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapInjector.cs @@ -1,4 +1,6 @@ -namespace CrashKonijn.Goap.Core.Interfaces +using CrashKonijn.Agent.Core; + +namespace CrashKonijn.Goap.Core { public interface IGoapInjector { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapResolver.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapResolver.cs index ca453d3e..26119786 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapResolver.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGoapResolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGraph.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGraph.cs index e433799b..73b91880 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGraph.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGraph.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IGraph { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IHasConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IHasConfig.cs index 787523d8..35fdd5b9 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IHasConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IHasConfig.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IHasConfig where TConfig : IConfig diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IKeyResolver.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IKeyResolver.cs index 2e6ff2ab..4f40049f 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IKeyResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IKeyResolver.cs @@ -1,5 +1,5 @@  -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IKeyResolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalTargetSensor.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalTargetSensor.cs index d9b5b369..335bef23 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalTargetSensor.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalTargetSensor.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface ILocalTargetSensor : ITargetSensor, ILocalSensor { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalWorldData.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalWorldData.cs index 75a20ae0..75b0f824 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalWorldData.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalWorldData.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface ILocalWorldData : IWorldData { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalWorldSensor.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalWorldSensor.cs index 22dfee96..e25b9789 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalWorldSensor.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ILocalWorldSensor.cs @@ -1,5 +1,5 @@  -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface ILocalWorldSensor : IWorldSensor, ILocalSensor { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs index 40cbdf82..2cf32117 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs @@ -1,4 +1,6 @@ -namespace CrashKonijn.Goap.Core.Interfaces +using CrashKonijn.Agent.Core; + +namespace CrashKonijn.Goap.Core { public interface IMonoGoapActionProvider : IGoapAgent, IMonoBehaviour { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensor.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensor.cs index a451f875..c7f7832a 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensor.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensor.cs @@ -1,6 +1,7 @@ using System; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IMultiSensor : IHasConfig, ILocalSensor, IGlobalSensor { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensorConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensorConfig.cs index 22c964d1..17d880a1 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensorConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMultiSensorConfig.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IMultiSensorConfig : IClassConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INode.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INode.cs index badf32fd..81da272d 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INode.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INode.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface INode { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INodeCondition.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INodeCondition.cs index 387bde6c..adc38635 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INodeCondition.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INodeCondition.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface INodeCondition { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INodeEffect.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INodeEffect.cs index 37406249..c4700ab7 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INodeEffect.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/INodeEffect.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface INodeEffect { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs index df306f67..94427458 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ISensorRunner.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface ISensorRunner { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetKey.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetKey.cs index 3e25fdcb..3160a986 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetKey.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetKey.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface ITargetKey : IConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetSensor.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetSensor.cs index c73c3437..08f7f106 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetSensor.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetSensor.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface ITargetSensor : IHasConfig, ISensor { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetSensorConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetSensorConfig.cs index 60704b34..6f9851c3 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetSensorConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/ITargetSensorConfig.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface ITargetSensorConfig : IClassConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IValidationResults.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IValidationResults.cs index 7f151d2c..1ecd8fa1 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IValidationResults.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IValidationResults.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IValidationResults { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IValidator.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IValidator.cs index 532e6990..b051d808 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IValidator.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldData.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldData.cs index 74e2836a..0fd32340 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldData.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldData.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using CrashKonijn.Goap.Core.Enums; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IWorldData { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldKey.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldKey.cs index 50276887..7834be4e 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldKey.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldKey.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IWorldKey : IConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldSensor.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldSensor.cs index 713e3ac3..88655941 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldSensor.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldSensor.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IWorldSensor : IHasConfig, ISensor { diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldSensorConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldSensorConfig.cs index 85d2d68b..ad48e095 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldSensorConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IWorldSensorConfig.cs @@ -1,4 +1,4 @@ -namespace CrashKonijn.Goap.Core.Interfaces +namespace CrashKonijn.Goap.Core { public interface IWorldSensorConfig : IClassConfig { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/ConditionBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/ConditionBuilder.cs index c4c0ec6f..c59e5830 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/ConditionBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/ConditionBuilder.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Resolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/CostBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/CostBuilder.cs index dc6d9b9e..284cad13 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/CostBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/CostBuilder.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Resolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/EnabledBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/EnabledBuilder.cs index 6820eb06..99762ccf 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/EnabledBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/EnabledBuilder.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Resolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/ExecutableBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/ExecutableBuilder.cs index ed4b336e..1e599637 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/ExecutableBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/ExecutableBuilder.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Resolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs index 652de949..d73235de 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; -using CrashKonijn.Goap.Resolver.Models; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Resolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphBuilder.cs index 8ff7d3c8..10c5917c 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphBuilder.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; -using CrashKonijn.Goap.Resolver.Models; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Resolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs index d08a4f96..77b4a4d5 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs @@ -1,10 +1,7 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; -using CrashKonijn.Goap.Resolver.Models; +using CrashKonijn.Goap.Core; using Unity.Collections; -using Unity.Jobs; namespace CrashKonijn.Goap.Resolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs index 07b538ff..cae08939 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs @@ -3,7 +3,6 @@ using Unity.Collections; using Unity.Jobs; using Unity.Mathematics; -using UnityEngine; namespace CrashKonijn.Goap.Resolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IConditionBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IConditionBuilder.cs index c1e7e0c9..0a244cf6 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IConditionBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IConditionBuilder.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Interfaces +namespace CrashKonijn.Goap.Resolver { public interface IConditionBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/ICostBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/ICostBuilder.cs index ade5ddc2..f54b533c 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/ICostBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/ICostBuilder.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Interfaces +namespace CrashKonijn.Goap.Resolver { public interface ICostBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IEnabledBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IEnabledBuilder.cs index 1f3c03ab..ae615459 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IEnabledBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IEnabledBuilder.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Interfaces +namespace CrashKonijn.Goap.Resolver { public interface IEnabledBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IExecutableBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IExecutableBuilder.cs index dc8dcc2f..81ea3da7 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IExecutableBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IExecutableBuilder.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Interfaces +namespace CrashKonijn.Goap.Resolver { public interface IExecutableBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IGraphResolver.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IGraphResolver.cs index 0d292160..31d80857 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IGraphResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IGraphResolver.cs @@ -1,7 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Models; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Interfaces +namespace CrashKonijn.Goap.Resolver { public interface IGraphResolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IPositionBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IPositionBuilder.cs index 57fe1ef2..71416c78 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IPositionBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IPositionBuilder.cs @@ -1,8 +1,8 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using Unity.Mathematics; using UnityEngine; -namespace CrashKonijn.Goap.Resolver.Interfaces +namespace CrashKonijn.Goap.Resolver { public interface IPositionBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IResolveHandle.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IResolveHandle.cs index 46f9f8af..c43ed685 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IResolveHandle.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IResolveHandle.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Interfaces +namespace CrashKonijn.Goap.Resolver { public interface IResolveHandle { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Graph.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Graph.cs index 465133d5..c836eefd 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Graph.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Graph.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Models +namespace CrashKonijn.Goap.Resolver { public class Graph : IGraph { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Node.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Node.cs index fc2d638b..918b26ce 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Node.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Node.cs @@ -1,10 +1,8 @@ using System; using System.Collections.Generic; -using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Models +namespace CrashKonijn.Goap.Resolver { public class Node : INode { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/NodeCondition.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/NodeCondition.cs index d8dfdc83..332a9881 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/NodeCondition.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/NodeCondition.cs @@ -1,7 +1,7 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Models +namespace CrashKonijn.Goap.Resolver { public class NodeCondition : INodeCondition { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/NodeEffect.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/NodeEffect.cs index eb44bab3..9e93777f 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/NodeEffect.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/NodeEffect.cs @@ -1,7 +1,7 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolver.Models +namespace CrashKonijn.Goap.Resolver { public class NodeEffect : INodeEffect { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/PositionBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/PositionBuilder.cs index 252456d7..b145a649 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/PositionBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/PositionBuilder.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; using Unity.Mathematics; using UnityEngine; diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs index 3d003aa5..e56d4d03 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs @@ -1,9 +1,7 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; using Unity.Collections; using Unity.Jobs; -using UnityEngine; namespace CrashKonijn.Goap.Resolver { diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime.meta b/Package/Runtime/CrashKonijn.Goap.Runtime.meta new file mode 100644 index 00000000..20c74130 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 16b092f3e192fe54993e296b0dcb6ace +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Attributes.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/ActionClassAttribute.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/ActionClassAttribute.cs similarity index 71% rename from Package/Runtime/CrashKonijn.Goap/Attributes/ActionClassAttribute.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/ActionClassAttribute.cs index 58f81d17..6c19b079 100644 --- a/Package/Runtime/CrashKonijn.Goap/Attributes/ActionClassAttribute.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/ActionClassAttribute.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace CrashKonijn.Goap.Attributes +namespace CrashKonijn.Goap.Runtime { public class ActionClassAttribute : PropertyAttribute { diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/ActionClassAttribute.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/ActionClassAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Attributes/ActionClassAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/ActionClassAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/GoalClassAttribute.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoalClassAttribute.cs similarity index 71% rename from Package/Runtime/CrashKonijn.Goap/Attributes/GoalClassAttribute.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoalClassAttribute.cs index 2b6aba6f..e4127051 100644 --- a/Package/Runtime/CrashKonijn.Goap/Attributes/GoalClassAttribute.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoalClassAttribute.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace CrashKonijn.Goap.Attributes +namespace CrashKonijn.Goap.Runtime { public class GoalClassAttribute : PropertyAttribute { diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/GoalClassAttribute.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoalClassAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Attributes/GoalClassAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoalClassAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/GoapIdAttribute.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoapIdAttribute.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Attributes/GoapIdAttribute.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoapIdAttribute.cs index 9b8aded3..f2c554fb 100644 --- a/Package/Runtime/CrashKonijn.Goap/Attributes/GoapIdAttribute.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoapIdAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace CrashKonijn.Goap.Attributes +namespace CrashKonijn.Goap.Runtime { [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)] public class GoapIdAttribute : Attribute diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/GoapIdAttribute.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoapIdAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Attributes/GoapIdAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/GoapIdAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/TargetSensorAttribute.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/TargetSensorAttribute.cs similarity index 71% rename from Package/Runtime/CrashKonijn.Goap/Attributes/TargetSensorAttribute.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/TargetSensorAttribute.cs index 05db21a2..611c9047 100644 --- a/Package/Runtime/CrashKonijn.Goap/Attributes/TargetSensorAttribute.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/TargetSensorAttribute.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace CrashKonijn.Goap.Attributes +namespace CrashKonijn.Goap.Runtime { public class TargetSensorAttribute : PropertyAttribute { diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/TargetSensorAttribute.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/TargetSensorAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Attributes/TargetSensorAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/TargetSensorAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/WorldSensorAttribute.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/WorldSensorAttribute.cs similarity index 71% rename from Package/Runtime/CrashKonijn.Goap/Attributes/WorldSensorAttribute.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/WorldSensorAttribute.cs index 4b4dcc70..da511c02 100644 --- a/Package/Runtime/CrashKonijn.Goap/Attributes/WorldSensorAttribute.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/WorldSensorAttribute.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace CrashKonijn.Goap.Attributes +namespace CrashKonijn.Goap.Runtime { public class WorldSensorAttribute : PropertyAttribute { diff --git a/Package/Runtime/CrashKonijn.Goap/Attributes/WorldSensorAttribute.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/WorldSensorAttribute.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Attributes/WorldSensorAttribute.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Attributes/WorldSensorAttribute.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentCollection.cs similarity index 93% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentCollection.cs index cc35d5f8..17ea9748 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentCollection.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public class AgentCollection : IAgentCollection { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentCollection.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentCollection.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentCollection.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeBehaviour.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeBehaviour.cs similarity index 80% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeBehaviour.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeBehaviour.cs index 2fcf2798..fc9d060b 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeBehaviour.cs @@ -1,9 +1,7 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { [DefaultExecutionOrder(-99)] public class AgentTypeBehaviour : MonoBehaviour diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeBehaviour.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeBehaviour.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeEvents.cs similarity index 95% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeEvents.cs index bf85dbbd..a75960cc 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeEvents.cs @@ -1,8 +1,6 @@ -using System.Reflection; -using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public class AgentTypeEvents : IAgentTypeEvents { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeEvents.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeEvents.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeEvents.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeFactoryBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeFactoryBase.cs similarity index 64% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeFactoryBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeFactoryBase.cs index 68d538b7..f31fc37c 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeFactoryBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeFactoryBase.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public abstract class AgentTypeFactoryBase : MonoBehaviour { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeFactoryBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeFactoryBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeFactoryBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeFactoryBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoalBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoalBase.cs similarity index 85% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoalBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoalBase.cs index ae7c6751..cebf1546 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoalBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoalBase.cs @@ -1,8 +1,7 @@ using System; -using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public abstract class GoalBase : IGoal { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoalBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoalBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoalBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoalBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionBase.cs similarity index 95% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionBase.cs index 7747f699..ca0e8dd5 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionBase.cs @@ -1,8 +1,9 @@ using System; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { // Backwards compatibility for old actions public abstract class GoapActionBase : GoapActionBase diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionProvider.cs similarity index 96% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionProvider.cs index c758830e..9888f41d 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionProvider.cs @@ -1,11 +1,11 @@ using System; using CrashKonijn.Agent; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Exceptions; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public class GoapActionProvider : ActionProviderBase, IMonoGoapActionProvider { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionProvider.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapActionProvider.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionProvider.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapAgentEvents.cs similarity index 96% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapAgentEvents.cs index f6d6be12..21dc7c61 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapAgentEvents.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public class GoapAgentEvents : IGoapAgentEvents { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapAgentEvents.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapAgentEvents.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapAgentEvents.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapBehaviour.cs similarity index 93% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapBehaviour.cs index 2397d969..bf4c5503 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapBehaviour.cs @@ -1,15 +1,14 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; using UnityEngine.Serialization; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { [DefaultExecutionOrder(-100)] public class GoapBehaviour : MonoBehaviour, IGoap { - private Classes.Runners.Goap goap; + private Goap goap; public float RunTime => this.goap.RunTime; public float CompleteTime => this.goap.CompleteTime; @@ -62,7 +61,7 @@ private void Initialize() if (controller == null) throw new MissingComponentException("No IGoapController found on GameObject of GoapBehaviour"); - this.goap = new Classes.Runners.Goap(controller); + this.goap = new Goap(controller); controller.Initialize(this.goap); diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapBehaviour.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapBehaviour.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapConfigBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapConfigBase.cs similarity index 61% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapConfigBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapConfigBase.cs index aea72c52..1afb9725 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapConfigBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapConfigBase.cs @@ -1,7 +1,6 @@ -using CrashKonijn.Goap.Classes; -using UnityEngine; +using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public abstract class GoapConfigInitializerBase : MonoBehaviour { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapConfigBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapConfigBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapConfigBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapConfigBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapEvents.cs similarity index 97% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapEvents.cs index 636389a4..87c1edfa 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapEvents.cs @@ -1,7 +1,6 @@ using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public class GoapEvents : IGoapEvents { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapEvents.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapEvents.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapEvents.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapSetBehaviour.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapSetBehaviour.cs similarity index 78% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapSetBehaviour.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapSetBehaviour.cs index cfa364ea..6471c9a5 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapSetBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapSetBehaviour.cs @@ -1,9 +1,7 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { [DefaultExecutionOrder(-99)] public class GoapSetBehaviour : MonoBehaviour diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/GoapSetBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapSetBehaviour.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/GoapSetBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapSetBehaviour.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ManualControllerBehaviour.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ManualControllerBehaviour.cs similarity index 78% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ManualControllerBehaviour.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ManualControllerBehaviour.cs index 128cb969..30605ce5 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/ManualControllerBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ManualControllerBehaviour.cs @@ -1,9 +1,7 @@ -using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Controllers; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public class ManualControllerBehaviour : MonoBehaviour, IGoapController { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ManualControllerBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ManualControllerBehaviour.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ManualControllerBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ManualControllerBehaviour.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ProactiveControllerBehaviour.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ProactiveControllerBehaviour.cs similarity index 81% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ProactiveControllerBehaviour.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ProactiveControllerBehaviour.cs index fb2c2aea..bc6fc1d1 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/ProactiveControllerBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ProactiveControllerBehaviour.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Controllers; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public class ProactiveControllerBehaviour : MonoBehaviour, IGoapController { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ProactiveControllerBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ProactiveControllerBehaviour.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ProactiveControllerBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ProactiveControllerBehaviour.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ReactiveControllerBehaviour.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ReactiveControllerBehaviour.cs similarity index 82% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ReactiveControllerBehaviour.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ReactiveControllerBehaviour.cs index d84c9f4f..98e6c7ed 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/ReactiveControllerBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ReactiveControllerBehaviour.cs @@ -1,8 +1,7 @@ -using CrashKonijn.Goap.Classes.Controllers; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public class ReactiveControllerBehaviour : MonoBehaviour, IGoapController { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/ReactiveControllerBehaviour.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ReactiveControllerBehaviour.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/ReactiveControllerBehaviour.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/ReactiveControllerBehaviour.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/TargetKeyBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/TargetKeyBase.cs similarity index 57% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/TargetKeyBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/TargetKeyBase.cs index b82157c5..d8c0b00b 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/TargetKeyBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/TargetKeyBase.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public abstract class TargetKeyBase : ITargetKey { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/TargetKeyBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/TargetKeyBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/TargetKeyBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/TargetKeyBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/WorldKeyBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/WorldKeyBase.cs similarity index 57% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/WorldKeyBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/WorldKeyBase.cs index 62fae7f6..e0b7642d 100644 --- a/Package/Runtime/CrashKonijn.Goap/Behaviours/WorldKeyBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/WorldKeyBase.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Behaviours +namespace CrashKonijn.Goap.Runtime { public abstract class WorldKeyBase : IWorldKey { diff --git a/Package/Runtime/CrashKonijn.Goap/Behaviours/WorldKeyBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/WorldKeyBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Behaviours/WorldKeyBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/WorldKeyBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/ClassScanner.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/ClassScanner.cs similarity index 96% rename from Package/Runtime/CrashKonijn.Goap/ClassScanner.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/ClassScanner.cs index ba97db48..2cb7dc63 100644 --- a/Package/Runtime/CrashKonijn.Goap/ClassScanner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/ClassScanner.cs @@ -3,13 +3,12 @@ using System.IO; using System.Linq; using System.Reflection; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using UnityEditor; using UnityEngine; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class ClassScanner { diff --git a/Package/Runtime/CrashKonijn.Goap/ClassScanner.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/ClassScanner.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/ClassScanner.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/ClassScanner.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentType.cs similarity index 94% rename from Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentType.cs index f3bb0588..f7d53053 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentType.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Goap.Runtime { public class AgentType : IAgentType { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentType.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/AgentType.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentType.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/AgentTypeFactory.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentTypeFactory.cs similarity index 94% rename from Package/Runtime/CrashKonijn.Goap/Classes/AgentTypeFactory.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentTypeFactory.cs index deee849b..303303cb 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/AgentTypeFactory.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentTypeFactory.cs @@ -1,12 +1,8 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Runners; -using CrashKonijn.Goap.Classes.Validators; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Exceptions; -using CrashKonijn.Goap.Resolvers; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Goap.Runtime { public class AgentTypeFactory { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/AgentTypeFactory.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentTypeFactory.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/AgentTypeFactory.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentTypeFactory.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/ActionBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/ActionBuilder.cs similarity index 95% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/ActionBuilder.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/ActionBuilder.cs index 149f374c..551809e4 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/ActionBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/ActionBuilder.cs @@ -1,13 +1,10 @@ using System; using System.Collections.Generic; -using System.Linq; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Builders +namespace CrashKonijn.Goap.Runtime { public class ActionBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/ActionBuilder.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/ActionBuilder.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/ActionBuilder.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/ActionBuilder.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/AgentTypeBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/AgentTypeBuilder.cs similarity index 98% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/AgentTypeBuilder.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/AgentTypeBuilder.cs index b8abf06e..42007293 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/AgentTypeBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/AgentTypeBuilder.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Builders +namespace CrashKonijn.Goap.Runtime { public class AgentTypeBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/AgentTypeBuilder.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/AgentTypeBuilder.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/AgentTypeBuilder.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/AgentTypeBuilder.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/GoalBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/GoalBuilder.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/GoalBuilder.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/GoalBuilder.cs index d2556e26..7a047744 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/GoalBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/GoalBuilder.cs @@ -1,11 +1,8 @@ using System; using System.Collections.Generic; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Builders +namespace CrashKonijn.Goap.Runtime { public class GoalBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/GoalBuilder.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/GoalBuilder.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/GoalBuilder.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/GoalBuilder.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/KeyBuilderBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/KeyBuilderBase.cs similarity index 93% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/KeyBuilderBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/KeyBuilderBase.cs index c0eca129..395b5d22 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/KeyBuilderBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/KeyBuilderBase.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace CrashKonijn.Goap.Classes.Builders +namespace CrashKonijn.Goap.Runtime { public abstract class KeyBuilderBase { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/KeyBuilderBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/KeyBuilderBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/KeyBuilderBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/KeyBuilderBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/MultiSensorBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/MultiSensorBuilder.cs similarity index 87% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/MultiSensorBuilder.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/MultiSensorBuilder.cs index ff76bbf3..bfcbbf62 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/MultiSensorBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/MultiSensorBuilder.cs @@ -1,8 +1,7 @@ using System; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Builders +namespace CrashKonijn.Goap.Runtime { public class MultiSensorBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/MultiSensorBuilder.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/MultiSensorBuilder.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/MultiSensorBuilder.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/MultiSensorBuilder.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetKeyBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetKeyBuilder.cs similarity index 79% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetKeyBuilder.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetKeyBuilder.cs index a7310fcb..d16ccd25 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetKeyBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetKeyBuilder.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class TargetKeyBuilder : KeyBuilderBase { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetKeyBuilder.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetKeyBuilder.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetKeyBuilder.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetKeyBuilder.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetSensorBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetSensorBuilder.cs similarity index 90% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetSensorBuilder.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetSensorBuilder.cs index 27662de9..796b43ee 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetSensorBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetSensorBuilder.cs @@ -1,8 +1,7 @@ using System; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Builders +namespace CrashKonijn.Goap.Runtime { public class TargetSensorBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetSensorBuilder.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetSensorBuilder.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/TargetSensorBuilder.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetSensorBuilder.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldKeyBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldKeyBuilder.cs similarity index 61% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldKeyBuilder.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldKeyBuilder.cs index df3b0a04..3c904f70 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldKeyBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldKeyBuilder.cs @@ -1,8 +1,6 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.Validators; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Builders +namespace CrashKonijn.Goap.Runtime { public class WorldKeyBuilder : KeyBuilderBase { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldKeyBuilder.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldKeyBuilder.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldKeyBuilder.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldKeyBuilder.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldSensorBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldSensorBuilder.cs similarity index 90% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldSensorBuilder.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldSensorBuilder.cs index c6c0f856..84b5ee2a 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldSensorBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldSensorBuilder.cs @@ -1,8 +1,7 @@ using System; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Builders +namespace CrashKonijn.Goap.Runtime { public class WorldSensorBuilder { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldSensorBuilder.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldSensorBuilder.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Builders/WorldSensorBuilder.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldSensorBuilder.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/CapabilityFactory.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/CapabilityFactory.cs similarity index 84% rename from Package/Runtime/CrashKonijn.Goap/Classes/CapabilityFactory.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/CapabilityFactory.cs index a82b9ff6..59ba7914 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/CapabilityFactory.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/CapabilityFactory.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Goap.Runtime { public abstract class CapabilityFactoryBase { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/CapabilityFactory.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/CapabilityFactory.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/CapabilityFactory.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/CapabilityFactory.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Condition.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Condition.cs similarity index 75% rename from Package/Runtime/CrashKonijn.Goap/Classes/Condition.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Condition.cs index cf3c24a8..94d11717 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Condition.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Condition.cs @@ -1,8 +1,6 @@ -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Goap.Runtime { public class Condition : ICondition { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Condition.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Condition.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Condition.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Condition.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Controllers.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ManualController.cs similarity index 91% rename from Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ManualController.cs index a70ffc5b..7b38c26e 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ManualController.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Controllers +namespace CrashKonijn.Goap.Runtime { public class ManualController : IGoapController { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ManualController.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ManualController.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ManualController.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ProactiveController.cs similarity index 96% rename from Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ProactiveController.cs index 7b0d5324..118a9e3c 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ProactiveController.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Controllers +namespace CrashKonijn.Goap.Runtime { public class ProactiveController : IGoapController { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ProactiveController.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ProactiveController.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ProactiveController.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ReactiveController.cs similarity index 96% rename from Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ReactiveController.cs index 1ca0af2f..457a545b 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ReactiveController.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Controllers +namespace CrashKonijn.Goap.Runtime { public class ReactiveController : IGoapController { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ReactiveController.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Controllers/ReactiveController.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ReactiveController.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Effect.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Effect.cs similarity index 64% rename from Package/Runtime/CrashKonijn.Goap/Classes/Effect.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Effect.cs index 22b6573e..536f4883 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Effect.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Effect.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Goap.Runtime { public class Effect : IEffect { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Effect.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Effect.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Effect.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Effect.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapAgentLogger.cs similarity index 90% rename from Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapAgentLogger.cs index f7ec1799..8fbac8ee 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapAgentLogger.cs @@ -1,8 +1,8 @@ -using CrashKonijn.Agent; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Goap.Runtime { public class GoapAgentLogger : LoggerBase { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapAgentLogger.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/GoapAgentLogger.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapAgentLogger.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/GoapConfig.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapConfig.cs similarity index 64% rename from Package/Runtime/CrashKonijn.Goap/Classes/GoapConfig.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapConfig.cs index 08c7b7ce..1069c1d8 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/GoapConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapConfig.cs @@ -1,9 +1,6 @@ -using CrashKonijn.Goap.Classes.Injectors; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Observers; -using CrashKonijn.Goap.Resolvers; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Goap.Runtime { public class GoapConfig : IGoapConfig { @@ -15,7 +12,7 @@ public class GoapConfig : IGoapConfig { ConditionObserver = new ConditionObserver(), KeyResolver = new KeyResolver(), - GoapInjector = new GoapInjector() + GoapInjector = new DefaultGoapInjector() }; } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/GoapConfig.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapConfig.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/GoapConfig.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapConfig.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Injectors.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Injectors.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Injectors.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Injectors.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Injectors/GoapInjector.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Injectors/DefaultGoapInjector.cs similarity index 57% rename from Package/Runtime/CrashKonijn.Goap/Classes/Injectors/GoapInjector.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Injectors/DefaultGoapInjector.cs index 6589f7fc..6fc41a9b 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Injectors/GoapInjector.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Injectors/DefaultGoapInjector.cs @@ -1,8 +1,9 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Injectors +namespace CrashKonijn.Goap.Runtime { - public class GoapInjector : IGoapInjector + public class DefaultGoapInjector : IGoapInjector { public void Inject(IAction action) { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Injectors/GoapInjector.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Injectors/DefaultGoapInjector.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Injectors/GoapInjector.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Injectors/DefaultGoapInjector.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/PositionTarget.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/PositionTarget.cs similarity index 70% rename from Package/Runtime/CrashKonijn.Goap/Classes/PositionTarget.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/PositionTarget.cs index c1d72645..2cfb8fc0 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/PositionTarget.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/PositionTarget.cs @@ -1,8 +1,7 @@ -using System; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using UnityEngine; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Goap.Runtime { public class PositionTarget : ITarget { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/PositionTarget.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/PositionTarget.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/PositionTarget.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/PositionTarget.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ActionRunState.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ActionRunState.cs similarity index 90% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ActionRunState.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ActionRunState.cs index 5014c0b0..cdd828db 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ActionRunState.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes.RunStates +namespace CrashKonijn.Goap.Runtime { public static class ActionRunState { public static readonly IActionRunState Continue = new ContinueActionRunState(); diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ActionRunState.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ActionRunState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ActionRunState.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ActionRunState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/CompletedActionRunState.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/CompletedActionRunState.cs similarity index 87% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/CompletedActionRunState.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/CompletedActionRunState.cs index 37795191..b6cbae02 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/CompletedActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/CompletedActionRunState.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes.RunStates +namespace CrashKonijn.Goap.Runtime { public class CompletedActionRunState : IActionRunState { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/CompletedActionRunState.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/CompletedActionRunState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/CompletedActionRunState.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/CompletedActionRunState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueActionRunState.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueActionRunState.cs similarity index 87% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueActionRunState.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueActionRunState.cs index 13a77323..8f9d9963 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueActionRunState.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes.RunStates +namespace CrashKonijn.Goap.Runtime { public class ContinueActionRunState : IActionRunState { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueActionRunState.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueActionRunState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueActionRunState.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueActionRunState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueOrResolveActionRunState.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueOrResolveActionRunState.cs similarity index 87% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueOrResolveActionRunState.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueOrResolveActionRunState.cs index 9fa64d6e..8d0b6007 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueOrResolveActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueOrResolveActionRunState.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes.RunStates +namespace CrashKonijn.Goap.Runtime { public class ContinueOrResolveActionRunState : IActionRunState { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueOrResolveActionRunState.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueOrResolveActionRunState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/ContinueOrResolveActionRunState.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ContinueOrResolveActionRunState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/StopActionRunState.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopActionRunState.cs similarity index 87% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/StopActionRunState.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopActionRunState.cs index bb168d94..8e236364 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/StopActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopActionRunState.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes.RunStates +namespace CrashKonijn.Goap.Runtime { public class StopActionRunState : IActionRunState { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/StopActionRunState.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopActionRunState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/StopActionRunState.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopActionRunState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitActionRunState.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitActionRunState.cs similarity index 91% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitActionRunState.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitActionRunState.cs index aef6e79c..f20e9dcb 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitActionRunState.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes.RunStates +namespace CrashKonijn.Goap.Runtime { public class WaitActionRunState : IActionRunState { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitActionRunState.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitActionRunState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitActionRunState.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitActionRunState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenCompleteActionRunState.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenCompleteActionRunState.cs similarity index 91% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenCompleteActionRunState.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenCompleteActionRunState.cs index 1b493946..f6107c78 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenCompleteActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenCompleteActionRunState.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes.RunStates +namespace CrashKonijn.Goap.Runtime { public class WaitThenCompleteActionRunState : IActionRunState { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenCompleteActionRunState.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenCompleteActionRunState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenCompleteActionRunState.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenCompleteActionRunState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenStopActionRunState.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenStopActionRunState.cs similarity index 91% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenStopActionRunState.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenStopActionRunState.cs index 54025c73..17499394 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenStopActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenStopActionRunState.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; -namespace CrashKonijn.Goap.Classes.RunStates +namespace CrashKonijn.Goap.Runtime { public class WaitThenStopActionRunState : IActionRunState { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenStopActionRunState.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenStopActionRunState.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/RunStates/WaitThenStopActionRunState.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/WaitThenStopActionRunState.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Runners.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/AgentTypeJobRunner.cs similarity index 98% rename from Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/AgentTypeJobRunner.cs index 57812382..ca3804c9 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/AgentTypeJobRunner.cs @@ -1,12 +1,11 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Resolver; -using CrashKonijn.Goap.Resolver.Interfaces; using Unity.Collections; using Unity.Mathematics; -namespace CrashKonijn.Goap.Classes.Runners +namespace CrashKonijn.Goap.Runtime { public class AgentTypeJobRunner : IAgentTypeJobRunner { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/AgentTypeJobRunner.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Runners/AgentTypeJobRunner.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/AgentTypeJobRunner.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/Goap.cs similarity index 95% rename from Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/Goap.cs index 11d2c572..42140a62 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/Goap.cs @@ -1,11 +1,10 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Resolver; -namespace CrashKonijn.Goap.Classes.Runners +namespace CrashKonijn.Goap.Runtime { public class Goap : IGoap { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/Goap.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Runners/Goap.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/Goap.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/SensorRunner.cs similarity index 98% rename from Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/SensorRunner.cs index 8311d0b6..c3f54e1c 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/SensorRunner.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Classes.Runners +namespace CrashKonijn.Goap.Runtime { public class SensorRunner : ISensorRunner { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/SensorRunner.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Runners/SensorRunner.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/SensorRunner.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/TransformTarget.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/TransformTarget.cs similarity index 83% rename from Package/Runtime/CrashKonijn.Goap/Classes/TransformTarget.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/TransformTarget.cs index 8df8fe83..ad08c1f7 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/TransformTarget.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/TransformTarget.cs @@ -1,8 +1,7 @@ -using System; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; using UnityEngine; -namespace CrashKonijn.Goap.Classes +namespace CrashKonijn.Goap.Runtime { public class TransformTarget : ITarget { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/TransformTarget.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/TransformTarget.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/TransformTarget.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/TransformTarget.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionClassTypeValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionClassTypeValidator.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionClassTypeValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionClassTypeValidator.cs index 30596cf6..07c845a3 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionClassTypeValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionClassTypeValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class ActionClassTypeValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionClassTypeValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionClassTypeValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionClassTypeValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionClassTypeValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionConditionKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionConditionKeyValidator.cs similarity index 90% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionConditionKeyValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionConditionKeyValidator.cs index fe54b46e..5437521c 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionConditionKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionConditionKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class ActionConditionKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionConditionKeyValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionConditionKeyValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionConditionKeyValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionConditionKeyValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectKeyValidator.cs similarity index 90% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectKeyValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectKeyValidator.cs index 8c0fb3ec..49d42e2e 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class ActionEffectKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectKeyValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectKeyValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectKeyValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectKeyValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectsValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectsValidator.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectsValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectsValidator.cs index eddb2238..b770f186 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectsValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectsValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class ActionEffectsValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectsValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectsValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionEffectsValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionEffectsValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionTargetValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionTargetValidator.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionTargetValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionTargetValidator.cs index 32bee0c7..032057e5 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionTargetValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionTargetValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class ActionTargetValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionTargetValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionTargetValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ActionTargetValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ActionTargetValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/AgentTypeConfigValidatorRunner.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/AgentTypeConfigValidatorRunner.cs similarity index 94% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/AgentTypeConfigValidatorRunner.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/AgentTypeConfigValidatorRunner.cs index 2983cd79..d6c73f07 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/AgentTypeConfigValidatorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/AgentTypeConfigValidatorRunner.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class AgentTypeConfigValidatorRunner : IAgentTypeConfigValidatorRunner { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/AgentTypeConfigValidatorRunner.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/AgentTypeConfigValidatorRunner.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/AgentTypeConfigValidatorRunner.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/AgentTypeConfigValidatorRunner.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalClassTypeValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalClassTypeValidator.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalClassTypeValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalClassTypeValidator.cs index b34cc3d2..35644129 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalClassTypeValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalClassTypeValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class GoalClassTypeValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalClassTypeValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalClassTypeValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalClassTypeValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalClassTypeValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionKeyValidator.cs similarity index 89% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionKeyValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionKeyValidator.cs index 11676758..0e65b397 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class GoalConditionKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionKeyValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionKeyValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionKeyValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionKeyValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionsValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionsValidator.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionsValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionsValidator.cs index f1fdbdda..9c8c846a 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionsValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionsValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class GoalConditionsValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionsValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionsValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/GoalConditionsValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/GoalConditionsValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetKeySensorsValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetKeySensorsValidator.cs similarity index 95% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetKeySensorsValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetKeySensorsValidator.cs index 356cd884..f7a23a24 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetKeySensorsValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetKeySensorsValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class TargetKeySensorsValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetKeySensorsValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetKeySensorsValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetKeySensorsValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetKeySensorsValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorClassTypeValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorClassTypeValidator.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorClassTypeValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorClassTypeValidator.cs index aa093861..26380f1b 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorClassTypeValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorClassTypeValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class TargetSensorClassTypeValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorClassTypeValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorClassTypeValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorClassTypeValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorClassTypeValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorKeyValidator.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorKeyValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorKeyValidator.cs index 45b69816..3e47a5e9 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class TargetSensorKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorKeyValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorKeyValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/TargetSensorKeyValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/TargetSensorKeyValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ValidationResults.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ValidationResults.cs similarity index 93% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ValidationResults.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ValidationResults.cs index 6e7882f1..8db91ca4 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ValidationResults.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ValidationResults.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class ValidationResults : IValidationResults { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/ValidationResults.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ValidationResults.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/ValidationResults.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/ValidationResults.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldKeySensorsValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldKeySensorsValidator.cs similarity index 95% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldKeySensorsValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldKeySensorsValidator.cs index 56e07247..009e4f2f 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldKeySensorsValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldKeySensorsValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class WorldKeySensorsValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldKeySensorsValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldKeySensorsValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldKeySensorsValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldKeySensorsValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorClassTypeValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorClassTypeValidator.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorClassTypeValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorClassTypeValidator.cs index 3f193c3c..87bf4df7 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorClassTypeValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorClassTypeValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class WorldSensorClassTypeValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorClassTypeValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorClassTypeValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorClassTypeValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorClassTypeValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorKeyValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorKeyValidator.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorKeyValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorKeyValidator.cs index 1616c2a4..e1a67b4d 100644 --- a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorKeyValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorKeyValidator.cs @@ -1,7 +1,7 @@ using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class WorldSensorKeyValidator : IValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorKeyValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorKeyValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Classes/Validators/WorldSensorKeyValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Validators/WorldSensorKeyValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Configs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Configs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/ActionConfig.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/ActionConfig.cs similarity index 83% rename from Package/Runtime/CrashKonijn.Goap/Configs/ActionConfig.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/ActionConfig.cs index cb9c3556..f80985fb 100644 --- a/Package/Runtime/CrashKonijn.Goap/Configs/ActionConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/ActionConfig.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Configs +namespace CrashKonijn.Goap.Runtime { public class ActionConfig : IActionConfig { diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/ActionConfig.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/ActionConfig.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Configs/ActionConfig.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/ActionConfig.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/AgentTypeConfig.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/AgentTypeConfig.cs similarity index 93% rename from Package/Runtime/CrashKonijn.Goap/Configs/AgentTypeConfig.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/AgentTypeConfig.cs index e6286dd8..9fddb52d 100644 --- a/Package/Runtime/CrashKonijn.Goap/Configs/AgentTypeConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/AgentTypeConfig.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Configs +namespace CrashKonijn.Goap.Runtime { public class AgentTypeConfig : IAgentTypeConfig { diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/AgentTypeConfig.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/AgentTypeConfig.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Configs/AgentTypeConfig.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/AgentTypeConfig.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/GoalConfig.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/GoalConfig.cs similarity index 90% rename from Package/Runtime/CrashKonijn.Goap/Configs/GoalConfig.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/GoalConfig.cs index 98d80b65..479bacc6 100644 --- a/Package/Runtime/CrashKonijn.Goap/Configs/GoalConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/GoalConfig.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Configs +namespace CrashKonijn.Goap.Runtime { [Serializable] public class GoalConfig : IGoalConfig diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/GoalConfig.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/GoalConfig.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Configs/GoalConfig.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/GoalConfig.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/MultiSensorConfig.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/MultiSensorConfig.cs similarity index 67% rename from Package/Runtime/CrashKonijn.Goap/Configs/MultiSensorConfig.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/MultiSensorConfig.cs index 824a7334..e2edf5fa 100644 --- a/Package/Runtime/CrashKonijn.Goap/Configs/MultiSensorConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/MultiSensorConfig.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Configs +namespace CrashKonijn.Goap.Runtime { public class MultiSensorConfig : IMultiSensorConfig { diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/MultiSensorConfig.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/MultiSensorConfig.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Configs/MultiSensorConfig.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/MultiSensorConfig.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/TargetKey.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetKey.cs similarity index 70% rename from Package/Runtime/CrashKonijn.Goap/Configs/TargetKey.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetKey.cs index 9c3b5c8a..76dc80bc 100644 --- a/Package/Runtime/CrashKonijn.Goap/Configs/TargetKey.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetKey.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Configs +namespace CrashKonijn.Goap.Runtime { public class TargetKey : ITargetKey { diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/TargetKey.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetKey.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Configs/TargetKey.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetKey.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/TargetSensorConfig.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetSensorConfig.cs similarity index 89% rename from Package/Runtime/CrashKonijn.Goap/Configs/TargetSensorConfig.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetSensorConfig.cs index 099ff685..25c6cffc 100644 --- a/Package/Runtime/CrashKonijn.Goap/Configs/TargetSensorConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetSensorConfig.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Configs +namespace CrashKonijn.Goap.Runtime { public class TargetSensorConfig : TargetSensorConfig where TSensor : ITargetSensor diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/TargetSensorConfig.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetSensorConfig.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Configs/TargetSensorConfig.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/TargetSensorConfig.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/WorldKey.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldKey.cs similarity index 70% rename from Package/Runtime/CrashKonijn.Goap/Configs/WorldKey.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldKey.cs index eab44ebb..60b26b94 100644 --- a/Package/Runtime/CrashKonijn.Goap/Configs/WorldKey.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldKey.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Configs +namespace CrashKonijn.Goap.Runtime { public class WorldKey : IWorldKey { diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/WorldKey.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldKey.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Configs/WorldKey.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldKey.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/WorldSensorConfig.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldSensorConfig.cs similarity index 89% rename from Package/Runtime/CrashKonijn.Goap/Configs/WorldSensorConfig.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldSensorConfig.cs index 969b6f84..1f3fd801 100644 --- a/Package/Runtime/CrashKonijn.Goap/Configs/WorldSensorConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldSensorConfig.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Configs +namespace CrashKonijn.Goap.Runtime { public class WorldSensorConfig : WorldSensorConfig where TSensor : IWorldSensor diff --git a/Package/Runtime/CrashKonijn.Goap/Configs/WorldSensorConfig.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldSensorConfig.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Configs/WorldSensorConfig.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Configs/WorldSensorConfig.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Exceptions.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Exceptions.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Exceptions.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Exceptions.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Exceptions/GoapException.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Exceptions/GoapException.cs similarity index 80% rename from Package/Runtime/CrashKonijn.Goap/Exceptions/GoapException.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Exceptions/GoapException.cs index e8b2c138..c5c9b2d2 100644 --- a/Package/Runtime/CrashKonijn.Goap/Exceptions/GoapException.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Exceptions/GoapException.cs @@ -1,6 +1,6 @@ using System; -namespace CrashKonijn.Goap.Exceptions +namespace CrashKonijn.Goap.Runtime { public class GoapException : Exception { diff --git a/Package/Runtime/CrashKonijn.Goap/Exceptions/GoapException.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Exceptions/GoapException.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Exceptions/GoapException.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Exceptions/GoapException.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Extensions.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Extensions.cs similarity index 97% rename from Package/Runtime/CrashKonijn.Goap/Extensions.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Extensions.cs index 4fc2099d..93dbf61e 100644 --- a/Package/Runtime/CrashKonijn.Goap/Extensions.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Extensions.cs @@ -1,14 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using JetBrains.Annotations; using UnityEngine; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public static class Extensions { diff --git a/Package/Runtime/CrashKonijn.Goap/Extensions.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Extensions.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Extensions.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Extensions.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Generators.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/ClassGenerator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/ClassGenerator.cs similarity index 98% rename from Package/Runtime/CrashKonijn.Goap/Generators/ClassGenerator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/ClassGenerator.cs index 754826b6..a69681e2 100644 --- a/Package/Runtime/CrashKonijn.Goap/Generators/ClassGenerator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/ClassGenerator.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; using System.IO; -using UnityEngine; -namespace CrashKonijn.Goap.Generators +namespace CrashKonijn.Goap.Runtime { public class ClassGenerator { diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/ClassGenerator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/ClassGenerator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/ClassGenerator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/ClassGenerator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/action.template b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/action.template similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/action.template rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/action.template diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/action.template.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/action.template.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/action.template.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/action.template.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/goal.template b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/goal.template similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/goal.template rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/goal.template diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/goal.template.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/goal.template.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/goal.template.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/goal.template.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/multi-sensor.template b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/multi-sensor.template similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/multi-sensor.template rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/multi-sensor.template diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/multi-sensor.template.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/multi-sensor.template.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/multi-sensor.template.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/multi-sensor.template.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/target-key.template b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/target-key.template similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/target-key.template rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/target-key.template diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/target-key.template.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/target-key.template.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/target-key.template.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/target-key.template.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/world-key.template b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/world-key.template similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/world-key.template rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/world-key.template diff --git a/Package/Runtime/CrashKonijn.Goap/Generators/Templates/world-key.template.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/world-key.template.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Generators/Templates/world-key.template.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Generators/Templates/world-key.template.meta diff --git a/Package/Runtime/CrashKonijn.Goap/GlobalWorldData.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/GlobalWorldData.cs similarity index 85% rename from Package/Runtime/CrashKonijn.Goap/GlobalWorldData.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/GlobalWorldData.cs index 0151d034..f3b4d1fc 100644 --- a/Package/Runtime/CrashKonijn.Goap/GlobalWorldData.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/GlobalWorldData.cs @@ -1,7 +1,8 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class GlobalWorldData : WorldDataBase, IGlobalWorldData { diff --git a/Package/Runtime/CrashKonijn.Goap/GlobalWorldData.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/GlobalWorldData.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/GlobalWorldData.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/GlobalWorldData.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/LocalWorldData.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/LocalWorldData.cs similarity index 89% rename from Package/Runtime/CrashKonijn.Goap/LocalWorldData.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/LocalWorldData.cs index 212d71bf..5e01ce98 100644 --- a/Package/Runtime/CrashKonijn.Goap/LocalWorldData.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/LocalWorldData.cs @@ -1,7 +1,8 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class LocalWorldData : WorldDataBase, ILocalWorldData { diff --git a/Package/Runtime/CrashKonijn.Goap/LocalWorldData.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/LocalWorldData.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/LocalWorldData.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/LocalWorldData.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Observers.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Observers.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Observers.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Observers.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserver.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserver.cs similarity index 76% rename from Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserver.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserver.cs index a88c99f9..84974c4b 100644 --- a/Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserver.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Observers +namespace CrashKonijn.Goap.Runtime { public class ConditionObserver : ConditionObserverBase { diff --git a/Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserver.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserver.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserver.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserver.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserverBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserverBase.cs similarity index 80% rename from Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserverBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserverBase.cs index c727aaec..f8d4c91e 100644 --- a/Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserverBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserverBase.cs @@ -1,6 +1,6 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Observers +namespace CrashKonijn.Goap.Runtime { public abstract class ConditionObserverBase : IConditionObserver { diff --git a/Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserverBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserverBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Observers/ConditionObserverBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Observers/ConditionObserverBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Resolvers.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Resolvers.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Resolvers/ClassResolver.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/ClassResolver.cs similarity index 94% rename from Package/Runtime/CrashKonijn.Goap/Resolvers/ClassResolver.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/ClassResolver.cs index 3eeddc27..f38bc130 100644 --- a/Package/Runtime/CrashKonijn.Goap/Resolvers/ClassResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/ClassResolver.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolvers +namespace CrashKonijn.Goap.Runtime { public class ClassResolver { diff --git a/Package/Runtime/CrashKonijn.Goap/Resolvers/ClassResolver.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/ClassResolver.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Resolvers/ClassResolver.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/ClassResolver.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolver.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolver.cs similarity index 89% rename from Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolver.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolver.cs index c21a10fe..7b94ed56 100644 --- a/Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolver.cs @@ -1,9 +1,8 @@ using System; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolvers +namespace CrashKonijn.Goap.Runtime { public class KeyResolver : KeyResolverBase { diff --git a/Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolver.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolver.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolver.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolver.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolverBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolverBase.cs similarity index 91% rename from Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolverBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolverBase.cs index baf06553..b7866669 100644 --- a/Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolverBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolverBase.cs @@ -1,7 +1,8 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Resolvers +namespace CrashKonijn.Goap.Runtime { public abstract class KeyResolverBase : IKeyResolver { diff --git a/Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolverBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolverBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Resolvers/KeyResolverBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Resolvers/KeyResolverBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/ScriptIdValidator.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/ScriptIdValidator.cs similarity index 98% rename from Package/Runtime/CrashKonijn.Goap/ScriptIdValidator.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/ScriptIdValidator.cs index 5eb740c6..16b45a61 100644 --- a/Package/Runtime/CrashKonijn.Goap/ScriptIdValidator.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/ScriptIdValidator.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public class ScriptReferenceValidator { diff --git a/Package/Runtime/CrashKonijn.Goap/ScriptIdValidator.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/ScriptIdValidator.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/ScriptIdValidator.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/ScriptIdValidator.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/ActionConfigScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/ActionConfigScriptable.cs similarity index 87% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/ActionConfigScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/ActionConfigScriptable.cs index 2f66ed5c..35628362 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/ActionConfigScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/ActionConfigScriptable.cs @@ -1,11 +1,9 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Serializables; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/ActionConfig")] public class ActionConfigScriptable : ScriptableObject, IActionConfig diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/ActionConfigScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/ActionConfigScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/ActionConfigScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/ActionConfigScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/AgentTypeScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/AgentTypeScriptable.cs similarity index 88% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/AgentTypeScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/AgentTypeScriptable.cs index 6cd1a06e..a8808d0d 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/AgentTypeScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/AgentTypeScriptable.cs @@ -1,12 +1,10 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; using UnityEngine.Serialization; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/AgentTypeConfig")] public class AgentTypeScriptable : ScriptableObject diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/AgentTypeScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/AgentTypeScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/AgentTypeScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/AgentTypeScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/CapabilityConfigScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/CapabilityConfigScriptable.cs similarity index 97% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/CapabilityConfigScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/CapabilityConfigScriptable.cs index af5d8200..4e552bc6 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/CapabilityConfigScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/CapabilityConfigScriptable.cs @@ -1,13 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/CapabilityConfig")] public class CapabilityConfigScriptable : ScriptableCapabilityFactoryBase diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/CapabilityConfigScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/CapabilityConfigScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/CapabilityConfigScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/CapabilityConfigScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/GeneratorScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GeneratorScriptable.cs similarity index 96% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/GeneratorScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GeneratorScriptable.cs index 42aca9f1..8c9b8cd5 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/GeneratorScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GeneratorScriptable.cs @@ -1,8 +1,7 @@ using System.IO; -using CrashKonijn.Goap.Generators; using UnityEngine; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/Generator")] public class GeneratorScriptable : ScriptableObject diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/GeneratorScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GeneratorScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/GeneratorScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GeneratorScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/GoalConfigScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoalConfigScriptable.cs similarity index 83% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/GoalConfigScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoalConfigScriptable.cs index 799b408d..1566e859 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/GoalConfigScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoalConfigScriptable.cs @@ -1,11 +1,9 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Serializables; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/GoalConfig")] public class GoalConfigScriptable : ScriptableObject, IGoalConfig diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/GoalConfigScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoalConfigScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/GoalConfigScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoalConfigScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/GoapSetConfigScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoapSetConfigScriptable.cs similarity index 90% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/GoapSetConfigScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoapSetConfigScriptable.cs index 8343ee51..703c7dc6 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/GoapSetConfigScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoapSetConfigScriptable.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/GoapSetConfig")] public class GoapSetConfigScriptable : ScriptableObject, IAgentTypeConfig diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/GoapSetConfigScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoapSetConfigScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/GoapSetConfigScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoapSetConfigScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/TargetKeyScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetKeyScriptable.cs similarity index 70% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/TargetKeyScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetKeyScriptable.cs index 7e96e565..9ac46fc5 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/TargetKeyScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetKeyScriptable.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/TargetKey")] public class TargetKeyScriptable : ScriptableObject, ITargetKey diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/TargetKeyScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetKeyScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/TargetKeyScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetKeyScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/TargetSensorConfigScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetSensorConfigScriptable.cs similarity index 80% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/TargetSensorConfigScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetSensorConfigScriptable.cs index b13f450b..bf49ac39 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/TargetSensorConfigScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetSensorConfigScriptable.cs @@ -1,8 +1,7 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/TargetSensorConfig")] public class TargetSensorConfigScriptable : ScriptableObject, ITargetSensorConfig diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/TargetSensorConfigScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetSensorConfigScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/TargetSensorConfigScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/TargetSensorConfigScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/WorldKeyScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldKeyScriptable.cs similarity index 70% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/WorldKeyScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldKeyScriptable.cs index b9891816..d51f036c 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/WorldKeyScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldKeyScriptable.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/WorldKey")] public class WorldKeyScriptable : ScriptableObject, IWorldKey diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/WorldKeyScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldKeyScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/WorldKeyScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldKeyScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/WorldSensorConfigScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldSensorConfigScriptable.cs similarity index 80% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/WorldSensorConfigScriptable.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldSensorConfigScriptable.cs index 72f3dae9..28369fbe 100644 --- a/Package/Runtime/CrashKonijn.Goap/Scriptables/WorldSensorConfigScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldSensorConfigScriptable.cs @@ -1,8 +1,7 @@ -using CrashKonijn.Goap.Attributes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Scriptables +namespace CrashKonijn.Goap.Runtime { [CreateAssetMenu(menuName = "Goap/WorldSensorConfig")] public class WorldSensorConfigScriptable : ScriptableObject, IWorldSensorConfig diff --git a/Package/Runtime/CrashKonijn.Goap/Scriptables/WorldSensorConfigScriptable.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldSensorConfigScriptable.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Scriptables/WorldSensorConfigScriptable.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/WorldSensorConfigScriptable.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Sensors.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/GlobalTargetSensorBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalTargetSensorBase.cs similarity index 86% rename from Package/Runtime/CrashKonijn.Goap/Sensors/GlobalTargetSensorBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalTargetSensorBase.cs index 08d369c4..d3b21e7a 100644 --- a/Package/Runtime/CrashKonijn.Goap/Sensors/GlobalTargetSensorBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalTargetSensorBase.cs @@ -1,8 +1,8 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Sensors +namespace CrashKonijn.Goap.Runtime { public abstract class GlobalTargetSensorBase : IGlobalTargetSensor { diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/GlobalTargetSensorBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalTargetSensorBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Sensors/GlobalTargetSensorBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalTargetSensorBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/GlobalWorldSensorBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalWorldSensorBase.cs similarity index 82% rename from Package/Runtime/CrashKonijn.Goap/Sensors/GlobalWorldSensorBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalWorldSensorBase.cs index 98f3716e..7a27c0c9 100644 --- a/Package/Runtime/CrashKonijn.Goap/Sensors/GlobalWorldSensorBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalWorldSensorBase.cs @@ -1,10 +1,7 @@ using System; -using CrashKonijn.Goap.Classes; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; -namespace CrashKonijn.Goap.Sensors +namespace CrashKonijn.Goap.Runtime { public abstract class GlobalWorldSensorBase : IGlobalWorldSensor { diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/GlobalWorldSensorBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalWorldSensorBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Sensors/GlobalWorldSensorBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/GlobalWorldSensorBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalTargetSensorBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalTargetSensorBase.cs similarity index 86% rename from Package/Runtime/CrashKonijn.Goap/Sensors/LocalTargetSensorBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalTargetSensorBase.cs index ec3e3300..db7a8b8d 100644 --- a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalTargetSensorBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalTargetSensorBase.cs @@ -1,8 +1,8 @@ using System; -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Sensors +namespace CrashKonijn.Goap.Runtime { public abstract class LocalTargetSensorBase : ILocalTargetSensor { diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalTargetSensorBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalTargetSensorBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Sensors/LocalTargetSensorBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalTargetSensorBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalWorldSensorBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalWorldSensorBase.cs similarity index 83% rename from Package/Runtime/CrashKonijn.Goap/Sensors/LocalWorldSensorBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalWorldSensorBase.cs index 36a804a7..b1b1a0b0 100644 --- a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalWorldSensorBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalWorldSensorBase.cs @@ -1,10 +1,8 @@ using System; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.References; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; -namespace CrashKonijn.Goap.Sensors +namespace CrashKonijn.Goap.Runtime { public abstract class LocalWorldSensorBase : ILocalWorldSensor { diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/LocalWorldSensorBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalWorldSensorBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Sensors/LocalWorldSensorBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/LocalWorldSensorBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/MultiSensorBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/MultiSensorBase.cs similarity index 98% rename from Package/Runtime/CrashKonijn.Goap/Sensors/MultiSensorBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/MultiSensorBase.cs index 72640619..88656196 100644 --- a/Package/Runtime/CrashKonijn.Goap/Sensors/MultiSensorBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/MultiSensorBase.cs @@ -1,10 +1,9 @@ using System; using System.Collections.Generic; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; -using UnityEngine; -namespace CrashKonijn.Goap.Sensors +namespace CrashKonijn.Goap.Runtime { public abstract class MultiSensorBase : IMultiSensor { diff --git a/Package/Runtime/CrashKonijn.Goap/Sensors/MultiSensorBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/MultiSensorBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Sensors/MultiSensorBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Sensors/MultiSensorBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Serializables.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Serializables.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Serializables.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Serializables.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Serializables/SerializableCondition.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableCondition.cs similarity index 67% rename from Package/Runtime/CrashKonijn.Goap/Serializables/SerializableCondition.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableCondition.cs index 8dff3100..b816ad54 100644 --- a/Package/Runtime/CrashKonijn.Goap/Serializables/SerializableCondition.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableCondition.cs @@ -1,11 +1,8 @@ using System; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Serializables +namespace CrashKonijn.Goap.Runtime { [Serializable] public class SerializableCondition : ICondition diff --git a/Package/Runtime/CrashKonijn.Goap/Serializables/SerializableCondition.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableCondition.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Serializables/SerializableCondition.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableCondition.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/Serializables/SerializableEffect.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableEffect.cs similarity index 71% rename from Package/Runtime/CrashKonijn.Goap/Serializables/SerializableEffect.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableEffect.cs index 7bfce107..33ee2537 100644 --- a/Package/Runtime/CrashKonijn.Goap/Serializables/SerializableEffect.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableEffect.cs @@ -1,9 +1,8 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Scriptables; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap.Serializables +namespace CrashKonijn.Goap.Runtime { [Serializable] public class SerializableEffect : IEffect diff --git a/Package/Runtime/CrashKonijn.Goap/Serializables/SerializableEffect.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableEffect.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/Serializables/SerializableEffect.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/Serializables/SerializableEffect.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/WorldDataBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/WorldDataBase.cs similarity index 96% rename from Package/Runtime/CrashKonijn.Goap/WorldDataBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/WorldDataBase.cs index b3f4b1f7..b5b09eaf 100644 --- a/Package/Runtime/CrashKonijn.Goap/WorldDataBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/WorldDataBase.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public abstract class WorldDataBase : IWorldData { diff --git a/Package/Runtime/CrashKonijn.Goap/WorldDataBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/WorldDataBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/WorldDataBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/WorldDataBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/WorldSensorBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/WorldSensorBase.cs similarity index 76% rename from Package/Runtime/CrashKonijn.Goap/WorldSensorBase.cs rename to Package/Runtime/CrashKonijn.Goap.Runtime/WorldSensorBase.cs index 4cf2d329..1791c69f 100644 --- a/Package/Runtime/CrashKonijn.Goap/WorldSensorBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/WorldSensorBase.cs @@ -1,7 +1,7 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using UnityEngine; -namespace CrashKonijn.Goap +namespace CrashKonijn.Goap.Runtime { public abstract class WorldSensorBase : MonoBehaviour { diff --git a/Package/Runtime/CrashKonijn.Goap/WorldSensorBase.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/WorldSensorBase.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/WorldSensorBase.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/WorldSensorBase.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap/com.crashkonijn.goap.asmdef b/Package/Runtime/CrashKonijn.Goap.Runtime/com.crashkonijn.goap.runtime.asmdef similarity index 85% rename from Package/Runtime/CrashKonijn.Goap/com.crashkonijn.goap.asmdef rename to Package/Runtime/CrashKonijn.Goap.Runtime/com.crashkonijn.goap.runtime.asmdef index 5adaa162..cd5b39eb 100644 --- a/Package/Runtime/CrashKonijn.Goap/com.crashkonijn.goap.asmdef +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/com.crashkonijn.goap.runtime.asmdef @@ -1,6 +1,6 @@ { - "name": "CrashKonijn.Goap", - "rootNamespace": "CrashKonijn.Goap", + "name": "CrashKonijn.Goap.Runtime", + "rootNamespace": "CrashKonijn.Goap.Runtime", "references": [ "GUID:e52adf591423434e8c16eeb452c84a82", "GUID:d8b63aba1907145bea998dd612889d6b", diff --git a/Package/Runtime/CrashKonijn.Goap/com.crashkonijn.goap.asmdef.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/com.crashkonijn.goap.runtime.asmdef.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap/com.crashkonijn.goap.asmdef.meta rename to Package/Runtime/CrashKonijn.Goap.Runtime/com.crashkonijn.goap.runtime.asmdef.meta diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ActionRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ActionRunnerTests.cs index 6fae6dd4..6a2ff77b 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ActionRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ActionRunnerTests.cs @@ -1,9 +1,8 @@ using System; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using NSubstitute; using NSubstitute.ReturnsExtensions; using NUnit.Framework; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs index 5f555aea..8594e7ca 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs @@ -1,8 +1,8 @@ using System; -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using CrashKonijn.Goap.UnitTests.Classes; using CrashKonijn.Goap.UnitTests.Support; using FluentAssertions; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs index d8b2ff07..f2591899 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs @@ -1,15 +1,14 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.Runners; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Resolver; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Runtime; using CrashKonijn.Goap.UnitTests.Support; using NSubstitute; using NSubstitute.ReturnsExtensions; using NUnit.Framework; using UnityEngine; -using ICondition = CrashKonijn.Goap.Core.Interfaces.ICondition; +using ICondition = CrashKonijn.Goap.Core.ICondition; namespace CrashKonijn.Goap.UnitTests { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ClassResolverTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ClassResolverTests.cs index 8476aac5..b2d8eeca 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ClassResolverTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ClassResolverTests.cs @@ -1,7 +1,6 @@ using System.Linq; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolvers; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using CrashKonijn.Goap.UnitTests.Data; using CrashKonijn.Goap.UnitTests.Support; using FluentAssertions; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestAction.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestAction.cs index 22d0666e..244735f2 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestAction.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestAction.cs @@ -1,8 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.UnitTests.Classes { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestGoal.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestGoal.cs index d29f6d61..0c0c90ce 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestGoal.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestGoal.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.UnitTests.Classes { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestKeys.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestKeys.cs index 6a6582a6..dcbd891c 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestKeys.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Classes/TestKeys.cs @@ -1,5 +1,4 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.UnitTests.Classes { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ConditionObserverTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ConditionObserverTests.cs index b1722384..3d3bd5f1 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ConditionObserverTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ConditionObserverTests.cs @@ -1,8 +1,5 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Configs; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Observers; -using CrashKonijn.Goap.Resolver; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using NUnit.Framework; namespace CrashKonijn.Goap.UnitTests diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Action.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Action.cs index 26cbd872..9ccdc71f 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Action.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Action.cs @@ -1,6 +1,5 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes.RunStates; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.UnitTests.Data { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Goal.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Goal.cs index 1ae9ffa2..fa90913a 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Goal.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/Goal.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Behaviours; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.UnitTests.Data { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalTargetSensor.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalTargetSensor.cs index 98100087..db833d1b 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalTargetSensor.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalTargetSensor.cs @@ -1,6 +1,5 @@ -using CrashKonijn.Goap.Classes.References; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.UnitTests.Data { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalWorldSensor.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalWorldSensor.cs index c86def1f..e5d45098 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalWorldSensor.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/LocalWorldSensor.cs @@ -1,8 +1,6 @@ -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Classes.References; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.UnitTests.Data { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/StringCondition.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/StringCondition.cs index 944560ab..9f98cd5b 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/StringCondition.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/StringCondition.cs @@ -1,6 +1,4 @@ -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.UnitTests.Data { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/StringEffect.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/StringEffect.cs index ab591d08..85e6ccb0 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/StringEffect.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/StringEffect.cs @@ -1,6 +1,4 @@ - -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.UnitTests.Data { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestConditionObserver.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestConditionObserver.cs index 74745537..6c3ca5c0 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestConditionObserver.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestConditionObserver.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.UnitTests.Data { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestConnection.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestConnection.cs index 802ba233..a282ab75 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestConnection.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestConnection.cs @@ -1,6 +1,4 @@ -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.UnitTests.Data { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestKeyResolver.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestKeyResolver.cs index 18edc330..df40d4c1 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestKeyResolver.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Data/TestKeyResolver.cs @@ -1,6 +1,5 @@ using System; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Resolver.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.UnitTests.Data { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/GraphResolverTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/GraphResolverTests.cs index 44766c76..7e73f370 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/GraphResolverTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/GraphResolverTests.cs @@ -1,8 +1,7 @@ using System; using System.Linq; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Resolver; -using CrashKonijn.Goap.Resolver.Interfaces; using CrashKonijn.Goap.UnitTests.Data; using CrashKonijn.Goap.UnitTests.Interfaces; using FluentAssertions; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestAction.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestAction.cs index a2a7f913..0d0a9ed8 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestAction.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestAction.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.UnitTests.Interfaces { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestGoal.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestGoal.cs index f595a08a..49566bed 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestGoal.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Interfaces/ITestGoal.cs @@ -1,4 +1,4 @@ -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.UnitTests.Interfaces { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs index 1b1cf6ef..8e472082 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ManualControllerTests.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Controllers; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Runtime; using NSubstitute; using NUnit.Framework; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/MultiSensorBaseTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/MultiSensorBaseTests.cs index 92771d68..395e562d 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/MultiSensorBaseTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/MultiSensorBaseTests.cs @@ -1,9 +1,9 @@ using NUnit.Framework; using NSubstitute; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Core.Interfaces; -using CrashKonijn.Goap.Sensors; using System; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.UnitTests { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs index 09a67961..9e8d5234 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Controllers; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using NSubstitute; using NUnit.Framework; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs index 71a97b2a..c9bfb4ae 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ReactiveControllerTests.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Controllers; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using NSubstitute; using NUnit.Framework; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs index e144314d..1494f5cc 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs @@ -1,5 +1,6 @@ -using CrashKonijn.Goap.Classes.Runners; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using CrashKonijn.Goap.UnitTests.Classes; using NSubstitute; using NUnit.Framework; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs index aa1af73e..f8233f82 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs @@ -1,6 +1,7 @@ -using CrashKonijn.Goap.Behaviours; -using CrashKonijn.Goap.Classes; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using NSubstitute; using UnityEngine; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Validators/TargetKeySensorsValidatorTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Validators/TargetKeySensorsValidatorTests.cs index a8737b33..418c9656 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Validators/TargetKeySensorsValidatorTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Validators/TargetKeySensorsValidatorTests.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Validators; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using FluentAssertions; using NSubstitute; using NSubstitute.ReturnsExtensions; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Validators/WorldKeySensorsValidatorTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Validators/WorldKeySensorsValidatorTests.cs index 4aa6dd76..6ef907a3 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Validators/WorldKeySensorsValidatorTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Validators/WorldKeySensorsValidatorTests.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using CrashKonijn.Goap.Classes.Validators; -using CrashKonijn.Goap.Core.Interfaces; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; using FluentAssertions; using NSubstitute; using NSubstitute.ReturnsExtensions; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/WorldDataBaseTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/WorldDataBaseTests.cs index d5db5553..1501202b 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/WorldDataBaseTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/WorldDataBaseTests.cs @@ -1,10 +1,9 @@ using NUnit.Framework; using NSubstitute; -using CrashKonijn.Goap.Core.Enums; -using CrashKonijn.Goap.Core.Interfaces; using System; -using System.Collections.Generic; -using CrashKonijn.Goap.Configs; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Runtime; namespace CrashKonijn.Goap.UnitTests { diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/com.crashkonijn.goap.tests.asmdef b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/com.crashkonijn.goap.tests.asmdef index 89b6eac0..9748c8b8 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/com.crashkonijn.goap.tests.asmdef +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/com.crashkonijn.goap.tests.asmdef @@ -4,13 +4,13 @@ "references": [ "UnityEngine.TestRunner", "UnityEditor.TestRunner", - "CrashKonijn.Goap", "BoundfoxStudios.FluentAssertions", - "CrashKonijn.Goap.Resolver", "Unity.Mathematics", "CrashKonijn.Goap.Core", + "CrashKonijn.Goap.Runtime", + "CrashKonijn.Goap.Resolver", "CrashKonijn.Agent.Core", - "CrashKonijn.Agent" + "CrashKonijn.Agent.Runtime" ], "includePlatforms": [ "Editor" From 84102bf9ab01c4235df328f7bab0cafba71b8a80 Mon Sep 17 00:00:00 2001 From: Peter Klooster Date: Fri, 28 Jun 2024 18:28:17 +0200 Subject: [PATCH 5/6] Formatted code --- .../ConditionBuilder.cs | 14 +- .../CrashKonijn.Goap.Resolver/CostBuilder.cs | 10 +- .../EnabledBuilder.cs | 10 +- .../ExecutableBuilder.cs | 10 +- .../CrashKonijn.Goap.Resolver/Extensions.cs | 2 +- .../CrashKonijn.Goap.Resolver/GraphBuilder.cs | 39 +-- .../GraphResolver.cs | 31 +- .../GraphResolverJob.cs | 56 ++-- .../CrashKonijn.Goap.Resolver/Models/Node.cs | 8 +- .../CrashKonijn.Goap.Resolver/NativeHeap.cs | 277 ++++++++++++------ .../PositionBuilder.cs | 10 +- .../ResolveHandle.cs | 13 +- 12 files changed, 292 insertions(+), 188 deletions(-) diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/ConditionBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/ConditionBuilder.cs index c59e5830..111239cb 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/ConditionBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/ConditionBuilder.cs @@ -7,25 +7,25 @@ public class ConditionBuilder : IConditionBuilder { private readonly List conditionIndexList; private bool[] conditionsMetList; - + public ConditionBuilder(List conditionIndexList) { this.conditionIndexList = conditionIndexList; this.conditionsMetList = new bool[this.conditionIndexList.Count]; } - + public IConditionBuilder SetConditionMet(ICondition condition, bool met) { var index = this.GetIndex(condition); if (index == -1) return this; - + this.conditionsMetList[index] = met; return this; } - + private int GetIndex(ICondition condition) { for (var i = 0; i < this.conditionIndexList.Count; i++) @@ -33,15 +33,15 @@ private int GetIndex(ICondition condition) if (this.conditionIndexList[i] == condition) return i; } - + return -1; } - + public bool[] Build() { return this.conditionsMetList; } - + public void Clear() { for (var i = 0; i < this.conditionsMetList.Length; i++) diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/CostBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/CostBuilder.cs index 284cad13..d79bfed7 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/CostBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/CostBuilder.cs @@ -14,19 +14,19 @@ public CostBuilder(List actionIndexList) this.actionIndexList = actionIndexList; this.costList = this.actionIndexList.Select(x => 1f).ToArray(); } - + public ICostBuilder SetCost(IConnectable action, float cost) { var index = this.GetIndex(action); if (index == -1) return this; - + this.costList[index] = cost; return this; } - + private int GetIndex(IConnectable condition) { for (var i = 0; i < this.actionIndexList.Count; i++) @@ -34,10 +34,10 @@ private int GetIndex(IConnectable condition) if (this.actionIndexList[i] == condition) return i; } - + return -1; } - + public float[] Build() { return this.costList; diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/EnabledBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/EnabledBuilder.cs index 99762ccf..69bfe18d 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/EnabledBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/EnabledBuilder.cs @@ -14,19 +14,19 @@ public EnabledBuilder(List actionIndexList) this.actionIndexList = actionIndexList; this.enabledList = this.actionIndexList.Select(x => true).ToArray(); } - + public IEnabledBuilder SetEnabled(IConnectable action, bool executable) { var index = this.GetIndex(action); if (index == -1) return this; - + this.enabledList[index] = executable; return this; } - + private int GetIndex(IConnectable condition) { for (var i = 0; i < this.actionIndexList.Count; i++) @@ -34,7 +34,7 @@ private int GetIndex(IConnectable condition) if (this.actionIndexList[i] == condition) return i; } - + return -1; } @@ -45,7 +45,7 @@ public void Clear() this.enabledList[i] = true; } } - + public bool[] Build() { return this.enabledList; diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/ExecutableBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/ExecutableBuilder.cs index 1e599637..2d1857bf 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/ExecutableBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/ExecutableBuilder.cs @@ -14,19 +14,19 @@ public ExecutableBuilder(List actionIndexList) this.actionIndexList = actionIndexList; this.executableList = this.actionIndexList.Select(x => false).ToArray(); } - + public IExecutableBuilder SetExecutable(IConnectable action, bool executable) { var index = this.GetIndex(action); if (index == -1) return this; - + this.executableList[index] = executable; return this; } - + private int GetIndex(IConnectable condition) { for (var i = 0; i < this.actionIndexList.Count; i++) @@ -34,7 +34,7 @@ private int GetIndex(IConnectable condition) if (this.actionIndexList[i] == condition) return i; } - + return -1; } @@ -45,7 +45,7 @@ public void Clear() this.executableList[i] = false; } } - + public bool[] Build() { return this.executableList; diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs index d73235de..f199c37c 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs @@ -9,7 +9,7 @@ internal static class Extensions public static (INode[] RootNodes, INode[] ChildNodes) ToNodes(this IEnumerable actions) { var mappedNodes = actions.Select(ToNode).ToArray(); - + return ( mappedNodes.Where(x => x.IsRootNode).ToArray(), mappedNodes.Where(x => !x.IsRootNode).ToArray() diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphBuilder.cs index 10c5917c..13774bc1 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphBuilder.cs @@ -12,51 +12,54 @@ public GraphBuilder(IKeyResolver keyResolver) { this.keyResolver = keyResolver; } - + public Graph Build(IEnumerable actions) { var nodes = actions.ToNodes(); - + var graph = new Graph { RootNodes = nodes.RootNodes.ToList(), }; var allNodes = nodes.RootNodes.Union(nodes.ChildNodes).ToArray(); - + var effectMap = this.GetEffectMap(allNodes); var conditionMap = this.GetConditionMap(allNodes); - + foreach (var node in nodes.RootNodes) { this.ConnectNodes(node, effectMap, conditionMap, graph); } - - graph.UnconnectedNodes = allNodes.Where(x => !graph.ChildNodes.Contains(x) && !graph.RootNodes.Contains(x)).ToArray(); + + graph.UnconnectedNodes = allNodes.Where(x => !graph.ChildNodes.Contains(x) && !graph.RootNodes.Contains(x)) + .ToArray(); return graph; } - private void ConnectNodes(INode node, Dictionary> effectMap, Dictionary> conditionMap, IGraph graph) + private void ConnectNodes(INode node, Dictionary> effectMap, + Dictionary> conditionMap, IGraph graph) { if (!graph.ChildNodes.Contains(node) && !node.IsRootNode) graph.ChildNodes.Add(node); - + foreach (var actionNodeCondition in node.Conditions) { if (actionNodeCondition.Connections.Any()) continue; - + var key = this.keyResolver.GetKey(node.Action, actionNodeCondition.Condition); if (!effectMap.ContainsKey(key)) continue; - + actionNodeCondition.Connections = effectMap[key].ToArray(); - + foreach (var connection in actionNodeCondition.Connections) { - connection.Effects.First(x => this.keyResolver.GetKey(connection.Action, x.Effect) == key).Connections = conditionMap[key].ToArray(); + connection.Effects.First(x => this.keyResolver.GetKey(connection.Action, x.Effect) == key) + .Connections = conditionMap[key].ToArray(); } foreach (var subNode in actionNodeCondition.Connections) @@ -69,16 +72,16 @@ private void ConnectNodes(INode node, Dictionary> effectMap, private Dictionary> GetEffectMap(INode[] actionNodes) { var map = new Dictionary>(); - + foreach (var actionNode in actionNodes) { foreach (var actionNodeEffect in actionNode.Effects) { var key = this.keyResolver.GetKey(actionNode.Action, actionNodeEffect.Effect); - + if (!map.ContainsKey(key)) map[key] = new List(); - + map[key].Add(actionNode); } } @@ -89,16 +92,16 @@ private Dictionary> GetEffectMap(INode[] actionNodes) private Dictionary> GetConditionMap(INode[] actionNodes) { var map = new Dictionary>(); - + foreach (var actionNode in actionNodes) { foreach (var actionNodeConditions in actionNode.Conditions) { var key = this.keyResolver.GetKey(actionNode.Action, actionNodeConditions.Condition); - + if (!map.ContainsKey(key)) map[key] = new List(); - + map[key].Add(actionNode); } } diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs index 77b4a4d5..7d62f515 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs @@ -19,27 +19,28 @@ public class GraphResolver : IGraphResolver #else // Dictionary private NativeMultiHashMap nodeConditions; + // Dictionary private NativeMultiHashMap conditionConnections; #endif - + private Graph graph; private Queue handles = new(); public GraphResolver(IConnectable[] actions, IKeyResolver keyResolver) { this.graph = new GraphBuilder(keyResolver).Build(actions); - + this.indexList = this.graph.AllNodes.ToList(); this.actionIndexList = this.indexList.Select(x => x.Action).ToList(); - + this.conditionList = this.indexList.SelectMany(x => x.Conditions).ToList(); this.conditionIndexList = this.conditionList.Select(x => x.Condition).ToList(); - + this.CreateNodeConditions(); this.CreateConditionConnections(); } - + private void CreateNodeConditions() { #if UNITY_COLLECTIONS_2_1 @@ -47,7 +48,7 @@ private void CreateNodeConditions() #else var map = new NativeMultiHashMap(this.indexList.Count, Allocator.Persistent); #endif - + for (var i = 0; i < this.indexList.Count; i++) { var conditions = this.indexList[i].Conditions @@ -58,7 +59,7 @@ private void CreateNodeConditions() map.Add(i, condition); } } - + this.nodeConditions = map; } @@ -80,7 +81,7 @@ private void CreateConditionConnections() map.Add(i, connection); } } - + this.conditionConnections = map; } @@ -88,17 +89,17 @@ public IResolveHandle StartResolve(RunData runData) { return this.GetResolveHandle().Start(this.nodeConditions, this.conditionConnections, runData); } - + public IEnabledBuilder GetEnabledBuilder() { return new EnabledBuilder(this.actionIndexList); } - + public IExecutableBuilder GetExecutableBuilder() { return new ExecutableBuilder(this.actionIndexList); } - + public IPositionBuilder GetPositionBuilder() { return new PositionBuilder(this.actionIndexList); @@ -108,20 +109,20 @@ public ICostBuilder GetCostBuilder() { return new CostBuilder(this.actionIndexList); } - + public IConditionBuilder GetConditionBuilder() { return new ConditionBuilder(this.conditionIndexList); } - + public IGraph GetGraph() { return this.graph; } - + public int GetIndex(IConnectable action) => this.actionIndexList.IndexOf(action); public IGoapAction GetAction(int index) => this.actionIndexList[index] as IGoapAction; - + public void Dispose() { this.nodeConditions.Dispose(); diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs index cae08939..163b173f 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs @@ -10,15 +10,18 @@ namespace CrashKonijn.Goap.Resolver public struct NodeData { public int Index; + // Cost of when using this node as a parent public float P; + // Cost when performing this node public float G; + // Heuristic public float H; public int ParentIndex; public float3 Position; - + public float F => this.G + this.H; } @@ -26,10 +29,14 @@ public struct NodeData public struct RunData { public NativeArray StartIndex; + public float3 AgentPosition; + // Index = NodeIndex public NativeArray IsEnabled; + public NativeArray IsExecutable; + // Index = ConditionIndex public NativeArray ConditionsMet; public NativeArray Positions; @@ -58,6 +65,7 @@ public struct GraphResolverJob : IJob #else // Dictionary [ReadOnly] public NativeMultiHashMap NodeConditions; + // Dictionary [ReadOnly] public NativeMultiHashMap ConditionConnections; #endif @@ -67,7 +75,7 @@ public struct GraphResolverJob : IJob // Results public NativeList Result; - + public static readonly float3 InvalidPosition = new float3(float.MaxValue, float.MaxValue, float.MaxValue); [BurstCompile] @@ -75,10 +83,10 @@ public void Execute() { var nodeCount = this.NodeConditions.Count(); var runData = this.RunData; - + var openSet = new NativeHashMap(nodeCount, Allocator.Temp); var closedSet = new NativeHashMap(nodeCount, Allocator.Temp); - + // Add each start node's (goal) connections to the open set foreach (var i in runData.StartIndex) { @@ -91,18 +99,18 @@ public void Execute() ParentIndex = -1, Position = InvalidPosition }; - + // We're assuming the start node is always a goal, and as such not executable closedSet.TryAdd(nodeData.Index, nodeData); - + this.AddConnections(this.RunData, ref openSet, ref closedSet, nodeData); } - + while (!openSet.IsEmpty) { var openList = openSet.GetValueArray(Allocator.Temp); openList.Sort(new NodeSorter()); - + var currentNode = openList[0]; if (runData.IsExecutable[currentNode.Index]) @@ -113,7 +121,7 @@ public void Execute() closedSet.TryAdd(currentNode.Index, currentNode); openSet.Remove(currentNode.Index); - + // If this node has a condition that is false and has no connections, it is unresolvable if (this.HasUnresolvableCondition(currentNode.Index)) { @@ -128,8 +136,9 @@ public void Execute() openSet.Dispose(); closedSet.Dispose(); } - - private void AddConnections(RunData runData, ref NativeHashMap openSet, ref NativeHashMap closedSet, NodeData currentNode) + + private void AddConnections(RunData runData, ref NativeHashMap openSet, + ref NativeHashMap closedSet, NodeData currentNode) { foreach (var conditionIndex in this.NodeConditions.GetValuesForKey(currentNode.Index)) { @@ -137,27 +146,27 @@ private void AddConnections(RunData runData, ref NativeHashMap op { continue; } - + foreach (var neighborIndex in this.ConditionConnections.GetValuesForKey(conditionIndex)) { if (closedSet.ContainsKey(neighborIndex)) { continue; } - + if (!runData.IsEnabled[neighborIndex]) { continue; } - + var neighborPosition = this.GetPosition(currentNode, neighborIndex); - + // The cost with distance from the current node to the neighbour node var newParentG = this.GetNewCost(currentNode, neighborIndex, neighborPosition); // The cost with distance from the agent to the neighbour node var newG = newParentG + this.GetDistanceCost(runData.AgentPosition, neighborPosition); NodeData neighbor; - + // Current neighbour is not in the open set if (!openSet.TryGetValue(neighborIndex, out neighbor)) { @@ -173,7 +182,7 @@ private void AddConnections(RunData runData, ref NativeHashMap op openSet.Add(neighborIndex, neighbor); continue; } - + // This neighbour has a lower cost if (newG < neighbor.G) { @@ -181,17 +190,18 @@ private void AddConnections(RunData runData, ref NativeHashMap op neighbor.P = newParentG; neighbor.ParentIndex = currentNode.Index; neighbor.Position = neighborPosition; - + openSet.Remove(neighborIndex); openSet.Add(neighborIndex, neighbor); } } } } - + private float GetNewCost(NodeData currentNode, int neighborIndex, float3 neighborPosition) { - return currentNode.P + this.RunData.Costs[neighborIndex] + this.GetDistanceCost(currentNode, neighborPosition); + return currentNode.P + this.RunData.Costs[neighborIndex] + + this.GetDistanceCost(currentNode, neighborPosition); } private float GetHeuristic(int neighborIndex) @@ -217,7 +227,7 @@ private float GetDistanceCost(float3 previousPosition, float3 currentPosition) private float3 GetPosition(NodeData currentNode, int currentIndex) { var pos = this.RunData.Positions[currentIndex]; - + if (pos.Equals(InvalidPosition)) return currentNode.Position; @@ -242,7 +252,7 @@ private bool HasUnresolvableCondition(int currentIndex) { continue; } - + if (!this.ConditionConnections.GetValuesForKey(conditionIndex).MoveNext()) { return true; @@ -251,7 +261,7 @@ private bool HasUnresolvableCondition(int currentIndex) return false; } - + private float UnmetConditionCost(int currentIndex) { var cost = 0f; diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Node.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Node.cs index 918b26ce..aab8c7d1 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Node.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Models/Node.cs @@ -7,12 +7,12 @@ namespace CrashKonijn.Goap.Resolver public class Node : INode { public Guid Guid { get; } = Guid.NewGuid(); - + public IConnectable Action { get; set; } - public List Effects { get; set; } = new (); - public List Conditions { get; set; } = new (); + public List Effects { get; set; } = new(); + public List Conditions { get; set; } = new(); public bool IsRootNode => this.Action is IGoal; } -} +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/NativeHeap.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/NativeHeap.cs index f6da8685..75f4c66a 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/NativeHeap.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/NativeHeap.cs @@ -6,10 +6,12 @@ using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; -namespace CrashKonijn.Goap.Resolver { +namespace CrashKonijn.Goap.Resolver +{ using static UnsafeUtility; - public struct NativeHeapIndex { + public struct NativeHeapIndex + { internal int TableIndex; #if ENABLE_UNITY_COLLECTIONS_CHECKS internal int Version; @@ -43,8 +45,8 @@ public struct NativeHeapIndex { [StructLayout(LayoutKind.Sequential)] public struct NativeHeap : IDisposable where T : unmanaged - where U : unmanaged, IComparer { - + where U : unmanaged, IComparer + { #region API public const int DEFAULT_CAPACITY = 128; @@ -53,39 +55,51 @@ public struct NativeHeap : IDisposable /// Returns the number of elements that this collection can hold before the internal structures /// need to be reallocated. /// - public int Capacity { - get { - unsafe { + public int Capacity + { + get + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckReadAndThrow(this.m_Safety); #endif return this.Data->Capacity; } } - set { - unsafe { + set + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckWriteAndThrow(this.m_Safety); - if (value < this.Data->Count) { - throw new ArgumentException($"Capacity of {value} cannot be smaller than count of {this.Data->Count}."); + if (value < this.Data->Count) + { + throw new ArgumentException( + $"Capacity of {value} cannot be smaller than count of {this.Data->Count}."); } #endif - TableValue* newTable = (TableValue*)Malloc(SizeOf() * value, AlignOf(), this.Allocator); - HeapNode* newHeap = (HeapNode*)Malloc(SizeOf>() * value, AlignOf>(), this.Allocator); + TableValue* newTable = (TableValue*)Malloc(SizeOf() * value, AlignOf(), + this.Allocator); + HeapNode* newHeap = (HeapNode*)Malloc(SizeOf>() * value, AlignOf>(), + this.Allocator); int toCopy = this.Data->Capacity < value ? this.Data->Capacity : value; MemCpy(newTable, this.Data->Table, toCopy * SizeOf()); MemCpy(newHeap, this.Data->Heap, toCopy * SizeOf>()); - for (int i = 0; i < value - this.Data->Capacity; i++) { + for (int i = 0; i < value - this.Data->Capacity; i++) + { //For each new heap node, make sure that it has a new unique index - newHeap[i + this.Data->Capacity] = new HeapNode() { + newHeap[i + this.Data->Capacity] = new HeapNode() + { TableIndex = i + this.Data->Capacity }; #if ENABLE_UNITY_COLLECTIONS_CHECKS //For each new table value, make sure it has a specific version - newTable[i + this.Data->Capacity] = new TableValue() { + newTable[i + this.Data->Capacity] = new TableValue() + { Version = 1 }; #endif @@ -105,9 +119,12 @@ public int Capacity { /// /// Returns the number of elements currently contained inside this collection. /// - public int Count { - get { - unsafe { + public int Count + { + get + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckReadAndThrow(this.m_Safety); #endif @@ -120,22 +137,29 @@ public int Count { /// Gets or sets the comparator used for this Heap. Note that you can only set the comparator /// when the Heap is empty. /// - public U Comparator { - get { - unsafe { + public U Comparator + { + get + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckReadAndThrow(this.m_Safety); #endif return this.Data->Comparator; } } - set { - unsafe { + set + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckWriteAndThrow(this.m_Safety); - if (this.Data->Count != 0) { - throw new InvalidOperationException("Can only change the comparator of a NativeHeap when it is empty."); + if (this.Data->Count != 0) + { + throw new InvalidOperationException( + "Can only change the comparator of a NativeHeap when it is empty."); } #endif this.Data->Comparator = value; @@ -159,15 +183,19 @@ public U Comparator { /// always return the smallest element according to the ordering specified by this comparator. /// public NativeHeap(Allocator allocator, int initialCapacity = DEFAULT_CAPACITY, U comparator = default) : - this(initialCapacity, comparator, allocator, disposeSentinelStackDepth: 1) { } + this(initialCapacity, comparator, allocator, disposeSentinelStackDepth: 1) + { + } /// /// Disposes of this container and deallocates its memory immediately. /// /// Any NativeHeapIndex structures obtained will be invalidated and cannot be used again. /// - public void Dispose() { - unsafe { + public void Dispose() + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS DisposeSentinel.Dispose(ref this.m_Safety, ref this.m_DisposeSentinel); #endif @@ -185,12 +213,15 @@ public void Dispose() { /// Removes all elements from this container. Any NativeHeapIndex structures obtained will be /// invalidated and cannot be used again. /// - public void Clear() { - unsafe { + public void Clear() + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckWriteAndThrow(this.m_Safety); - for (int i = 0; i < this.Data->Count; i++) { + for (int i = 0; i < this.Data->Count; i++) + { var node = this.Data->Heap[i]; this.Data->Table[node.TableIndex].Version++; } @@ -206,7 +237,8 @@ public void Clear() { /// /// This method will always return true if Unity safety checks is turned off. /// - public bool IsValidIndex(NativeHeapIndex index) { + public bool IsValidIndex(NativeHeapIndex index) + { var isValid = true; var errorCode = 0; this.IsValidIndexInternal(index, ref isValid, ref errorCode); @@ -219,15 +251,18 @@ public bool IsValidIndex(NativeHeapIndex index) { /// This method will never throw if Unity safety checks is turned off. /// [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")] - public void AssertValidIndex(NativeHeapIndex index) { + public void AssertValidIndex(NativeHeapIndex index) + { var isValid = true; var errorCode = 0; this.IsValidIndexInternal(index, ref isValid, ref errorCode); - if (isValid) { + if (isValid) + { return; } - switch (errorCode) { + switch (errorCode) + { case VALIDATION_ERROR_WRONG_INSTANCE: throw new ArgumentException("The provided ItemHandle was not valid for this NativeHeap. " + "It was taken from a different instance."); @@ -247,12 +282,14 @@ public void AssertValidIndex(NativeHeapIndex index) { /// /// This method will throw an InvalidOperationException if the collection is empty. /// - public T Peek() { + public T Peek() + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckReadAndThrow(this.m_Safety); #endif - if (!this.TryPeek(out T t)) { + if (!this.TryPeek(out T t)) + { throw new InvalidOperationException("Cannot Peek NativeHeap when the count is zero."); } @@ -267,17 +304,23 @@ public T Peek() { /// /// This method will return true if an element could be obtained, or false if the container is empty. /// - public bool TryPeek(out T t) { - unsafe { + public bool TryPeek(out T t) + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckReadAndThrow(this.m_Safety); #endif - if (this.Data->Count == 0) { + if (this.Data->Count == 0) + { t = default; return false; - } else { - unsafe { + } + else + { + unsafe + { t = this.Data->Heap[0].Item; return true; } @@ -292,12 +335,14 @@ public bool TryPeek(out T t) { /// /// This method will throw an InvalidOperationException if the collection is empty. /// - public T Pop() { + public T Pop() + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckWriteAndThrow(this.m_Safety); #endif - if (!this.TryPop(out T t)) { + if (!this.TryPop(out T t)) + { throw new InvalidOperationException("Cannot Pop NativeHeap when the count is zero."); } @@ -311,13 +356,16 @@ public T Pop() { /// /// This method will return true if an element could be obtained, or false if the container is empty. /// - public bool TryPop(out T t) { - unsafe { + public bool TryPop(out T t) + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckWriteAndThrow(this.m_Safety); #endif - if (this.Data->Count == 0) { + if (this.Data->Count == 0) + { t = default; return false; } @@ -356,13 +404,16 @@ public bool TryPop(out T t) { /// /// This method is an O(log(n)) operation. /// - public NativeHeapIndex Insert(in T t) { - unsafe { + public NativeHeapIndex Insert(in T t) + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckWriteAndThrow(this.m_Safety); #endif - if (this.Data->Count == this.Data->Capacity) { + if (this.Data->Count == this.Data->Capacity) + { this.Capacity *= 2; } @@ -373,7 +424,8 @@ public NativeHeapIndex Insert(in T t) { this.InsertAndBubbleUp(node, insertIndex); - return new NativeHeapIndex() { + return new NativeHeapIndex() + { TableIndex = node.TableIndex, #if ENABLE_UNITY_COLLECTIONS_CHECKS Version = this.Data->Table[node.TableIndex].Version, @@ -393,8 +445,10 @@ public NativeHeapIndex Insert(in T t) { /// /// This method is an O(log(n)) operation. /// - public T Remove(NativeHeapIndex index) { - unsafe { + public T Remove(NativeHeapIndex index) + { + unsafe + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckWriteAndThrow(this.m_Safety); @@ -413,10 +467,12 @@ public T Remove(NativeHeapIndex index) { //First we move the node to remove to the end of the heap WriteArrayElement(this.Data->Heap, this.Data->Count, toRemove); - if (indexToRemove != 0) { + if (indexToRemove != 0) + { int parentIndex = (indexToRemove - 1) / 2; var parentNode = this.Data->Heap[parentIndex]; - if (this.Data->Comparator.Compare(lastNode.Item, parentNode.Item) < 0) { + if (this.Data->Comparator.Compare(lastNode.Item, parentNode.Item) < 0) + { this.InsertAndBubbleUp(lastNode, indexToRemove); return toRemove.Item; } @@ -443,24 +499,28 @@ public T Remove(NativeHeapIndex index) { internal unsafe AtomicSafetyHandle m_Safety; - [NativeSetClassTypeToNullOnSchedule] - internal unsafe DisposeSentinel m_DisposeSentinel; + [NativeSetClassTypeToNullOnSchedule] internal unsafe DisposeSentinel m_DisposeSentinel; #endif - [NativeDisableUnsafePtrRestriction] - internal unsafe HeapData* Data; + [NativeDisableUnsafePtrRestriction] internal unsafe HeapData* Data; internal unsafe Allocator Allocator; - internal unsafe NativeHeap(int initialCapacity, U comparator, Allocator allocator, int disposeSentinelStackDepth) { + internal unsafe NativeHeap(int initialCapacity, U comparator, Allocator allocator, + int disposeSentinelStackDepth) + { #if ENABLE_UNITY_COLLECTIONS_CHECKS - if (initialCapacity <= 0) { - throw new ArgumentException(nameof(initialCapacity), "Must provide an initial capacity that is greater than zero."); + if (initialCapacity <= 0) + { + throw new ArgumentException(nameof(initialCapacity), + "Must provide an initial capacity that is greater than zero."); } if (allocator == Allocator.None || allocator == Allocator.Invalid || - allocator == Allocator.AudioKernel) { - throw new ArgumentException(nameof(allocator), "Must provide an Allocator type of Temp, TempJob, or Persistent."); + allocator == Allocator.AudioKernel) + { + throw new ArgumentException(nameof(allocator), + "Must provide an Allocator type of Temp, TempJob, or Persistent."); } DisposeSentinel.Create(out this.m_Safety, out this.m_DisposeSentinel, disposeSentinelStackDepth, allocator); @@ -468,17 +528,22 @@ internal unsafe NativeHeap(int initialCapacity, U comparator, Allocator allocato #endif this.Data = (HeapData*)Malloc(SizeOf>(), AlignOf>(), allocator); - this.Data->Heap = (HeapNode*)Malloc(SizeOf>() * initialCapacity, AlignOf>(), allocator); - this.Data->Table = (TableValue*)Malloc(SizeOf() * initialCapacity, AlignOf(), allocator); + this.Data->Heap = (HeapNode*)Malloc(SizeOf>() * initialCapacity, AlignOf>(), + allocator); + this.Data->Table = + (TableValue*)Malloc(SizeOf() * initialCapacity, AlignOf(), allocator); this.Allocator = allocator; - for (int i = 0; i < initialCapacity; i++) { - this.Data->Heap[i] = new HeapNode() { + for (int i = 0; i < initialCapacity; i++) + { + this.Data->Heap[i] = new HeapNode() + { TableIndex = i }; #if ENABLE_UNITY_COLLECTIONS_CHECKS - this.Data->Table[i] = new TableValue() { + this.Data->Table[i] = new TableValue() + { Version = 1 }; #endif @@ -489,22 +554,27 @@ internal unsafe NativeHeap(int initialCapacity, U comparator, Allocator allocato this.Data->Comparator = comparator; } - internal unsafe void InsertAndBubbleDown(HeapNode node, int insertIndex) { - while (true) { + internal unsafe void InsertAndBubbleDown(HeapNode node, int insertIndex) + { + while (true) + { int indexL = insertIndex * 2 + 1; int indexR = insertIndex * 2 + 2; //If the left index is off the end, we are finished - if (indexL >= this.Data->Count) { + if (indexL >= this.Data->Count) + { break; } if (indexR >= this.Data->Count || this.Data->Comparator.Compare(this.Data->Heap[indexL].Item, - this.Data->Heap[indexR].Item) <= 0) { + this.Data->Heap[indexR].Item) <= 0) + { //left is smaller (or the only child) var leftNode = this.Data->Heap[indexL]; - if (this.Data->Comparator.Compare(node.Item, leftNode.Item) <= 0) { + if (this.Data->Comparator.Compare(node.Item, leftNode.Item) <= 0) + { //Last is smaller or equal to left, we are done break; } @@ -512,11 +582,14 @@ internal unsafe void InsertAndBubbleDown(HeapNode node, int insertIndex) { this.Data->Heap[insertIndex] = leftNode; this.Data->Table[leftNode.TableIndex].HeapIndex = insertIndex; insertIndex = indexL; - } else { + } + else + { //right is smaller var rightNode = this.Data->Heap[indexR]; - if (this.Data->Comparator.Compare(node.Item, rightNode.Item) <= 0) { + if (this.Data->Comparator.Compare(node.Item, rightNode.Item) <= 0) + { //Last is smaller than or equal to right, we are done break; } @@ -531,13 +604,16 @@ internal unsafe void InsertAndBubbleDown(HeapNode node, int insertIndex) { this.Data->Table[node.TableIndex].HeapIndex = insertIndex; } - internal unsafe void InsertAndBubbleUp(HeapNode node, int insertIndex) { - while (insertIndex != 0) { + internal unsafe void InsertAndBubbleUp(HeapNode node, int insertIndex) + { + while (insertIndex != 0) + { int parentIndex = (insertIndex - 1) / 2; var parentNode = this.Data->Heap[parentIndex]; //If parent is actually less or equal to us, we are ok and can break out - if (this.Data->Comparator.Compare(parentNode.Item, node.Item) <= 0) { + if (this.Data->Comparator.Compare(parentNode.Item, node.Item) <= 0) + { break; } @@ -555,24 +631,28 @@ internal unsafe void InsertAndBubbleUp(HeapNode node, int insertIndex) { } [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")] - internal unsafe void IsValidIndexInternal(NativeHeapIndex index, ref bool result, ref int errorCode) { + internal unsafe void IsValidIndexInternal(NativeHeapIndex index, ref bool result, ref int errorCode) + { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckReadAndThrow(this.m_Safety); - if (index.StructureId != this.Id) { + if (index.StructureId != this.Id) + { errorCode = VALIDATION_ERROR_WRONG_INSTANCE; result = false; return; } - if (index.TableIndex >= this.Data->Capacity) { + if (index.TableIndex >= this.Data->Capacity) + { errorCode = VALIDATION_ERROR_INVALID; result = false; return; } TableValue tableValue = this.Data->Table[index.TableIndex]; - if (tableValue.Version != index.Version) { + if (tableValue.Version != index.Version) + { errorCode = VALIDATION_ERROR_REMOVED; result = false; return; @@ -585,11 +665,12 @@ internal unsafe void IsValidIndexInternal(NativeHeapIndex index, ref bool result internal unsafe class NativeHeapDebugView where T : unmanaged - where U : unmanaged, IComparer { - + where U : unmanaged, IComparer + { private NativeHeap _heap; - public NativeHeapDebugView(NativeHeap heap) { + public NativeHeapDebugView(NativeHeap heap) + { this._heap = heap; } @@ -597,21 +678,27 @@ public NativeHeapDebugView(NativeHeap heap) { public int Capacity => this._heap.Capacity; public U Comparator => this._heap.Comparator; - public T[] Items { - get { + public T[] Items + { + get + { T[] items = new T[this._heap.Count]; - for (int i = 0; i < items.Length; i++) { - unsafe { + for (int i = 0; i < items.Length; i++) + { + unsafe + { items[i] = this._heap.Data->Heap[i].Item; } } + return items; } } } [StructLayout(LayoutKind.Sequential)] - internal unsafe struct TableValue { + internal unsafe struct TableValue + { public int HeapIndex; #if ENABLE_UNITY_COLLECTIONS_CHECKS public int Version; @@ -620,7 +707,8 @@ internal unsafe struct TableValue { [StructLayout(LayoutKind.Sequential)] internal unsafe struct HeapData - where T : unmanaged { + where T : unmanaged + { public int Count; public int Capacity; public unsafe HeapNode* Heap; @@ -630,7 +718,8 @@ internal unsafe struct HeapData [StructLayout(LayoutKind.Sequential)] internal unsafe struct HeapNode - where T : unmanaged { + where T : unmanaged + { public T Item; public int TableIndex; } diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/PositionBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/PositionBuilder.cs index b145a649..88da6af8 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/PositionBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/PositionBuilder.cs @@ -16,19 +16,19 @@ public PositionBuilder(List actionIndexList) this.actionIndexList = actionIndexList; this.executableList = this.actionIndexList.Select(x => GraphResolverJob.InvalidPosition).ToArray(); } - + public IPositionBuilder SetPosition(IConnectable action, Vector3? position) { var index = this.GetIndex(action); if (index == -1) return this; - + this.executableList[index] = position ?? GraphResolverJob.InvalidPosition; return this; } - + private int GetIndex(IConnectable condition) { for (var i = 0; i < this.actionIndexList.Count; i++) @@ -36,10 +36,10 @@ private int GetIndex(IConnectable condition) if (this.actionIndexList[i] == condition) return i; } - + return -1; } - + public float3[] Build() { return this.executableList; diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs index e56d4d03..daf04630 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs @@ -33,7 +33,8 @@ public ResolveHandle Start(NativeParallelMultiHashMap nodeConditions, return this; } #else - public ResolveHandle Start(NativeMultiHashMap nodeConditions, NativeMultiHashMap conditionConnections, RunData runData) + public ResolveHandle Start(NativeMultiHashMap nodeConditions, + NativeMultiHashMap conditionConnections, RunData runData) { this.job = new GraphResolverJob { @@ -42,7 +43,7 @@ public ResolveHandle Start(NativeMultiHashMap nodeConditions, NativeMu RunData = runData, Result = new NativeList(Allocator.TempJob) }; - + this.handle = this.job.Schedule(); return this; @@ -52,16 +53,16 @@ public ResolveHandle Start(NativeMultiHashMap nodeConditions, NativeMu public IConnectable[] Complete() { this.handle.Complete(); - + this.results.Clear(); - + foreach (var data in this.job.Result) { this.results.Add(this.graphResolver.GetAction(data.Index)); } - + this.job.Result.Dispose(); - + this.job.RunData.StartIndex.Dispose(); this.job.RunData.IsEnabled.Dispose(); this.job.RunData.IsExecutable.Dispose(); From 45c43cc6628cd5e2e8ddbb11f9a1fbc0a9444535 Mon Sep 17 00:00:00 2001 From: Peter Klooster Date: Fri, 28 Jun 2024 18:34:52 +0200 Subject: [PATCH 6/6] Fixed certain extension method usage, improved editor namespaces --- .../Complex/Behaviours/ComplexTextBehaviour.cs | 2 +- .../Simple/Behaviours/SimpleHungerBehaviour.cs | 2 +- .../Simple/Behaviours/SimpleTextBehaviour.cs | 2 +- Demo/CrashKonijn.Goap.Editor.csproj.DotSettings | 11 +++++++++++ .../About/AboutEditorWindow.cs | 3 +-- .../Attributes/ActionClassDrawer.cs | 2 +- .../Attributes/ButtonAttribute.cs | 6 ++---- .../Attributes/ClassDrawerBase.cs | 2 +- .../Attributes/GoalClassDrawer.cs | 2 +- .../Attributes/TargetSensorDrawer.cs | 2 +- .../Attributes/WorldSensorDrawer.cs | 2 +- .../CrashKonijn.Goap.Editor/Classes/DebugGraph.cs | 6 +----- .../CrashKonijn.Goap.Editor/Classes/Mappers.cs | 3 +-- .../Classes/Models/Graph.cs | 2 +- .../Classes/Models/Node.cs | 2 +- .../Classes/Models/NodeCondition.cs | 3 +-- .../Classes/Models/NodeEffect.cs | 2 +- .../CrashKonijn.Goap.Editor/Classes/Nodes.cs | 3 +-- .../CrashKonijn.Goap.Editor/Classes/RenderNode.cs | 5 ++--- .../Drawers/AgentTypeDrawer.cs | 3 +-- .../Drawers/BezierDrawer.cs | 2 +- .../CrashKonijn.Goap.Editor/Drawers/DragDrawer.cs | 2 +- .../CrashKonijn.Goap.Editor/Drawers/LineDrawer.cs | 2 +- .../CrashKonijn.Goap.Editor/Drawers/LogDrawer.cs | 3 +-- .../Drawers/ObjectDrawer.cs | 2 +- .../Drawers/SerializableEffectDrawer.cs | 2 +- .../Drawers/WorldDataDrawer.cs | 5 ++--- .../Elements/ActionList.cs | 6 ++---- .../Elements/ActionPropertiesElement.cs | 3 +-- .../Elements/CapabilityActionElement.cs | 2 +- .../Elements/CapabilityConditionElement.cs | 2 +- .../Elements/CapabilityEffectElement.cs | 2 +- .../Elements/CapabilityGoalElement.cs | 2 +- .../Elements/CapabilitySensorElement.cs | 2 +- .../CrashKonijn.Goap.Editor/Elements/Card.cs | 2 +- .../CrashKonijn.Goap.Editor/Elements/Circle.cs | 2 +- .../Elements/ClassRefField.cs | 2 +- .../Elements/ConditionList.cs | 3 +-- .../Elements/EffectList.cs | 2 +- .../CrashKonijn.Goap.Editor/Elements/GoalList.cs | 2 +- .../CrashKonijn.Goap.Editor/Elements/Header.cs | 2 +- .../Elements/HorizontalSplitView.cs | 2 +- .../Elements/LabeledField.cs | 6 +++--- .../Elements/ListElementBase.cs | 7 ++----- .../Elements/SensorList.cs | 2 +- .../GraphViewer/ConditionElement.cs | 3 +-- .../GraphViewer/ConnectionElement.cs | 3 +-- .../GraphViewer/EditorWindowValues.cs | 3 +-- .../GraphViewer/EffectElement.cs | 2 +- .../GraphViewer/GraphViewerEditorWindow.cs | 5 +---- .../GraphViewer/NodeElement.cs | 5 ++--- .../GraphViewer/ToolbarElement.cs | 2 +- .../TypeDrawers/AgentEditor.cs | 5 +---- .../TypeDrawers/AgentTypeConfigEditor.cs | 3 +-- .../TypeDrawers/AgentTypeFactoryBaseEditor.cs | 2 +- .../CapabilityConfigScriptableEditor.cs | 6 ++---- .../TypeDrawers/GeneratorEditor.cs | 2 +- .../TypeDrawers/GoapActionProviderEditor.cs | 10 ++++------ .../TypeDrawers/GoapRunnerEditor.cs | 7 ++----- .../Classes/Builders/TargetKeyBuilder.cs | 3 ++- .../Classes/Builders/WorldKeyBuilder.cs | 3 ++- .../CrashKonijn.Goap.Runtime/Extensions.cs | 15 --------------- 62 files changed, 86 insertions(+), 127 deletions(-) create mode 100644 Demo/CrashKonijn.Goap.Editor.csproj.DotSettings diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs index e9cbce23..a1713cf9 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs @@ -35,7 +35,7 @@ private string GetText() if (this.actionProvider.Agent.ActionState.Action is null) return $"{this.GetTypeText()}\nIdle"; - return $"{this.GetTypeText()}\n{Runtime.Extensions.GetGenericTypeName(this.actionProvider.CurrentGoal.GetType())}\n{Runtime.Extensions.GetGenericTypeName(this.actionProvider.Agent.ActionState.Action.GetType())}\n{this.agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; + return $"{this.GetTypeText()}\n{this.actionProvider.CurrentGoal.GetType().GetGenericTypeName()}\n{this.actionProvider.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; } private string GetTypeText() diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleHungerBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleHungerBehaviour.cs index 02176d74..03dff1fb 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleHungerBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleHungerBehaviour.cs @@ -1,6 +1,6 @@ using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Demos.Simple.Goap.Actions; -using CrashKonijn.Goap.Editor.Attributes; +using CrashKonijn.Goap.Editor; using UnityEngine; namespace CrashKonijn.Goap.Demos.Simple.Behaviours diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs index e02aa85f..0b7f0bfe 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs @@ -34,7 +34,7 @@ private string GetText() if (this.actionProvider.Agent.ActionState.Action is null) return "Idle"; - return $"{Extensions.GetGenericTypeName(this.actionProvider.CurrentGoal.GetType())}\n{Extensions.GetGenericTypeName(this.actionProvider.Agent.ActionState.Action.GetType())}\n{this.agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; + return $"{this.actionProvider.CurrentGoal.GetType().GetGenericTypeName()}\n{this.actionProvider.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; } } } \ No newline at end of file diff --git a/Demo/CrashKonijn.Goap.Editor.csproj.DotSettings b/Demo/CrashKonijn.Goap.Editor.csproj.DotSettings new file mode 100644 index 00000000..a1b41964 --- /dev/null +++ b/Demo/CrashKonijn.Goap.Editor.csproj.DotSettings @@ -0,0 +1,11 @@ + + True + True + True + True + True + True + True + True + True + True \ No newline at end of file diff --git a/Package/Editor/CrashKonijn.Goap.Editor/About/AboutEditorWindow.cs b/Package/Editor/CrashKonijn.Goap.Editor/About/AboutEditorWindow.cs index f2981eeb..dcb77d79 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/About/AboutEditorWindow.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/About/AboutEditorWindow.cs @@ -1,12 +1,11 @@ using System.Linq; -using CrashKonijn.Goap.Editor.Elements; using UnityEditor; using UnityEditor.PackageManager; using UnityEditor.PackageManager.Requests; using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.About +namespace CrashKonijn.Goap.Editor { public class AboutEditorWindow : EditorWindow { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ActionClassDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ActionClassDrawer.cs index c003e548..243aaf4e 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ActionClassDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ActionClassDrawer.cs @@ -2,7 +2,7 @@ using CrashKonijn.Goap.Runtime; using UnityEditor; -namespace CrashKonijn.Goap.Editor.Attributes +namespace CrashKonijn.Goap.Editor { [CustomPropertyDrawer(typeof(ActionClassAttribute))] public class ActionClassDrawer : ClassDrawerBase diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ButtonAttribute.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ButtonAttribute.cs index 998fca85..01c84f56 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ButtonAttribute.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ButtonAttribute.cs @@ -1,10 +1,8 @@ -#if UNITY_EDITOR + using UnityEditor; -#endif - using UnityEngine; -namespace CrashKonijn.Goap.Editor.Attributes +namespace CrashKonijn.Goap.Editor { #if UNITY_EDITOR [CustomPropertyDrawer(typeof(ButtonAttribute))] diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ClassDrawerBase.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ClassDrawerBase.cs index e7a32d1e..1288a286 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ClassDrawerBase.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/ClassDrawerBase.cs @@ -4,7 +4,7 @@ using UnityEditor; using UnityEngine; -namespace CrashKonijn.Goap.Editor.Attributes +namespace CrashKonijn.Goap.Editor { public abstract class ClassDrawerBase : PropertyDrawer { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/GoalClassDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/GoalClassDrawer.cs index 58f7473d..ce3d6882 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/GoalClassDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/GoalClassDrawer.cs @@ -2,7 +2,7 @@ using CrashKonijn.Goap.Runtime; using UnityEditor; -namespace CrashKonijn.Goap.Editor.Attributes +namespace CrashKonijn.Goap.Editor { [CustomPropertyDrawer(typeof(GoalClassAttribute))] public class GoalClassDrawer : ClassDrawerBase diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/TargetSensorDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/TargetSensorDrawer.cs index 6edf7511..5ec4c47b 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/TargetSensorDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/TargetSensorDrawer.cs @@ -2,7 +2,7 @@ using CrashKonijn.Goap.Runtime; using UnityEditor; -namespace CrashKonijn.Goap.Editor.Attributes +namespace CrashKonijn.Goap.Editor { [CustomPropertyDrawer(typeof(TargetSensorAttribute))] public class TargetSensorDrawer : ClassDrawerBase diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/WorldSensorDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/WorldSensorDrawer.cs index c04ec3dd..253be4ca 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Attributes/WorldSensorDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Attributes/WorldSensorDrawer.cs @@ -2,7 +2,7 @@ using CrashKonijn.Goap.Runtime; using UnityEditor; -namespace CrashKonijn.Goap.Editor.Attributes +namespace CrashKonijn.Goap.Editor { [CustomPropertyDrawer(typeof(WorldSensorAttribute))] public class WorldSensorDrawer : ClassDrawerBase diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/DebugGraph.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/DebugGraph.cs index e4a40e82..b254d7d3 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/DebugGraph.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/DebugGraph.cs @@ -1,11 +1,7 @@ using System; -using System.Collections.Generic; using System.Linq; -using NUnit.Framework; -using Graph = CrashKonijn.Goap.Editor.Classes.Models.Graph; -using Node = CrashKonijn.Goap.Editor.Classes.Models.Node; -namespace CrashKonijn.Goap.Editor.Classes +namespace CrashKonijn.Goap.Editor { public class DebugGraph { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Mappers.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Mappers.cs index 35d6497f..bf48f22c 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Mappers.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Mappers.cs @@ -1,8 +1,7 @@ using System.Linq; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Editor.Classes.Models; -namespace CrashKonijn.Goap.Editor.Classes +namespace CrashKonijn.Goap.Editor { public static class Mappers { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Graph.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Graph.cs index 68c01982..345b24cb 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Graph.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Graph.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace CrashKonijn.Goap.Editor.Classes.Models +namespace CrashKonijn.Goap.Editor { public class Graph { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Node.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Node.cs index 050e008d..a92faa6e 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Node.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/Node.cs @@ -1,7 +1,7 @@ using System; using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Editor.Classes.Models +namespace CrashKonijn.Goap.Editor { public class Node { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeCondition.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeCondition.cs index fb664ebe..7bc27e62 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeCondition.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeCondition.cs @@ -1,7 +1,6 @@ using System; -using System.Collections.Generic; -namespace CrashKonijn.Goap.Editor.Classes.Models +namespace CrashKonijn.Goap.Editor { public class NodeCondition { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeEffect.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeEffect.cs index 256f7162..35974459 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeEffect.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Models/NodeEffect.cs @@ -1,7 +1,7 @@ using System; using CrashKonijn.Goap.Core; -namespace CrashKonijn.Goap.Editor.Classes.Models +namespace CrashKonijn.Goap.Editor { public class NodeEffect { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Nodes.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Nodes.cs index 55007344..b0618cd5 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/Nodes.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/Nodes.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using CrashKonijn.Goap.Editor.Classes.Models; -namespace CrashKonijn.Goap.Editor.Classes +namespace CrashKonijn.Goap.Editor { public class Nodes { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Classes/RenderNode.cs b/Package/Editor/CrashKonijn.Goap.Editor/Classes/RenderNode.cs index a231f2ae..8d104a12 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Classes/RenderNode.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Classes/RenderNode.cs @@ -1,7 +1,6 @@ -using CrashKonijn.Goap.Editor.Classes.Models; -using UnityEngine; +using UnityEngine; -namespace CrashKonijn.Goap.Editor.Classes +namespace CrashKonijn.Goap.Editor { public class RenderNode { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/AgentTypeDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/AgentTypeDrawer.cs index 7dcf1894..1a2935db 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/AgentTypeDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/AgentTypeDrawer.cs @@ -1,8 +1,7 @@ using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Editor.Elements; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Drawers +namespace CrashKonijn.Goap.Editor { public class AgentTypeDrawer : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/BezierDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/BezierDrawer.cs index 5dd20b4b..97e406e7 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/BezierDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/BezierDrawer.cs @@ -1,7 +1,7 @@ using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Drawers +namespace CrashKonijn.Goap.Editor { public class BezierDrawer : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/DragDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/DragDrawer.cs index a4c35692..aeae5af0 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/DragDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/DragDrawer.cs @@ -2,7 +2,7 @@ using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Drawers +namespace CrashKonijn.Goap.Editor { public class DragDrawer : PointerManipulator { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LineDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LineDrawer.cs index 8148cd11..d4e86039 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LineDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LineDrawer.cs @@ -1,7 +1,7 @@ using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Drawers +namespace CrashKonijn.Goap.Editor { public class LineDrawer : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LogDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LogDrawer.cs index 897869e2..40de67d6 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LogDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/LogDrawer.cs @@ -1,9 +1,8 @@ using System.Linq; using CrashKonijn.Agent.Core; -using CrashKonijn.Goap.Editor.Elements; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Drawers +namespace CrashKonijn.Goap.Editor { public class LogDrawer : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/ObjectDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/ObjectDrawer.cs index 9d84d03d..6409ed54 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/ObjectDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/ObjectDrawer.cs @@ -4,7 +4,7 @@ using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Drawers +namespace CrashKonijn.Goap.Editor { public class ObjectDrawer : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/SerializableEffectDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/SerializableEffectDrawer.cs index f266edc6..5b667f05 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/SerializableEffectDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/SerializableEffectDrawer.cs @@ -3,7 +3,7 @@ using UnityEditor; using UnityEngine; -namespace CrashKonijn.Goap.Editor.Drawers +namespace CrashKonijn.Goap.Editor { [CustomPropertyDrawer(typeof(SerializableEffect))] public class SerializableEffectDrawer : PropertyDrawer diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/WorldDataDrawer.cs b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/WorldDataDrawer.cs index 39cc965e..12cec351 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Drawers/WorldDataDrawer.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Drawers/WorldDataDrawer.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Generic; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Editor.Elements; -using CrashKonijn.Goap.Runtime; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Drawers +namespace CrashKonijn.Goap.Editor { public class WorldDataDrawer : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionList.cs index 785ffea4..b43c168e 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionList.cs @@ -1,11 +1,9 @@ -using System; -using System.Linq; -using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class ActionList : ListElementBase { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs index 757705a6..01fccdc2 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ActionPropertiesElement.cs @@ -6,10 +6,9 @@ using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; -using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class ActionPropertiesElement : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityActionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityActionElement.cs index 72de4902..673a89f6 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityActionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityActionElement.cs @@ -3,7 +3,7 @@ using UnityEditor; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class CapabilityActionElement : VisualElement, IFoldable { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityConditionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityConditionElement.cs index 4dc0447e..6ccefd5e 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityConditionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityConditionElement.cs @@ -2,7 +2,7 @@ using CrashKonijn.Goap.Runtime; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class CapabilityConditionElement : VisualElement, IFoldable { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityEffectElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityEffectElement.cs index e04e6940..b6e6af77 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityEffectElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityEffectElement.cs @@ -2,7 +2,7 @@ using CrashKonijn.Goap.Runtime; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class CapabilityEffectElement : VisualElement, IFoldable { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityGoalElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityGoalElement.cs index ac5b824d..b3a39c01 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityGoalElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilityGoalElement.cs @@ -2,7 +2,7 @@ using UnityEditor; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class CapabilityGoalElement : VisualElement, IFoldable { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilitySensorElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilitySensorElement.cs index 9e66f7fa..322fd9b2 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilitySensorElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/CapabilitySensorElement.cs @@ -1,7 +1,7 @@ using CrashKonijn.Goap.Runtime; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class CapabilitySensorElement : VisualElement, IFoldable { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/Card.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/Card.cs index 04bdb08d..644ef6bd 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/Card.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/Card.cs @@ -1,7 +1,7 @@ using System; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class Card : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/Circle.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/Circle.cs index 58f8e615..82a81789 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/Circle.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/Circle.cs @@ -1,7 +1,7 @@ using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class Circle : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ClassRefField.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ClassRefField.cs index ffc0c5ce..35fb890a 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ClassRefField.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ClassRefField.cs @@ -6,7 +6,7 @@ using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class ClassRefField : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ConditionList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ConditionList.cs index a21e8506..fbeef3c9 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ConditionList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ConditionList.cs @@ -3,10 +3,9 @@ using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Runtime; using UnityEditor; -using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class ConditionList : ListElementBase { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/EffectList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/EffectList.cs index 7935bd35..23374205 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/EffectList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/EffectList.cs @@ -5,7 +5,7 @@ using UnityEditor; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class EffectList : ListElementBase { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/GoalList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/GoalList.cs index 9e7d5cdd..53349a40 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/GoalList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/GoalList.cs @@ -2,7 +2,7 @@ using CrashKonijn.Goap.Runtime; using UnityEditor; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class GoalList : ListElementBase { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/Header.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/Header.cs index 60e55d17..ae1dcf1b 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/Header.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/Header.cs @@ -1,6 +1,6 @@ using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class Header : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/HorizontalSplitView.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/HorizontalSplitView.cs index 6660cc55..99d671bb 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/HorizontalSplitView.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/HorizontalSplitView.cs @@ -1,7 +1,7 @@ using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class HorizontalSplitView : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/LabeledField.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/LabeledField.cs index c3cb964e..c53a0b99 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/LabeledField.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/LabeledField.cs @@ -1,7 +1,7 @@ -namespace CrashKonijn.Goap.Editor.Elements -{ - using UnityEngine.UIElements; +using UnityEngine.UIElements; +namespace CrashKonijn.Goap.Editor +{ public class LabeledField : VisualElement where T : VisualElement, new() { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ListElementBase.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ListElementBase.cs index 57ec2f91..ce3c6cdb 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/ListElementBase.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/ListElementBase.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; using UnityEditor; -using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public abstract class ListElementBase : VisualElement where TItemType : class, new() diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Elements/SensorList.cs b/Package/Editor/CrashKonijn.Goap.Editor/Elements/SensorList.cs index 53d03883..64285ca2 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Elements/SensorList.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Elements/SensorList.cs @@ -4,7 +4,7 @@ using CrashKonijn.Goap.Runtime; using UnityEditor; -namespace CrashKonijn.Goap.Editor.Elements +namespace CrashKonijn.Goap.Editor { public class SensorList : ListElementBase where TSensorType : BehaviourSensor, new() diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs index ae87aa40..0b695e38 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConditionElement.cs @@ -1,10 +1,9 @@ using System.Linq; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Editor.Elements; using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.GraphViewer +namespace CrashKonijn.Goap.Editor { public class ConditionElement : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs index a8dd942c..e352b293 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs @@ -1,10 +1,9 @@ using System.Linq; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Editor.Drawers; using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.GraphViewer +namespace CrashKonijn.Goap.Editor { public class ConnectionElement : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EditorWindowValues.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EditorWindowValues.cs index cbaaba20..9bb2b860 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EditorWindowValues.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EditorWindowValues.cs @@ -1,8 +1,7 @@ using System; -using CrashKonijn.Goap.Editor.Drawers; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.GraphViewer +namespace CrashKonijn.Goap.Editor { public class EditorWindowValues { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EffectElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EffectElement.cs index decdae20..38156f33 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EffectElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/EffectElement.cs @@ -1,7 +1,7 @@ using CrashKonijn.Goap.Core; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.GraphViewer +namespace CrashKonijn.Goap.Editor { public class EffectElement : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs index 947ca79b..299c9ecc 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs @@ -1,15 +1,12 @@ using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Editor.Drawers; using CrashKonijn.Goap.Resolver; using CrashKonijn.Goap.Runtime; using UnityEditor; -using UnityEditor.Graphs; -using UnityEditor.TextCore.Text; using UnityEngine; using UnityEngine.UIElements; using Object = UnityEngine.Object; -namespace CrashKonijn.Goap.Editor.GraphViewer +namespace CrashKonijn.Goap.Editor { public class GraphViewerEditorWindow : EditorWindow { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs index 9ec9bed4..cb50fcdd 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs @@ -1,12 +1,11 @@ using System.Linq; using CrashKonijn.Agent.Core; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Core; -using CrashKonijn.Goap.Editor.Elements; -using CrashKonijn.Goap.Runtime; using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.GraphViewer +namespace CrashKonijn.Goap.Editor { public class NodeElement : VisualElement { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ToolbarElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ToolbarElement.cs index 1d5acdb6..4ddae133 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ToolbarElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ToolbarElement.cs @@ -2,7 +2,7 @@ using UnityEditor.UIElements; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.GraphViewer +namespace CrashKonijn.Goap.Editor { public class ToolbarElement : Toolbar { diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs index 08879365..c24e4620 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs @@ -1,13 +1,10 @@ using CrashKonijn.Agent.Runtime; -using CrashKonijn.Goap.Editor.Drawers; -using CrashKonijn.Goap.Editor.Elements; -using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.TypeDrawers +namespace CrashKonijn.Goap.Editor { [CustomEditor(typeof(AgentBehaviour))] public class AgentEditor : UnityEditor.Editor diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeConfigEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeConfigEditor.cs index f6eb9bbb..4cf946f4 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeConfigEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeConfigEditor.cs @@ -1,12 +1,11 @@ using System; -using CrashKonijn.Goap.Editor.Elements; using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.TypeDrawers +namespace CrashKonijn.Goap.Editor { [CustomEditor(typeof(GoapSetConfigScriptable))] public class AgentTypeConfigEditor : UnityEditor.Editor diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeFactoryBaseEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeFactoryBaseEditor.cs index 7c448009..83c999bb 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeFactoryBaseEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentTypeFactoryBaseEditor.cs @@ -3,7 +3,7 @@ using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.TypeDrawers +namespace CrashKonijn.Goap.Editor { [CustomEditor(typeof(AgentTypeFactoryBase), true)] public class AgentTypeFactoryBaseEditor : UnityEditor.Editor diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/CapabilityConfigScriptableEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/CapabilityConfigScriptableEditor.cs index 18693028..3d8c5ffe 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/CapabilityConfigScriptableEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/CapabilityConfigScriptableEditor.cs @@ -1,11 +1,9 @@ -using System.Linq; -using CrashKonijn.Goap.Editor.Elements; -using CrashKonijn.Goap.Runtime; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.TypeDrawers +namespace CrashKonijn.Goap.Editor { [CustomEditor(typeof(CapabilityConfigScriptable))] public class CapabilityConfigScriptableEditor : UnityEditor.Editor diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GeneratorEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GeneratorEditor.cs index 81385197..080b609c 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GeneratorEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GeneratorEditor.cs @@ -6,7 +6,7 @@ using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.TypeDrawers +namespace CrashKonijn.Goap.Editor { [CustomEditor(typeof(GeneratorScriptable))] public class GeneratorEditor : UnityEditor.Editor diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs index edee8466..403bbff1 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs @@ -1,13 +1,11 @@ -using CrashKonijn.Agent; -using CrashKonijn.Goap.Editor.Drawers; -using CrashKonijn.Goap.Editor.Elements; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine.Device; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.TypeDrawers +namespace CrashKonijn.Goap.Editor { [CustomEditor(typeof(GoapActionProvider))] public class GoapActionProviderEditor : UnityEditor.Editor @@ -54,9 +52,9 @@ public override VisualElement CreateInspectorGUI() private string GetText(GoapActionProvider provider) { - return $@"Goal: {Runtime.Extensions.GetGenericTypeName(provider.CurrentGoal?.GetType())} + return $@"Goal: {provider.CurrentGoal?.GetType().GetGenericTypeName()} AgentType: {provider.AgentType.Id} -Receiver: {Runtime.Extensions.GetGenericTypeName(provider.Agent?.GetType())}"; +Receiver: {provider.Agent?.GetType().GetGenericTypeName()}"; } } } \ No newline at end of file diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapRunnerEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapRunnerEditor.cs index b315ad29..cdb367c7 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapRunnerEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapRunnerEditor.cs @@ -1,13 +1,10 @@ -using System.Linq; -using CrashKonijn.Goap.Editor.Drawers; -using CrashKonijn.Goap.Editor.Elements; -using CrashKonijn.Goap.Runtime; +using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; -namespace CrashKonijn.Goap.Editor.TypeDrawers +namespace CrashKonijn.Goap.Editor { [CustomEditor(typeof(GoapBehaviour))] public class GoapRunnerEditor : UnityEditor.Editor diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetKeyBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetKeyBuilder.cs index d16ccd25..8e0a6217 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetKeyBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/TargetKeyBuilder.cs @@ -1,4 +1,5 @@ -using CrashKonijn.Goap.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Runtime { diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldKeyBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldKeyBuilder.cs index 3c904f70..f850a5b5 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldKeyBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/WorldKeyBuilder.cs @@ -1,4 +1,5 @@ -using CrashKonijn.Goap.Core; +using CrashKonijn.Agent.Runtime; +using CrashKonijn.Goap.Core; namespace CrashKonijn.Goap.Runtime { diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Extensions.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Extensions.cs index 93dbf61e..fa2b67c9 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Extensions.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Extensions.cs @@ -154,20 +154,5 @@ public static ITargetKey[] GetTargetKeys(this IAgentTypeConfig agentTypeConfig) .Distinct() .ToArray(); } - - public static string GetGenericTypeName(this Type type) - { - var typeName = type.Name; - - if (type.IsGenericType) - { - var genericArguments = type.GetGenericArguments(); - var genericTypeName = typeName.Substring(0, typeName.IndexOf('`')); - var typeArgumentNames = string.Join(",", genericArguments.Select(a => a.GetGenericTypeName())); - typeName = $"{genericTypeName}<{typeArgumentNames}>"; - } - - return typeName; - } } } \ No newline at end of file