feat: better state handling for combat

melee weapon now spawns in hand
melee substate cleaned up to work with above
added new playerinventory script on player
added new playeranimation script on player
changed inventory to IInventory
animations tweaked to avoid a lockout
This commit is contained in:
Chris
2026-01-08 01:22:45 -05:00
parent 2e28fe17cd
commit 96c43c6369
24 changed files with 362 additions and 88 deletions

View File

@@ -10,15 +10,15 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
propertyPath: m_LocalPosition.x
value: -0.5130615
value: -5.499994
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
propertyPath: m_LocalPosition.y
value: 0
value: -0.0000000098661985
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
propertyPath: m_LocalPosition.z
value: -2.0914779
value: 12.30796
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
propertyPath: m_LocalRotation.w
@@ -54,8 +54,12 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
propertyPath: m_Name
value: CharacterModelSimplified
value: Player
objectReference: {fileID: 0}
- target: {fileID: 9167773376777644013, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: f13959d7f99a3084797d0db9a2b2382c, type: 2}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@@ -113,7 +117,7 @@ PrefabInstance:
addedObject: {fileID: 754343846373850872}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
insertIndex: -1
addedObject: {fileID: 912779184719801384}
addedObject: {fileID: 8174809639718565000}
m_SourcePrefab: {fileID: 100100000, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
--- !u!1 &2370652034083115105 stripped
GameObject:
@@ -132,8 +136,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 84709832
InScenePlacedSourceGlobalObjectIdHash: 999748856
GlobalObjectIdHash: 2249897443
InScenePlacedSourceGlobalObjectIdHash: 2957555102
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
@@ -691,10 +695,10 @@ MonoBehaviour:
_enableAction: 0
_disableAction: 0
_lockBoundGraphPrefabOverrides: 1
_preInitializeSubGraphs: 0
_preInitializeSubGraphs: 1
_updateMode: 0
_graph: {fileID: 11400000, guid: dd633ec36fc4a2b4da964d9435368785, type: 2}
_blackboard: {fileID: 6546916578030478377, guid: 091cfac8be4c5a144a0b8997a9f1ff28, type: 3}
_blackboard: {fileID: 4131530697389755607}
--- !u!114 &4131530697389755607
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -859,13 +863,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d57ab8ec1cbbdcf46813f268625d3494, type: 3}
m_Name:
m_EditorClassIdentifier: Core::Reset.Units.Inventory
ShowTopMostFoldoutHeaderGroup: 1
rangedWeapon: {fileID: 0}
meleeWeapon: {fileID: 0}
meleeWeapon: {fileID: 11400000, guid: 18020bf6266740d4dab9dbcae8073424, type: 2}
spellAbility1: {fileID: 0}
spellAbility2: {fileID: 0}
toolAbility1: {fileID: 0}
toolAbility2: {fileID: 0}
storedItems: []
--- !u!95 &2240486157433394837
Animator:
serializedVersion: 7
@@ -929,7 +933,7 @@ MonoBehaviour:
ShowTopMostFoldoutHeaderGroup: 1
TransitionStateInfoList: []
m_Animator: {fileID: 0}
--- !u!114 &912779184719801384
--- !u!114 &8174809639718565000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -938,9 +942,9 @@ MonoBehaviour:
m_GameObject: {fileID: 2370652034083115105}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a481e07cce98ed54ea4f1e9622c7df8b, type: 3}
m_Script: {fileID: 11500000, guid: 6974bcad59fb407296da5a7ed7f7a79c, type: 3}
m_Name:
m_EditorClassIdentifier: Core::Reset.Units.UnitAnimation
m_EditorClassIdentifier: Assembly-CSharp::Reset.Units.PlayerAnimation
ShowTopMostFoldoutHeaderGroup: 1
modelAnimator: {fileID: 8505492416078151957, guid: 091cfac8be4c5a144a0b8997a9f1ff28, type: 3}
headBone: {fileID: 0}
@@ -948,3 +952,15 @@ MonoBehaviour:
headRotOffset: {x: 0, y: 0, z: 0}
neckRotOffset: {x: 0, y: 0, z: 0}
rotationLimit: {x: 0, y: 0, z: 0}
rightHand: {fileID: 3240225853279553900}
leftHand: {fileID: 9074315924083793253}
--- !u!4 &3240225853279553900 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 58773947878614108, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
m_PrefabInstance: {fileID: 3181606937516698928}
m_PrefabAsset: {fileID: 0}
--- !u!4 &9074315924083793253 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -3330089877873708971, guid: a4609a80d9c9c72489c602cc90e3f76a, type: 3}
m_PrefabInstance: {fileID: 3181606937516698928}
m_PrefabAsset: {fileID: 0}