Started NPC Decision making rework
This commit is contained in:
parent
7d28666e14
commit
2c099c15fe
@ -1,5 +1,49 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1101 &-8294453107926997140
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -1955213380481053044, guid: 544bfc8c3d458a045bc3f6035acf485a, type: 2}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.81707317
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-7942258457785861289
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -1955213380481053044, guid: 544bfc8c3d458a045bc3f6035acf485a, type: 2}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1107 &-5999870908191188550
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
@ -11,17 +55,68 @@ AnimatorStateMachine:
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -2563821287706019269}
|
||||
m_Position: {x: 210, y: 200, z: 0}
|
||||
m_Position: {x: 510, y: -60, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 4917200542234153593}
|
||||
m_Position: {x: 270, y: -140, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_AnyStateTransitions:
|
||||
- {fileID: -2989848850734890113}
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_AnyStatePosition: {x: 50, y: -50, z: 0}
|
||||
m_EntryPosition: {x: 730, y: -50, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: -2563821287706019269}
|
||||
--- !u!1101 &-3025875431672470150
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -1955213380481053044, guid: 544bfc8c3d458a045bc3f6035acf485a, type: 2}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.16466653
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.625
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-2989848850734890113
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: throw
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 4917200542234153593}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &-2563821287706019269
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
@ -63,6 +158,30 @@ AnimatorController:
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: throw
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: cast
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: melee
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: throwingTime
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
@ -107,3 +226,52 @@ BlendTree:
|
||||
m_UseAutomaticThresholds: 1
|
||||
m_NormalizedBlendValues: 0
|
||||
m_BlendType: 0
|
||||
--- !u!1102 &4917200542234153593
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Throw
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 6101974044465082460}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 1
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 2466456710523085191, guid: 8847f0093193dda41bb32a4b66a673e8, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter: throwingTime
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter: throwingTime
|
||||
--- !u!1101 &6101974044465082460
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -2563821287706019269}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
|
@ -820,7 +820,7 @@ ModelImporter:
|
||||
takeName: KayKit Animated Character|Throw
|
||||
internalID: 2466456710523085191
|
||||
firstFrame: 0
|
||||
lastFrame: 34
|
||||
lastFrame: 30
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
|
@ -1586,7 +1586,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4924407620164273521, guid: 2e56f69e0872f744daa6c9080ecf3040, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 1.9
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4924407620164273521, guid: 2e56f69e0872f744daa6c9080ecf3040, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
|
@ -2356,7 +2356,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4924407620164273521, guid: 2e56f69e0872f744daa6c9080ecf3040, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 1.9
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4924407620164273521, guid: 2e56f69e0872f744daa6c9080ecf3040, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
|
@ -21,8 +21,10 @@ MonoBehaviour:
|
||||
- {fileID: 11400000, guid: 52f094018088de54ab9507695f2913b7, type: 2}
|
||||
abilityEffects:
|
||||
- {fileID: 11400000, guid: d5d94abf5b6bb7f42888d6d242067a71, type: 2}
|
||||
castTime: 0
|
||||
castTime: 1
|
||||
manaCost: 40
|
||||
castableWhileMoving: 0
|
||||
animationType: 1
|
||||
projectilePrefab: {fileID: 482914955127851241, guid: d16d48fd289401c44980d410c522b025, type: 3}
|
||||
projectileSpeed: 2
|
||||
lifeSpan: 5
|
||||
|
8
Assets/Scripts/NPC/NPCBrainSystem.meta
Normal file
8
Assets/Scripts/NPC/NPCBrainSystem.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd518ea0ed099ff48bc1fdaf299ffc35
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
Assets/Scripts/NPC/NPCBrainSystem/NPCBrain.cs
Normal file
16
Assets/Scripts/NPC/NPCBrainSystem/NPCBrain.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class NPCBrain : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
// idle
|
||||
// patrol
|
||||
// pursuit
|
||||
// recall
|
||||
// attack
|
||||
// block
|
11
Assets/Scripts/NPC/NPCBrainSystem/NPCBrain.cs.meta
Normal file
11
Assets/Scripts/NPC/NPCBrainSystem/NPCBrain.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4e9d853fe954584b93e06043716a72b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/NPC/NPCBrainSystem/NPCDecision.cs
Normal file
8
Assets/Scripts/NPC/NPCBrainSystem/NPCDecision.cs
Normal file
@ -0,0 +1,8 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public abstract class NPCDecision : ScriptableObject
|
||||
{
|
||||
public abstract void Execute(NPCController npc);
|
||||
}
|
11
Assets/Scripts/NPC/NPCBrainSystem/NPCDecision.cs.meta
Normal file
11
Assets/Scripts/NPC/NPCBrainSystem/NPCDecision.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de91b8c4618f467458e06e8af0d9c690
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
Assets/Scripts/NPC/NPCBrainSystem/NPCDecisionProfile.cs
Normal file
16
Assets/Scripts/NPC/NPCBrainSystem/NPCDecisionProfile.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "NPCDecisionProfile", menuName = "AI/NPCDecisionProfile")]
|
||||
public class NPCDecisionProfile : ScriptableObject
|
||||
{
|
||||
public List<NPCDecisionPriority> decisions = new List<NPCDecisionPriority>();
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class NPCDecisionPriority
|
||||
{
|
||||
public NPCDecision decision;
|
||||
public int priority;
|
||||
}
|
11
Assets/Scripts/NPC/NPCBrainSystem/NPCDecisionProfile.cs.meta
Normal file
11
Assets/Scripts/NPC/NPCBrainSystem/NPCDecisionProfile.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8eb4933db54c1342a2074ba0e8b3b06
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -94,7 +94,7 @@ Material:
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Rotation: 10.869601
|
||||
- _Rotation: 11.08514
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user