feat: enemies spawn in spawn zones and wander on a graph

This commit is contained in:
Chris
2025-10-24 13:03:16 -04:00
parent f0a99253e5
commit fb515ed1cf
6 changed files with 633 additions and 270 deletions

View File

@@ -1,5 +1,31 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1102 &-7846314796881791032
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New State
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
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: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &-6638317236673258601
AnimatorStateMachine:
serializedVersion: 6
@@ -12,6 +38,9 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: 6611013841474026752}
m_Position: {x: 520, y: 120, z: 0}
- serializedVersion: 1
m_State: {fileID: -7846314796881791032}
m_Position: {x: 280, y: 40, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
@@ -21,7 +50,7 @@ AnimatorStateMachine:
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: 6611013841474026752}
m_DefaultState: {fileID: -7846314796881791032}
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0

View File

@@ -12,6 +12,13 @@ GameObject:
- component: {fileID: 2562293259993124465}
- component: {fileID: 8206397622550667234}
- component: {fileID: 5956987736849929195}
- component: {fileID: 4447190118606394553}
- component: {fileID: 3375213058463339329}
- component: {fileID: 6881462958115636691}
- component: {fileID: 5075083518210584453}
- component: {fileID: 1077794308846883818}
- component: {fileID: 6620953456884791151}
- component: {fileID: 6778397863327314458}
m_Layer: 7
m_Name: TestMonster
m_TagString: Untagged
@@ -47,7 +54,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 972023326
GlobalObjectIdHash: 1434729210
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
@@ -73,6 +80,77 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Core::Reset.Units.Enemy
ShowTopMostFoldoutHeaderGroup: 1
graphStateAsString:
m_InternalValue:
utf8LengthInBytes: 0
bytes:
offset0000:
byte0000: 0
byte0001: 0
byte0002: 0
byte0003: 0
byte0004: 0
byte0005: 0
byte0006: 0
byte0007: 0
byte0008: 0
byte0009: 0
byte0010: 0
byte0011: 0
byte0012: 0
byte0013: 0
byte0014: 0
byte0015: 0
offset0016:
byte0000: 0
byte0001: 0
byte0002: 0
byte0003: 0
byte0004: 0
byte0005: 0
byte0006: 0
byte0007: 0
byte0008: 0
byte0009: 0
byte0010: 0
byte0011: 0
byte0012: 0
byte0013: 0
byte0014: 0
byte0015: 0
offset0032:
byte0000: 0
byte0001: 0
byte0002: 0
byte0003: 0
byte0004: 0
byte0005: 0
byte0006: 0
byte0007: 0
byte0008: 0
byte0009: 0
byte0010: 0
byte0011: 0
byte0012: 0
byte0013: 0
byte0014: 0
byte0015: 0
byte0048: 0
byte0049: 0
byte0050: 0
byte0051: 0
byte0052: 0
byte0053: 0
byte0054: 0
byte0055: 0
byte0056: 0
byte0057: 0
byte0058: 0
byte0059: 0
byte0060: 0
byte0061: 0
relatedSpawner: {fileID: 0}
testModelAnimator: {fileID: 0}
--- !u!114 &5956987736849929195
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -85,6 +163,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b3b4e13d59527d1429a62dde97c6a001, type: 3}
m_Name:
m_EditorClassIdentifier: Core::Reset.Units.UnitMovementHandler
ShowTopMostFoldoutHeaderGroup: 1
data:
directionChangingSoftness:
targetValue: 1
@@ -123,30 +202,30 @@ MonoBehaviour:
defaultSmoothing: 1
defaultEasing: 2
acceleration:
targetValue: 5
currentValue: 5
targetValue: 20
currentValue: 20
targetSmoothing: 1
targetEasing: 2
currentSmoothing: 1
defaultValue: 5
defaultValue: 20
defaultSmoothing: 1
defaultEasing: 2
deacceleration:
targetValue: 5
currentValue: 5
targetValue: 10
currentValue: 10
targetSmoothing: 1
targetEasing: 2
currentSmoothing: 1
defaultValue: 5
defaultValue: 10
defaultSmoothing: 1
defaultEasing: 2
moveSpeed:
targetValue: 15
currentValue: 15
targetValue: 5
currentValue: 5
targetSmoothing: 10
targetEasing: 2
currentSmoothing: 10
defaultValue: 15
defaultValue: 5
defaultSmoothing: 10
defaultEasing: 2
gravityPower:
@@ -204,6 +283,196 @@ MonoBehaviour:
defaultSmoothing: 1
defaultEasing: 2
specifiedRotation: {x: 0, y: 0, z: 0}
--- !u!95 &4447190118606394553
Animator:
serializedVersion: 7
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9098724353270996650}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 4f5596a1d63365d4cba1b75587fe5939, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 1
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_AnimatePhysics: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!114 &3375213058463339329
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9098724353270996650}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4a7dbb6bbdf4ffb46ab7dd87ba8191e7, type: 3}
m_Name:
m_EditorClassIdentifier: NodeCanvas::NodeCanvas.StateMachines.FSMOwner
_serializedExposedParameters: []
_boundGraphSerialization:
_boundGraphObjectReferences: []
_boundGraphSource:
_version: 0
_category:
_comments:
_translation: {x: 0, y: 0}
_zoomFactor: 1
_firstActivation: 0
_enableAction: 0
_disableAction: 0
_lockBoundGraphPrefabOverrides: 1
_preInitializeSubGraphs: 0
_updateMode: 0
_graph: {fileID: 11400000, guid: db5b23d2ee7fffd49a42d5a120c50e94, type: 2}
_blackboard: {fileID: 0}
--- !u!114 &6881462958115636691
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9098724353270996650}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b98a6db0b653f764eac834f85857a9dd, type: 3}
m_Name:
m_EditorClassIdentifier: ParadoxNotion::NodeCanvas.Framework.Blackboard
_parentBlackboard: {fileID: 0}
_serializedBlackboard: '{"_variables":{}}'
_objectReferences: []
_serializedVariables: []
--- !u!114 &5075083518210584453
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9098724353270996650}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 373b52eb9bf8c40f785bb6947a1aee66, type: 3}
m_Name:
m_EditorClassIdentifier: AstarPathfindingProject::Pathfinding.Seeker
version: 1073741824
drawGizmos: 1
detailedGizmos: 0
startEndModifier:
addPoints: 0
exactStartPoint: 3
exactEndPoint: 3
useRaycasting: 0
mask:
serializedVersion: 2
m_Bits: 4294967295
useGraphRaycasting: 0
traversableTags: -1
tagCostMultipliers:
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
tagEntryCosts: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
graphMask:
value: -1
--- !u!114 &1077794308846883818
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9098724353270996650}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1a67969fa2454c8f8b5c84c31c95d890, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Reset.Units.EnemyPathfinding
ShowTopMostFoldoutHeaderGroup: 1
nextWaypointDistance: 3
reachedEndOfPath: 0
--- !u!143 &6620953456884791151
CharacterController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9098724353270996650}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Height: 2
m_Radius: 0.5
m_SlopeLimit: 45
m_StepOffset: 0.3
m_SkinWidth: 0.08
m_MinMoveDistance: 0.001
m_Center: {x: 0, y: 1, z: 0}
--- !u!114 &6778397863327314458
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9098724353270996650}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb6a34d769a1e4ac7b0b30e433aa443c, type: 3}
m_Name:
m_EditorClassIdentifier: AstarPathfindingProject::Pathfinding.SimpleSmoothModifier
version: 1073741824
smoothType: 0
subdivisions: 2
iterations: 2
strength: 0.5
uniformLength: 1
maxSegmentLength: 2
bezierTangentLength: 0.4
offset: 0.2
factor: 0.1
--- !u!1001 &8807019661255186479
PrefabInstance:
m_ObjectHideFlags: 0