Updated Enemy AI System to use STRIPS

This commit is contained in:
MarcoHampel 2024-02-12 02:23:19 -05:00
parent e22b8f8cc2
commit 94e7b67d97
65 changed files with 14816 additions and 19766 deletions

View File

@ -151,6 +151,33 @@ AnimatorStateMachine:
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 819262487922686354}
--- !u!1102 &-6806049160977715451
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Running
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 915980713774342234}
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: -203655887218126122, guid: b13f71f6cb9cefe4cbcc4b8de93812c5, type: 3}
m_Tag:
m_SpeedParameter: Speed
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &-6722448351092568362
AnimatorState:
serializedVersion: 6
@ -178,6 +205,59 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-6543029507146586989
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: Attack
m_EventTreshold: 0
- m_ConditionMode: 6
m_ConditionEvent: AttackIndex
m_EventTreshold: 2
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -4991608271041000256}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9794521
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-6301689185008326813
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: InLight
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -6722448351092568362}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.009893417
m_TransitionOffset: 0
m_ExitTime: 0.97945213
m_HasExitTime: 0
m_HasFixedDuration: 0
m_InterruptionSource: 2
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-5912259969099434703
AnimatorStateTransition:
m_ObjectHideFlags: 1
@ -203,6 +283,34 @@ AnimatorStateTransition:
m_InterruptionSource: 2
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-5696663626387984923
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: Attack
m_EventTreshold: 0
- m_ConditionMode: 6
m_ConditionEvent: AttackIndex
m_EventTreshold: 1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -2640043726390947265}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9794521
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-5277390852839867810
AnimatorState:
serializedVersion: 6
@ -284,6 +392,56 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &-4684716877733842090
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: RunningLayer?
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 4809292519535508144}
m_Position: {x: 330, y: 110, z: 0}
- serializedVersion: 1
m_State: {fileID: -6806049160977715451}
m_Position: {x: 350, y: 290, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 4809292519535508144}
--- !u!1101 &-4309033107048958075
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: AttackScream
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -3478732761575392327}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9794521
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-3478732761575392327
AnimatorState:
serializedVersion: 6
@ -337,6 +495,31 @@ AnimatorStateTransition:
m_InterruptionSource: 2
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-3062048560412848416
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: InLight
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -6722448351092568362}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.01
m_TransitionOffset: 0
m_ExitTime: 0.6875
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 2
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-2890399280607573796
AnimatorStateTransition:
m_ObjectHideFlags: 1
@ -462,6 +645,31 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-386915996141235355
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 4
m_ConditionEvent: Speed
m_EventTreshold: 0.1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 4809292519535508144}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.6875
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 1
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
@ -514,6 +722,46 @@ AnimatorController:
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
- serializedVersion: 5
m_Name: RunningLayer?
m_StateMachine: {fileID: -4684716877733842090}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 1
m_SyncedLayerIndex: -1
m_DefaultWeight: 1
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &810037603574539134
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: Attack
m_EventTreshold: 0
- m_ConditionMode: 6
m_ConditionEvent: AttackIndex
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -5277390852839867810}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9794521
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &819262487922686354
AnimatorState:
serializedVersion: 6
@ -541,6 +789,81 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &915980713774342234
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 4
m_ConditionEvent: Speed
m_EventTreshold: 0.1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 4809292519535508144}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.6875
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 1
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &923609593485017572
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: InLight
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -6722448351092568362}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.01
m_TransitionOffset: 0
m_ExitTime: 0.6875
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 2
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1542237101904693066
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 3
m_ConditionEvent: Speed
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -6806049160977715451}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9794521
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 1
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &2642003355210438087
AnimatorStateTransition:
m_ObjectHideFlags: 1
@ -567,6 +890,34 @@ AnimatorStateTransition:
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &2826005711599316114
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: Attack
m_EventTreshold: 0
- m_ConditionMode: 6
m_ConditionEvent: AttackIndex
m_EventTreshold: 3
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -720464617837815001}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9794521
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &3113784299482256145
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
@ -738,6 +1089,58 @@ AnimatorStateTransition:
m_InterruptionSource: 1
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &4346778496704843283
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 4
m_ConditionEvent: Speed
m_EventTreshold: 0.1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -8045918876602617594}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.6875
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 1
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &4809292519535508144
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 6383645134080546280}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -203655887218126122, guid: fa14130ee2d9ef746ab13133d5c26994, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &5184814725926522922
AnimatorStateTransition:
m_ObjectHideFlags: 1
@ -774,7 +1177,7 @@ AnimatorState:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Running
m_Speed: 1
m_Speed: 0
m_CycleOffset: 0
m_Transitions:
- {fileID: 2642003355210438087}
@ -784,13 +1187,13 @@ AnimatorState:
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_SpeedParameterActive: 1
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -203655887218126122, guid: b13f71f6cb9cefe4cbcc4b8de93812c5, type: 3}
m_Tag:
m_SpeedParameter:
m_SpeedParameter: Speed
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
@ -819,6 +1222,31 @@ AnimatorStateTransition:
m_InterruptionSource: 1
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &6383645134080546280
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 3
m_ConditionEvent: Speed
m_EventTreshold: 0.1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -6806049160977715451}
m_Solo: 1
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9794521
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 1
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &6767231325866369938
AnimatorStateTransition:
m_ObjectHideFlags: 1

View File

@ -0,0 +1,284 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-4850192952059716206
MonoBehaviour:
m_ObjectHideFlags: 11
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: da692e001514ec24dbc4cca1949ff7e8, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 12
hdPluginSubTargetMaterialVersions:
m_Keys: []
m_Values:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DynamicDegraded
m_Shader: {fileID: -6465566751694194690, guid: a34fe48427b168340bbb56dad7f45d90, type: 3}
m_ValidKeywords:
- _DISABLE_SSR_TRANSPARENT
m_InvalidKeywords:
- _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2225
stringTagMap:
MotionVector: User
disabledShaderPasses:
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- RayTracingPrepass
- MOTIONVECTORS
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalTexture:
m_Texture: {fileID: 2800000, guid: 842d691af0f943744a59258577240b0e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SurfaceTexture:
m_Texture: {fileID: 2800000, guid: a1bb4bc2986c592448474d7ef2f7233f, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AddPrecomputedVelocity: 0
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _AlphaCutoffShadow: 0.5
- _AlphaDstBlend: 0
- _AlphaSrcBlend: 1
- _AlphaToMask: 0
- _AlphaToMaskInspectorValue: 0
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _ConservativeDepthOffsetEnable: 0
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DiffusionProfileHash: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DoubleSidedEnable: 0
- _DoubleSidedGIMode: 0
- _DoubleSidedNormalMode: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveExposureWeight: 1
- _EmissiveIntensity: 1
- _EmissiveIntensityUnit: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InvTilingScale: 1
- _Ior: 1.5
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _MetallicRemapMax: 1
- _MetallicRemapMin: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _NormalStrength: 0.001
- _OpaqueCullMode: 2
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _RayTracing: 0
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RefractionModel: 0
- _RenderQueueType: 1
- _RequireSplitLighting: 0
- _Scale: 0.6
- _Smoothness: 0.5
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SpecularOcclusionMode: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRefDepth: 8
- _StencilRefDistortionVec: 4
- _StencilRefGBuffer: 10
- _StencilRefMV: 40
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskDistortionVec: 4
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _UseEmissiveIntensity: 0
- _UseShadowThreshold: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestTransparent: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _Scale: {r: 1, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _SurfaceColor: {r: 0.7735849, g: 0.7735849, b: 0.7735849, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 395a9cff64b45fb4cb4207bd89e63856
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Models/Aliens/BaseAlien_Skinned.fbx (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,269 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Monster1Material
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ValidKeywords:
- _BENTNORMALMAP
- _DISABLE_SSR_TRANSPARENT
- _MASKMAP
- _NORMALMAP
- _NORMALMAP_TANGENT_SPACE
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2225
stringTagMap: {}
disabledShaderPasses:
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- RayTracingPrepass
- MOTIONVECTORS
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 2800000, guid: c40e7cac3aaf85848956951bcb595e32, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 2800000, guid: a0aa6ecfd65227745b075b56878c9ae0, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 0.3, y: 0.3}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: c40e7cac3aaf85848956951bcb595e32, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskMap:
m_Texture: {fileID: 2800000, guid: b3281034067013a49afa02dda6a33a47, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 2800000, guid: a34076b4f98da2743abec340e8676355, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AddPrecomputedVelocity: 0
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _AlphaCutoffShadow: 0.5
- _AlphaDstBlend: 0
- _AlphaSrcBlend: 1
- _AlphaToMask: 0
- _AlphaToMaskInspectorValue: 0
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DiffusionProfileHash: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DoubleSidedEnable: 0
- _DoubleSidedGIMode: 0
- _DoubleSidedNormalMode: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveExposureWeight: 1
- _EmissiveIntensity: 1
- _EmissiveIntensityUnit: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InvTilingScale: 1
- _Ior: 1.5
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _MetallicRemapMax: 1
- _MetallicRemapMin: 0
- _NormalMapSpace: 0
- _NormalScale: 0.43
- _OpaqueCullMode: 2
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _RayTracing: 0
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RefractionModel: 0
- _Smoothness: 0.651
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SpecularOcclusionMode: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRefDepth: 8
- _StencilRefGBuffer: 10
- _StencilRefMV: 40
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _UseEmissiveIntensity: 0
- _UseShadowThreshold: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestTransparent: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.18867922, g: 0.14133142, b: 0.14133142, a: 1}
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
- _Color: {r: 0.18867919, g: 0.14133137, b: 0.14133137, a: 1}
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
--- !u!114 &8917273092187604094
MonoBehaviour:
m_ObjectHideFlags: 11
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: da692e001514ec24dbc4cca1949ff7e8, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 12
hdPluginSubTargetMaterialVersions:
m_Keys: []
m_Values:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7dcaca032261aa248b936d14549cf48f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -900,7 +900,7 @@ MonoBehaviour:
m_StreamingVersion: 20170927
m_Priority: 10
m_StandbyUpdate: 2
m_LookAt: {fileID: 365318977280207447}
m_LookAt: {fileID: 0}
m_Follow: {fileID: 5527950049018812812}
m_CommonLens: 1
m_Lens:
@ -1464,7 +1464,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365318978543542559}
m_LocalRotation: {x: 0.04479234, y: -0.0000000344453, z: 0.0000000015444355, w: 0.9989963}
m_LocalRotation: {x: 0.04479234, y: 0.000000017322874, z: -7.7671136e-10, w: 0.9989964}
m_LocalPosition: {x: 0, y: 0.82000005, z: -3}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -1825,10 +1825,18 @@ PrefabInstance:
propertyPath: cam
value:
objectReference: {fileID: 365318978543542556}
- target: {fileID: 1000589095, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
propertyPath: statsOutput
value:
objectReference: {fileID: 8341063682717792138}
- target: {fileID: 1000589095, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
propertyPath: cameraFreeLook
value:
objectReference: {fileID: 365318977167042205}
- target: {fileID: 1000589095, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
propertyPath: animationController
value:
objectReference: {fileID: 6702786851717904490}
- target: {fileID: 367716966863965416, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
propertyPath: m_Name
value: HealthText
@ -1845,6 +1853,14 @@ PrefabInstance:
propertyPath: freelook
value:
objectReference: {fileID: 365318977167042205}
- target: {fileID: 2821278824672803001, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
propertyPath: animcontroller
value:
objectReference: {fileID: 6702786851717904490}
- target: {fileID: 2821278824672803001, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
propertyPath: cameraController
value:
objectReference: {fileID: 2988099323734790380}
- target: {fileID: 3871953178811630791, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
propertyPath: m_Name
value: OxygenText
@ -1897,6 +1913,10 @@ PrefabInstance:
propertyPath: m_Name
value: Astronaut
objectReference: {fileID: 0}
- target: {fileID: 5309760701942746954, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
propertyPath: pistol
value:
objectReference: {fileID: 1368305505261792776}
- target: {fileID: 5309760701942746954, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
propertyPath: selectedImage
value:
@ -1915,13 +1935,52 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
--- !u!4 &365318977280207447 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 165371623, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
--- !u!114 &1368305505261792776 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1724013578240039608, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
m_PrefabInstance: {fileID: 365318977165309104}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a0bc8aa373bfbe44e91f0625324088be, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2988099323734790380 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3199248074139083868, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
m_PrefabInstance: {fileID: 365318977165309104}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3847c9aa2dda4d64f84842c3cc880d7e, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &5527950049018812812 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5307183109647314236, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
m_PrefabInstance: {fileID: 365318977165309104}
m_PrefabAsset: {fileID: 0}
--- !u!114 &6702786851717904490 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6346920479167106266, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
m_PrefabInstance: {fileID: 365318977165309104}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cabfb8d71f6bc7041830b669859f203a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8341063682717792138 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8561543649524679482, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3}
m_PrefabInstance: {fileID: 365318977165309104}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: de7389d71ec7803409f26fc6407bc153, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -3715,6 +3715,7 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!114 &50952514
MonoBehaviour:
m_ObjectHideFlags: 0
@ -5621,18 +5622,78 @@ PrefabInstance:
propertyPath: m_Name
value: AstronautWithCamera
objectReference: {fileID: 0}
- target: {fileID: 365318977167042205, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: m_LookAt
value:
objectReference: {fileID: 8981964496742748422}
- target: {fileID: 365318977785173342, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: m_LocalRotation.y
value: -3.9161743e-10
objectReference: {fileID: 0}
- target: {fileID: 365318977785173342, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: m_LocalRotation.z
value: 5.6392228e-11
objectReference: {fileID: 0}
- target: {fileID: 365318978543542552, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: m_UpdateMethod
value: 0
objectReference: {fileID: 0}
- target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9989963
objectReference: {fileID: 0}
- target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: m_LocalRotation.y
value: 0.0000000344453
objectReference: {fileID: 0}
- target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: m_LocalRotation.z
value: -0.0000000015444355
objectReference: {fileID: 0}
- target: {fileID: 2988099323734790380, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: cam
value:
objectReference: {fileID: 7054175669133704833}
- target: {fileID: 6702786851717904490, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: hiddenCam
value:
objectReference: {fileID: 7274624883331524493}
- target: {fileID: 6702786851717904490, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
propertyPath: animController
value:
objectReference: {fileID: 2585827222461101649}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
--- !u!95 &2585827222461101649 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 4757986269264261312, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
m_PrefabInstance: {fileID: 7054175667104679569}
m_PrefabAsset: {fileID: 0}
--- !u!223 &7054175667383408153 stripped
Canvas:
m_CorrespondingSourceObject: {fileID: 292360328, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
m_PrefabInstance: {fileID: 7054175667104679569}
m_PrefabAsset: {fileID: 0}
--- !u!20 &7054175669133704833 stripped
Camera:
m_CorrespondingSourceObject: {fileID: 2031122448, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
m_PrefabInstance: {fileID: 7054175667104679569}
m_PrefabAsset: {fileID: 0}
--- !u!4 &7274624881880131363 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 365318977076093362, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
m_PrefabInstance: {fileID: 7054175667104679569}
m_PrefabAsset: {fileID: 0}
--- !u!20 &7274624883331524493 stripped
Camera:
m_CorrespondingSourceObject: {fileID: 365318978543542556, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
m_PrefabInstance: {fileID: 7054175667104679569}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8981964496742748422 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2108580152219735959, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3}
m_PrefabInstance: {fileID: 7054175667104679569}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7054175667822823112
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -1846,25 +1846,21 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7054175669133704833, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: m_TargetTexture
value:
objectReference: {fileID: 0}
- target: {fileID: 7274624882445554639, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: m_LocalRotation.y
value: -3.9161743e-10
value: -0.000000034718123
objectReference: {fileID: 0}
- target: {fileID: 7274624882445554639, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: m_LocalRotation.z
value: 5.6392228e-11
value: 0.0000000049993236
objectReference: {fileID: 0}
- target: {fileID: 7274624883331524490, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: m_LocalRotation.y
value: 0.0000000344453
value: -0.0000000344453
objectReference: {fileID: 0}
- target: {fileID: 7274624883331524490, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: m_LocalRotation.z
value: -0.0000000015444355
value: 0.0000000015444355
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
@ -4585,6 +4581,7 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1001 &381941378
PrefabInstance:
m_ObjectHideFlags: 0
@ -6227,6 +6224,7 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1 &560146040
GameObject:
m_ObjectHideFlags: 0
@ -6447,6 +6445,7 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1 &578922304
GameObject:
m_ObjectHideFlags: 0
@ -8060,6 +8059,7 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!114 &691628166
MonoBehaviour:
m_ObjectHideFlags: 0
@ -10481,6 +10481,7 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1 &1031873474
GameObject:
m_ObjectHideFlags: 0
@ -14208,6 +14209,7 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1 &1537664233
GameObject:
m_ObjectHideFlags: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 96ebc8c36c1d84a458909d1ef40d81e5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c8aa6e070b0e3a749a209f52c1142c5a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 23800000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4c3233e56f987b54ca07a930bd172f88
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c8b0c959ab0bf714ab092a8db9f9d5d2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
%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: a962e2bb81deaf54cacbdac4c96bf7aa, type: 3}
m_Name: AIMappings
m_EditorClassIdentifier:
variableMappings:
- varName: Distance2Player
variable: 1
value: 100000
- varName: IsPlayerVisible
variable: 3
value: True
- varName: AIHealth
variable: 1
value: 10

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f4872e770a0bff14da2987f072305732
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 37f7455b5e372f64c855065346889cd8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
%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: 88c10d9c5ffa3de4686d031fe60f0c9a, type: 3}
m_Name: Attack
m_EditorClassIdentifier:
associatedMapping: {fileID: 11400000, guid: f4872e770a0bff14da2987f072305732, type: 2}
preConditions:
- variableName1: Distance2Player
op: 0
variableName2: 5
- variableName1: IsPlayerVisible
op: 2
variableName2: true
functions: 0400000001000000

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c00e5a31d23b73b4e9a62899052b7f73
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,18 @@
%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: f3ff90239675959479df777d26d59713, type: 3}
m_Name: AttackGoal
m_EditorClassIdentifier:
goalName: Attack
actions:
- {fileID: 11400000, guid: c00e5a31d23b73b4e9a62899052b7f73, type: 2}
- {fileID: 11400000, guid: 47535c55d61913347a660731766816fa, type: 2}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 67e244b71dff30d46a32fa7fb596c62f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,20 @@
%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: 88c10d9c5ffa3de4686d031fe60f0c9a, type: 3}
m_Name: RunToPlayer
m_EditorClassIdentifier:
associatedMapping: {fileID: 11400000, guid: f4872e770a0bff14da2987f072305732, type: 2}
preConditions:
- variableName1: Distance2Player
op: 3
variableName2: 5
functions: 00000000

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 47535c55d61913347a660731766816fa
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 00dc0bb52eb013540ab190d10061eb36
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
%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: 88c10d9c5ffa3de4686d031fe60f0c9a, type: 3}
m_Name: Flee
m_EditorClassIdentifier:
associatedMapping: {fileID: 11400000, guid: f4872e770a0bff14da2987f072305732, type: 2}
preConditions:
- variableName1: AIHealth
op: 0
variableName2: 2
- variableName1: Distance2Player
op: 0
variableName2: 10
functions: 00000000

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 808f992cd4a0d5548ad1eca774c383b6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
%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: f3ff90239675959479df777d26d59713, type: 3}
m_Name: FleeGoal
m_EditorClassIdentifier:
goalName: Flee
actions:
- {fileID: 11400000, guid: 808f992cd4a0d5548ad1eca774c383b6, type: 2}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3d9253003292d60488e5190f1c5fe116
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,20 @@
%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: 88c10d9c5ffa3de4686d031fe60f0c9a, type: 3}
m_Name: Hide
m_EditorClassIdentifier:
associatedMapping: {fileID: 11400000, guid: f4872e770a0bff14da2987f072305732, type: 2}
preConditions:
- variableName1: Distance2Player
op: 4
variableName2: 50
functions: 02000000

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 02d3f8f4d4fe75c478345298245cd595
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 981b18c8829952646a4649356ecf83bb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
%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: 88c10d9c5ffa3de4686d031fe60f0c9a, type: 3}
m_Name: Idle
m_EditorClassIdentifier:
associatedMapping: {fileID: 11400000, guid: f4872e770a0bff14da2987f072305732, type: 2}
preConditions: []
functions: 05000000

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f17018799409101429839f1a67b8ce71
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
%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: f3ff90239675959479df777d26d59713, type: 3}
m_Name: IdleGoal
m_EditorClassIdentifier:
goalName: Idle
actions:
- {fileID: 11400000, guid: f17018799409101429839f1a67b8ce71, type: 2}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6899dacd4bcf7be4faf9281e42088bfc
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dbac5972a56c36e43baee7fc025ac678
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e276205caf65a264ab7cafae4de4bd9c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,2 @@
Hiding Resolver:
Given a list of hiding locations, check los for each to the player. Then pick closest (if any) that does not have line of sight.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 60fbee275bbfe7040a5286cdf454d180
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,110 @@
using STRIPS;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
namespace Obscurum.ModularAI
{
public class MeleeResolver : AStripsActionResolver
{
[SerializeField]
private Animator animator;
[SerializeField]
private NavMeshAgent navAgent;
private PlayerComponent player;
private bool inAnimation = false;
[SerializeField]
private float attackAnimationDuration = 1.5f;
[SerializeField]
private float screamAnimationDuration = 1.5f;
[SerializeField]
private float health = 10f;
public override void Attack()
{
if (!inAnimation)
{
animator.SetTrigger("Attack");
StartCoroutine(InAnimationHolder(attackAnimationDuration));
}
}
public override void Hide()
{
}
public override void LookAt(Vector3 position)
{
// Create a direction vector that ignores the y-axis difference by setting the y component of both positions to be the same.
Vector3 direction = new Vector3(position.x, this.transform.position.y, position.z) - this.transform.position;
// Create a rotation that looks in the 'direction' but only rotates around the y-axis.
Quaternion toRotation = Quaternion.LookRotation(direction);
// Apply the rotation over time to smooth the transition.
transform.rotation = Quaternion.Lerp(transform.rotation, toRotation, Time.deltaTime * 150f);
}
public override void LookAt()
{
LookAt(new Vector3(player.transform.position.x, transform.position.y, player.transform.position.z));
}
public override void MoveTo(Vector3 position)
{
navAgent.SetDestination(position);
}
public override void MoveTo()
{
MoveTo(player.transform.position);
}
public override void Roar()
{
if(!inAnimation)
{
animator.SetTrigger("AttackScream");
StartCoroutine(InAnimationHolder(screamAnimationDuration));
}
}
public override void Idle()
{
this.navAgent.isStopped = true;
this.navAgent.speed = 0;
}
private IEnumerator InAnimationHolder(float duration)
{
inAnimation = true;
yield return new WaitForSeconds(duration);
inAnimation = false;
}
// Start is called before the first frame update
void Start()
{
player = PlayerComponent.Instance;
}
// Update is called once per frame
void Update()
{
this.animator.SetFloat("Speed", navAgent.velocity.magnitude / 4);
}
public override bool Collect(ref StripsVariableMapping.PackageMapping package)
{
package.SetMapping("Distance2Player", Vector3.Distance(player.transform.position, transform.position).ToString());
package.SetMapping("IsPlayerVisible", true.ToString());
package.SetMapping("AIHealth", health.ToString());
return true;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 29c3b8c81f374df47a8542d2caed73cb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c824588c9289fbc449c20c47b8a2c46e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cbd2e2888b0373d46aefb6f1424c3427
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,101 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
using static STRIPS.StripsAction;
namespace STRIPS
{
[CustomEditor(typeof(StripsAction))]
[CanEditMultipleObjects]
public class StripsActionCustomEditor : Editor
{
SerializedProperty associatedMapping;
SerializedProperty preConditions;
ReorderableList preConditionsList;
SerializedProperty functions;
void OnEnable()
{
associatedMapping = serializedObject.FindProperty("associatedMapping");
preConditions = serializedObject.FindProperty("preConditions");
functions = serializedObject.FindProperty("functions");
preConditionsList = new ReorderableList(serializedObject, preConditions, true, true, true, true);
preConditionsList.elementHeightCallback = (int index) =>
{
// Define the height of each element here. You might want to adjust this based on the complexity of each element.
// For simplicity, we're using a fixed height, but you could calculate this dynamically based on the content.
return EditorGUIUtility.singleLineHeight * 2.5f + 6; // Example height for two lines and a bit of padding
};
preConditionsList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) =>
{
var element = preConditions.GetArrayElementAtIndex(index);
rect.y += 2;
var variableNames = GetVariableNames();
// Adjusting the widths to account for the operator dropdown and ensuring everything fits nicely.
float width = rect.width / 2 - 4; // Adjust as necessary for layout
// Draw the variableName1 as a dropdown
var variableName1Prop = element.FindPropertyRelative("variableName1");
int selectedIndex = variableNames.IndexOf(variableName1Prop.stringValue);
selectedIndex = Mathf.Max(0, selectedIndex); // Ensure the index is at least 0
selectedIndex = EditorGUI.Popup(new Rect(rect.x, rect.y, width*1.5f, EditorGUIUtility.singleLineHeight), "Variable Name 1", selectedIndex, variableNames.ToArray());
if (variableNames.Count > 0)
{
variableName1Prop.stringValue = variableNames[selectedIndex];
}
// Draw the operator dropdown
EditorGUI.PropertyField(new Rect(rect.x + (width*1.5f) + 8, rect.y, width/2, EditorGUIUtility.singleLineHeight), element.FindPropertyRelative("op"), GUIContent.none);
// Draw the variableName2 directly as a text field for simplicity
EditorGUI.PropertyField(new Rect(rect.x, rect.y + EditorGUIUtility.singleLineHeight + 4, rect.width, EditorGUIUtility.singleLineHeight), element.FindPropertyRelative("variableName2"), new GUIContent("Variable Name 2"));
};
preConditionsList.drawHeaderCallback = (Rect rect) =>
{
EditorGUI.LabelField(rect, "PreConditions");
};
}
public override void OnInspectorGUI()
{
serializedObject.Update();
StripsAction stripsAction = (StripsAction)target;
if (stripsAction.associatedMapping == null)
{
EditorGUILayout.HelpBox("Associated Mapping is null. Please assign an Associated Mapping.", MessageType.Warning);
}
EditorGUILayout.PropertyField(associatedMapping);
preConditionsList.DoLayoutList();
EditorGUILayout.PropertyField(functions);
serializedObject.ApplyModifiedProperties();
}
private List<string> GetVariableNames()
{
var variableNames = new List<string>();
StripsAction stripsAction = (StripsAction)target;
if (stripsAction.associatedMapping != null)
{
var mappingDict = stripsAction.associatedMapping.Mappings;
foreach (var mapping in mappingDict)
{
variableNames.Add(mapping.Key);
}
}
return variableNames;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 088236bfbb7a12c418687cdbd9c644ce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,29 @@
using UnityEngine;
namespace STRIPS
{
public interface IStripsActionResolver
{
}
[System.Serializable]
public abstract class AStripsActionResolver : MonoBehaviour {
public enum StripsActionResolverAction { MoveTo, Attack, Hide, Roar, LookAt, Idle }
public virtual void MoveTo(Vector3 position) { }
public virtual void MoveTo() { }
public virtual void Attack() { }
public virtual void Hide() { }
public virtual void Roar() { }
public virtual void LookAt(Vector3 position) { }
public virtual void LookAt() { }
public virtual void Idle() { }
public abstract bool Collect(ref StripsVariableMapping.PackageMapping package);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3966f902ea4f69a48ba68f1977d9c298
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,14 @@
{
"name": "Strips",
"rootNamespace": "STRIPS",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5761c008b1a68e24fb989c60f3245d36
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,104 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace STRIPS
{
[CreateAssetMenu(fileName = "NewAction", menuName = "STRIPS/Create New Action", order = 1)]
public class StripsAction : ScriptableObject
{
public StripsVariableMapping associatedMapping;
public enum Operator { Less, LessEqual, Equal, GreaterEqual, Greater }
public BooleanOperation[] preConditions;
public AStripsActionResolver.StripsActionResolverAction[] functions;
[System.Serializable]
public class BooleanOperation
{
public string variableName1;
public Operator op;
public string variableName2;
}
private bool EvalWithOperatorString(string val, string val2, Operator op)
{
switch(op)
{
case Operator.Equal: return val == val2;
}
return false;
}
private bool EvalWithOperatorFloat(float val, float val2, Operator op)
{
switch (op)
{
case Operator.Less: return val < val2;
case Operator.Greater: return val > val2;
case Operator.LessEqual: return val <= val2;
case Operator.GreaterEqual: return val >= val2;
case Operator.Equal: return val == val2;
}
return false;
}
private bool EvalWithOperatorBool(bool val, bool val2, Operator op)
{
switch (op)
{
case Operator.Equal: return val == val2;
}
return false;
}
private bool EvalWithOperatorInt(int val, int val2, Operator op)
{
switch (op)
{
case Operator.Less: return val < val2;
case Operator.Greater: return val > val2;
case Operator.LessEqual: return val <= val2;
case Operator.GreaterEqual: return val >= val2;
case Operator.Equal: return val == val2;
}
return false;
}
public bool EvaluateConditionals(StripsVariableMapping.PackageMapping variables)
{
bool finalResult = true;
foreach(BooleanOperation operation in preConditions)
{
StripsVariableMapping.VariableMapping mapping = variables.Mappings[operation.variableName1];
switch (mapping.variable)
{
case StripsVariableMapping.VarType.String:
{
finalResult= finalResult&& EvalWithOperatorString(mapping.value, operation.variableName2, operation.op);
break;
}
case StripsVariableMapping.VarType.Float:
{
finalResult= finalResult && EvalWithOperatorFloat(float.Parse(mapping.value), float.Parse(operation.variableName2), operation.op);
break;
}
case StripsVariableMapping.VarType.Boolean:
{
finalResult= finalResult&& EvalWithOperatorBool(bool.Parse(mapping.value), bool.Parse(operation.variableName2),operation.op);
break;
}
case StripsVariableMapping.VarType.Integer:
{
finalResult = finalResult && EvalWithOperatorInt(int.Parse(mapping.value), int.Parse(operation.variableName2), operation.op);
break;
}
}
}
return finalResult;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 88c10d9c5ffa3de4686d031fe60f0c9a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,89 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace STRIPS
{
public class StripsActionResolver : MonoBehaviour
{
[SerializeField]
private List<StripsGoal> goals;
private StripsGoal activeGoal;
[SerializeField]
private AStripsActionResolver chosenResolver;
[SerializeField]
private StripsVariableMapping variableMapping;
private StripsVariableMapping.PackageMapping updatedStats;
private void PerformAction(AStripsActionResolver.StripsActionResolverAction action)
{
switch(action)
{
case AStripsActionResolver.StripsActionResolverAction.Attack:
chosenResolver.Attack();
break;
case AStripsActionResolver.StripsActionResolverAction.Hide:
chosenResolver.Hide();
break;
case AStripsActionResolver.StripsActionResolverAction.LookAt:
chosenResolver.LookAt();
break;
case AStripsActionResolver.StripsActionResolverAction.Roar:
chosenResolver.Roar();
break;
case AStripsActionResolver.StripsActionResolverAction.MoveTo:
chosenResolver.MoveTo();
break;
default:
chosenResolver.Idle();
break;
}
}
public void Selector()
{
foreach (StripsGoal goal in goals)
{
goal.UpdateActionConditionals(updatedStats);
if (goal.Available.Count > 0)
{
activeGoal = goal;
break;
}
}
if(activeGoal != null)
{
AStripsActionResolver.StripsActionResolverAction[] functs = activeGoal.Available[0].functions;
foreach(AStripsActionResolver.StripsActionResolverAction action in functs)
{
PerformAction(action);
}
}
}
// Start is called before the first frame update
void Start()
{
updatedStats = variableMapping.CreateCopy();
InvokeRepeating("Selector", 1, 1);
}
// Update is called once per frame
void Update()
{
if (chosenResolver.Collect(ref updatedStats))
{
//all good
}
print("Current Action:" + activeGoal.name);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 08f8e4c1b4b4ae1458d1801b75d35b00
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace STRIPS
{
[CreateAssetMenu(fileName = "New Goal", menuName = "STRIPS/Create New Goal", order = 3)]
public class StripsGoal : ScriptableObject
{
public string goalName;
public StripsAction[] actions;
private List<StripsAction> available;
public List<StripsAction> Available { get { return available; } }
public void UpdateActionConditionals(StripsVariableMapping.PackageMapping updatedMappings)
{
List<StripsAction> available = new List<StripsAction> ();
for(int i =0; i < actions.Length; i++)
{
if (actions[i].EvaluateConditionals(updatedMappings))
{
available.Add(actions[i]);
}
}
this.available=available;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f3ff90239675959479df777d26d59713
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,93 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace STRIPS
{
[CreateAssetMenu(fileName = "VarMapping", menuName = "STRIPS/Create New Variable Mapping", order = 2)]
public class StripsVariableMapping : ScriptableObject
{
[SerializeField]
private VariableMapping[] variableMappings;
public Dictionary<string, VariableMapping> Mappings
{
get
{
Dictionary<string, VariableMapping> mapping = new Dictionary<string, VariableMapping>();
foreach (VariableMapping map in variableMappings)
{
mapping.Add(map.varName, map);
}
return mapping;
}
}
public VariableMapping Find(string name)
{
return Mappings[name];
}
public PackageMapping CreateCopy()
{
VariableMapping[] copiedMappings = new VariableMapping[variableMappings.Length];
int i = 0;
foreach(VariableMapping mapping in variableMappings)
{
VariableMapping newMapping = new VariableMapping();
newMapping.variable = mapping.variable;
newMapping.value = mapping.value;
newMapping.varName = mapping.varName;
copiedMappings[i] = newMapping;
i++;
}
return new PackageMapping(copiedMappings);
}
public class PackageMapping
{
public PackageMapping(VariableMapping[] variableMappings)
{
this.variableMappings= variableMappings;
}
public void SetMapping(string name, string value)
{
for(int i =0;i <variableMappings.Length; i++)
{
if (variableMappings[i].varName == name)
{
variableMappings[i].value = value;
return;
}
}
}
[SerializeField]
private VariableMapping[] variableMappings;
public Dictionary<string, VariableMapping> Mappings
{
get
{
Dictionary<string, VariableMapping> mapping = new Dictionary<string, VariableMapping>();
foreach (VariableMapping map in variableMappings)
{
mapping.Add(map.varName, map);
}
return mapping;
}
}
}
[System.Serializable]
public class VariableMapping
{
public string varName;
public VarType variable;
public string value;
}
public enum VarType { Integer, Float, String, Boolean };
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a962e2bb81deaf54cacbdac4c96bf7aa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -10,6 +10,7 @@ public class DoorInteractable : HeavyItemReceiver
[SerializeField] private Animator[] anims;
[SerializeField]
private HeavyInteractableItem insertedCore;
private Vector3 priorLocalPos;
private Vector3 priorLocalRot;

View File

@ -3,6 +3,8 @@
public class PlayerComponent : MonoBehaviour
{
public static PlayerComponent Instance;
[SerializeField] private float health = 5f;
[SerializeField] private float maxHealth = 5f;
@ -37,12 +39,14 @@ public class PlayerComponent : MonoBehaviour
private void Awake()
{
flareRegister = FindObjectOfType<FlareRegister>();
Instance = this;
}
// Start is called before the first frame update
private void Start()
{
perlin = cameraFreeLook.GetRig(1).GetCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
Instance = this;
}
// Update is called once per frame

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a96227ae63aaed44cbeb8807fe5ad1db
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a34fe48427b168340bbb56dad7f45d90
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}