added reload animation and feature

This commit is contained in:
Mausham
2025-12-30 16:22:49 -08:00
parent 1a61f3c506
commit 0ec69f66c9
16 changed files with 27895 additions and 26896 deletions

View File

@@ -1,5 +1,82 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1102 &-8544423869887076905
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:
- {fileID: -5358072098045260376}
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!1101 &-5358072098045260376
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: Hit
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 2061396788387956441}
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!1107 &-1361460110817966438
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 2061396788387956441}
m_Position: {x: 380, y: 250, z: 0}
- serializedVersion: 1
m_State: {fileID: -8544423869887076905}
m_Position: {x: 401, y: 119, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 130, y: 130, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -8544423869887076905}
--- !u!1102 &-99283565050525444
AnimatorState:
serializedVersion: 6
@@ -34,7 +111,13 @@ AnimatorController:
m_PrefabAsset: {fileID: 0}
m_Name: Enemy
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorParameters:
- m_Name: Hit
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@@ -48,6 +131,67 @@ AnimatorController:
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
- serializedVersion: 5
m_Name: New Layer
m_StateMachine: {fileID: -1361460110817966438}
m_Mask: {fileID: 31900000, guid: 8c93f937ec5319e4f8f734a6185b2ab8, type: 2}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &2061396788387956441
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SoldierHitReaction
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 6731833491236309845}
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: 7d237967aaaa0ac4f9be3dc92a9e4236, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &6731833491236309845
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: -8544423869887076905}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.423077
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1107 &7709146335867929075
AnimatorStateMachine:
serializedVersion: 6

View File

@@ -0,0 +1,11 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!319 &31900000
AvatarMask:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: NpcTest
m_Mask: 01000000010000000100000001000000010000000000000000000000000000000000000001000000010000000000000000000000
m_Elements: []

View File

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

View File

@@ -0,0 +1,483 @@
fileFormatVersion: 2
guid: 7d237967aaaa0ac4f9be3dc92a9e4236
ModelImporter:
serializedVersion: 24200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 3
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations:
- serializedVersion: 16
name: SoldierHitReaction
takeName: mixamo.com
internalID: -203655887218126122
firstFrame: 0
lastFrame: 26
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 0
loopBlend: 0
loopBlendOrientation: 1
loopBlendPositionY: 1
loopBlendPositionXZ: 1
keepOriginalOrientation: 1
keepOriginalPositionY: 0
keepOriginalPositionXZ: 0
heightFromFeet: 1
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human:
- boneName: Bip001 Pelvis
humanName: Hips
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 L Thigh
humanName: LeftUpperLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 R Thigh
humanName: RightUpperLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 L Calf
humanName: LeftLowerLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 R Calf
humanName: RightLowerLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 L Foot
humanName: LeftFoot
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 R Foot
humanName: RightFoot
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 Spine
humanName: Spine
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 Neck
humanName: Neck
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 Head
humanName: Head
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 L Clavicle
humanName: LeftShoulder
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 R Clavicle
humanName: RightShoulder
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 L UpperArm
humanName: LeftUpperArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 R UpperArm
humanName: RightUpperArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 L Forearm
humanName: LeftLowerArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 R Forearm
humanName: RightLowerArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 L Hand
humanName: LeftHand
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 R Hand
humanName: RightHand
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 L Toe0
humanName: LeftToes
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 R Toe0
humanName: RightToes
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 L Finger0
humanName: Left Thumb Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 R Finger0
humanName: Right Thumb Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Bip001 Spine1
humanName: Chest
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
skeleton:
- name: Soldier_demo(Clone)
parentName:
position: {x: 0, y: 0, z: 0}
rotation: {x: 0, y: 0.0000005793614, z: 0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: Bip001
parentName: Soldier_demo(Clone)
position: {x: -0, y: 1.2856663, z: -0.02168165}
rotation: {x: -0.50000036, y: 0.49999964, z: 0.49999964, w: 0.50000036}
scale: {x: 0.99999994, y: 0.99999994, z: 1}
- name: Bip001 Footsteps
parentName: Bip001
position: {x: -0, y: 0, z: -1.2714787}
rotation: {x: 0, y: 0, z: -0.7071063, w: 0.70710725}
scale: {x: 1, y: 1, z: 1}
- name: Bip001 Pelvis
parentName: Bip001
position: {x: -0, y: 0, z: 0}
rotation: {x: 0.5, y: -0.5, z: -0.5, w: -0.5}
scale: {x: 1, y: 1, z: 1}
- name: Bip001 L Thigh
parentName: Bip001 Pelvis
position: {x: 0.00000019378662, y: 0.0000002846241, z: 0.16512406}
rotation: {x: 0, y: 1, z: 0, w: -0.00000004371139}
scale: {x: 0.99999994, y: 1, z: 1}
- name: Bip001 L Calf
parentName: Bip001 L Thigh
position: {x: -0.62975675, y: 0, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1.0000001, y: 1, z: 1.0000001}
- name: Bip001 L Foot
parentName: Bip001 L Calf
position: {x: -0.51009345, y: -0.000000006055832, z: -0.000000012111664}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1.0000001, y: 1.0000004, z: 1.0000001}
- name: Bip001 L Toe0
parentName: Bip001 L Foot
position: {x: -0.13381289, y: 0.14277282, z: 0}
rotation: {x: 0, y: 0, z: 0.7071068, w: -0.7071068}
scale: {x: 1.0000006, y: 1.0000001, z: 1.0000004}
- name: Bip001 L Toe0Nub
parentName: Bip001 L Toe0
position: {x: -0.12456887, y: 0, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: -0.99999994, y: -1, z: -0.99999994}
- name: Bip001 R Thigh
parentName: Bip001 Pelvis
position: {x: -0.00000019378662, y: -0.00000017259121, z: -0.16512406}
rotation: {x: 0, y: 1, z: 0, w: -0.00000004371139}
scale: {x: 1.0000001, y: 1, z: 0.99999994}
- name: Bip001 R Calf
parentName: Bip001 R Thigh
position: {x: -0.62975675, y: 0, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: Bip001 R Foot
parentName: Bip001 R Calf
position: {x: -0.51009345, y: 0.000000006055832, z: 0.000000024223327}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1, y: 1.0000001, z: 0.99999994}
- name: Bip001 R Toe0
parentName: Bip001 R Foot
position: {x: -0.13381289, y: 0.14277282, z: 0}
rotation: {x: 0, y: 0, z: 0.7071068, w: -0.7071068}
scale: {x: 1.0000006, y: 1.0000001, z: 1.0000005}
- name: Bip001 R Toe0Nub
parentName: Bip001 R Toe0
position: {x: -0.12456887, y: 0, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 0.99999994, y: 1, z: 0.99999994}
- name: Bip001 Spine
parentName: Bip001 Pelvis
position: {x: -0.15888187, y: -0.00025077956, z: 0.00000022068525}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1, y: 1.0000002, z: 0.99999994}
- name: Bip001 Spine1
parentName: Bip001 Spine
position: {x: -0.31531757, y: -0.00024016218, z: -6.661221e-10}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1.0000002, y: 1, z: 1}
- name: Bip001 L Clavicle
parentName: Bip001 Spine1
position: {x: -0.29195407, y: -0.00034396217, z: 0.08171383}
rotation: {x: 0.7071068, y: -0.000000030908623, z: -0.7071068, w: 0.000000030908623}
scale: {x: 1.0000001, y: 1.0000001, z: 1.0000001}
- name: Bip001 L UpperArm
parentName: Bip001 L Clavicle
position: {x: -0.19370845, y: 0.000000006055832, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 0.99999976, y: 1.0000001, z: 1.0000001}
- name: Bip001 L Forearm
parentName: Bip001 L UpperArm
position: {x: -0.43241632, y: 0, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1, y: 0.99999994, z: 1}
- name: Bip001 L Hand
parentName: Bip001 L Forearm
position: {x: -0.3868162, y: 0.000000012111664, z: -0.00000009689331}
rotation: {x: 0.7071068, y: 0, z: 0, w: -0.7071068}
scale: {x: 1, y: 1.0000004, z: 1.0000001}
- name: Bip001 L Finger0
parentName: Bip001 L Hand
position: {x: -0.13174462, y: 0, z: 0.000000012111664}
rotation: {x: 0, y: 0.3826835, z: 0, w: -0.9238795}
scale: {x: 1.0000005, y: 1.0000006, z: 1.0000008}
- name: Bip001 L Finger0Nub
parentName: Bip001 L Finger0
position: {x: -0.11363192, y: -0.00000009689331, z: 0.000000012111664}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 0.99999994, y: 0.99999994, z: 0.99999994}
- name: Bip001 Neck
parentName: Bip001 Spine1
position: {x: -0.36533022, y: 0.017163498, z: 0.000000026758634}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1.0000001, y: 1.0000001, z: 1}
- name: Bip001 Head
parentName: Bip001 Neck
position: {x: -0.11682097, y: -0.000000048446655, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 0.9999999, y: 0.99999976, z: 0.9999998}
- name: Bip001 HeadNub
parentName: Bip001 Head
position: {x: -0.31048164, y: 0.000000001513958, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1, y: 0.99999994, z: 0.99999994}
- name: Bip001 R Clavicle
parentName: Bip001 Spine1
position: {x: -0.29195407, y: -0.00034350797, z: -0.081713825}
rotation: {x: 0.7071068, y: -0.000000030908623, z: 0.7071068, w: -0.000000030908623}
scale: {x: 1.0000001, y: 1.0000001, z: 1.0000001}
- name: Bip001 R UpperArm
parentName: Bip001 R Clavicle
position: {x: -0.19370848, y: 0.000000006055832, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 0.9999999, y: 0.9999997, z: 0.99999994}
- name: Bip001 R Forearm
parentName: Bip001 R UpperArm
position: {x: -0.43241623, y: 0, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1.0000005, y: 1.0000004, z: 1.0000001}
- name: Bip001 R Hand
parentName: Bip001 R Forearm
position: {x: -0.3868161, y: 0.000000006055832, z: -0.00000009689331}
rotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
scale: {x: 1.0000001, y: 1.0000004, z: 1.0000001}
- name: Bip001 R Finger0
parentName: Bip001 R Hand
position: {x: -0.13174467, y: 0, z: 0}
rotation: {x: 0, y: 0.38268346, z: 0, w: 0.9238795}
scale: {x: 1.0000002, y: 1.0000006, z: 1}
- name: Bip001 R Finger0Nub
parentName: Bip001 R Finger0
position: {x: -0.11363182, y: 0.00000009689331, z: -0.000000012111664}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: -1.0000001, y: -1.0000001, z: -1.0000001}
- name: Soldier_mesh
parentName: Soldier_demo(Clone)
position: {x: -0, y: 0, z: 0}
rotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068}
scale: {x: 1, y: 1, z: 1}
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 1
hasExtraRoot: 1
skeletonHasParents: 0
lastHumanDescriptionAvatarSource: {fileID: 9000000, guid: fcb334eb247ae3e488abb081c847cf09, type: 3}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 3
humanoidOversampling: 1
avatarSetup: 2
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,110 +0,0 @@
fileFormatVersion: 2
guid: 55a8882e7ddbefe4ba4da4f023de327e
ModelImporter:
serializedVersion: 24200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 3
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 1
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 3
humanoidOversampling: 1
avatarSetup: 1
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -8,6 +8,7 @@ namespace Darkmatter.Core
public void Reload();
bool canAttack { get; }
string WeaponName { get; }
public int AmmoCount { get; }
}
}

View File

@@ -1,10 +1,11 @@
using System.Threading.Tasks;
using UnityEngine;
namespace Darkmatter.Core
{
public interface IPlayerAnim : IHumonoidAnim
{
void PlayReloadAnim();
public void PlayReloadAnim(IWeapon currentWeapon);
void PlayShootAnim();
}
}

View File

@@ -1,4 +1,6 @@
using Darkmatter.Core;
using System;
using System.Threading.Tasks;
using UnityEngine;
using VContainer;
@@ -56,9 +58,12 @@ namespace Darkmatter.Domain
{
GunWeapon.Attack();
}
if(GunWeapon.AmmoCount==0)
{
playerAnim.PlayReloadAnim(GunWeapon);
}
}
}
}

View File

@@ -11,6 +11,8 @@ namespace Darkmatter.Domain
public abstract void Attack();
public virtual int AmmoCount { get; protected set; }
public virtual void Reload()
{
Debug.Log("Reloading");

View File

@@ -1,15 +1,42 @@
using Darkmatter.Core;
using System;
using System.Collections;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Animations.Rigging;
using VContainer;
namespace Darkmatter.Presentation
{
public class PlayerAnimController : HumonoidAnim, IPlayerAnim
{
private readonly int shootHash = Animator.StringToHash("IsShooting");
private readonly int reloadHash = Animator.StringToHash("Reload");
public TwoBoneIKConstraint HandOnGunIK; //for gunHand Ik
private Coroutine reloadCoroutine;
public void PlayReloadAnim()
public void PlayReloadAnim(IWeapon currentWeapon)
{
Debug.Log("Reloading");
if (reloadCoroutine == null)
{
reloadCoroutine = StartCoroutine(ReloadRoutine(currentWeapon));
}
}
IEnumerator ReloadRoutine(IWeapon currentWeapon)
{
animator.SetLayerWeight(1, 1);
HandOnGunIK.weight = 0f;
animator.SetTrigger(reloadHash);
yield return new WaitForSeconds(3f); //gave the length of the animation very bad practice
animator.SetLayerWeight(1, 0);
HandOnGunIK.weight = 1f;
currentWeapon.Reload();
reloadCoroutine = null;
}
public void PlayShootAnim()

View File

@@ -6,6 +6,7 @@ namespace Darkmatter.Presentation
public class Enemy : MonoBehaviour, IDamageable
{
public float health = 100f;
public Animator enemyAnimator;
public void Die()
{
Debug.Log("Dead");
@@ -15,6 +16,8 @@ namespace Darkmatter.Presentation
public void TakeDamage(float damage)
{
health -= damage;
enemyAnimator.SetLayerWeight(1, 1);
enemyAnimator.SetTrigger("Hit");
if (health <= 0) Die();
Debug.Log("Damage Taken");
}

View File

@@ -10,8 +10,6 @@ namespace Darkmatter.Presentation
{
public class PlayerMotor : MonoBehaviour, IPlayerPawn
{
public TwoBoneIKConstraint IKConstraint;
[Header("LookSetting")]
public Transform cinemachineFollowTarget;
@@ -29,13 +27,30 @@ namespace Darkmatter.Presentation
[Header("TurnSetting")]
public float turnSpeed = 5f;
[Inject] private PlayerConfigSO playerConfig;
private void Start()
{
Cursor.lockState = CursorLockMode.Locked;
}
private void HandleShooting()
{
//float shootingWeight = animator.GetLayerWeight(1);
//float targetWeight = inputReader.isShooting ? 1 : 0;
//float setshootingWeight = Mathf.Lerp(shootingWeight, targetWeight, Time.deltaTime * 5);
//animator.SetLayerWeight(1, setshootingWeight);
//animator.SetBool("IsShooting", inputReader.isShooting);
//if (!inputReader.isShooting) return;
//if(gunWeapon.canAttack)
//{
// gunWeapon.Attack();
//}
}
//state based functions
public void Move(Vector3 motion)

View File

@@ -14,13 +14,13 @@ namespace Darkmatter.Presentation
[Header("Weapon Data")]
public float fireRate = 0.1f;
public int ammoCount = 40;
public override int AmmoCount { get; protected set; } = 40;
private float lastUsedTime;
public GameObject BulletHole;
public GameObject BulletHole;
public override string WeaponName => "Rifel";
public override bool canAttack => Time.time >= lastUsedTime + fireRate && ammoCount > 0;
public override bool canAttack => Time.time >= lastUsedTime + fireRate && AmmoCount > 0;
[Inject] private ITargetProvider targetProvider;
private RaycastHit hitPoint => targetProvider.hitPoint;
@@ -30,15 +30,10 @@ namespace Darkmatter.Presentation
public override void Attack()
{
lastUsedTime = Time.time;
ammoCount--;
AmmoCount--;
PlayMuzzleFlash();
if (hitPoint.transform != null) PlayBulletHitEffectParticle();
if(ammoCount <= 0) //test reload
{
Reload();
}
}
private void ShowBulletHole(Vector3 spawnPos)
@@ -66,7 +61,7 @@ namespace Darkmatter.Presentation
public override void Reload()
{
base.Reload();
ammoCount = 40;
AmmoCount = 40;
}
private void PlayMuzzleFlash()

File diff suppressed because it is too large Load Diff