From 0c274a031f68e4b0e07a3cd97858a63748881682 Mon Sep 17 00:00:00 2001 From: Noah4ever <66632359+Noah4ever@users.noreply.github.com> Date: Mon, 18 Oct 2021 18:13:06 +0200 Subject: [PATCH] Weapon Animation, Ammunition + fixed USP animation + fixed shooting with CTRL + added working ammunition --- Assets/Animations/Weapons/USP.anim | 158 +++++++++++------------ Assets/Animations/Weapons/USP.controller | 130 +++++++++---------- Assets/Scenes/TestScene.unity | 2 +- Assets/Scripts/Weapons/Weapon.cs | 2 +- 4 files changed, 146 insertions(+), 146 deletions(-) diff --git a/Assets/Animations/Weapons/USP.anim b/Assets/Animations/Weapons/USP.anim index 60d18e0..4c91d8d 100644 --- a/Assets/Animations/Weapons/USP.anim +++ b/Assets/Animations/Weapons/USP.anim @@ -27,7 +27,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -43,7 +43,7 @@ AnimationClip: serializedVersion: 2 m_Curve: - serializedVersion: 3 - time: 0.05 + time: 0.06666667 value: {x: -20.285, y: -90, z: 90} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -52,7 +52,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: {x: -74, y: -90, z: 90} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -61,7 +61,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: {x: -20.285, y: -90, z: 90} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -87,7 +87,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: {x: -1.3934289, y: 1.5959997, z: -0.9728899} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -112,34 +112,34 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: {x: -1.2040669, y: 1.3948857, z: -0.0009195685} inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: -4.9593315, y: 0, z: 0} + outSlope: {x: -5.077, y: 0, z: 0} tangentMode: 0 weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.18333334 - value: {x: -1.7, y: 1.3948857, z: -0.0009195685} - inSlope: {x: -4.9593315, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} + time: 0.23333333 + value: {x: -1.8810002, y: 1.3948857, z: -0.0009195685} + inSlope: {x: -5.077, y: 0, z: 0} + outSlope: {x: 13.538667, y: 0, z: 0} tangentMode: 0 weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.21666667 + time: 0.28333333 value: {x: -1.2040669, y: 1.3948857, z: -0.0009195685} - inSlope: {x: 14.877996, y: 0, z: 0} + inSlope: {x: 13.538667, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: {x: -1.2040669, y: 1.3948857, z: -0.0009195685} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -164,7 +164,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: {x: -1.2040669, y: 1.3948857, z: -0.0009195685} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -173,8 +173,8 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.18333334 - value: {x: -1.7, y: 1.3948857, z: -0.0009195685} + time: 0.23333333 + value: {x: -1.881, y: 1.3948857, z: -0.0009195685} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -182,7 +182,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.21666667 + time: 0.28333333 value: {x: -1.2040669, y: 1.3948857, z: -0.0009195685} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -191,7 +191,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: {x: -1.2040669, y: 1.3948857, z: -0.0009195685} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -216,7 +216,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.05 + time: 0.06666667 value: {x: -1.1, y: 0.2605423, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -225,7 +225,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.083333336 + time: 0.16666667 value: {x: -0.99435574, y: 0.2605423, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -234,7 +234,7 @@ AnimationClip: inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: {x: -0.99435574, y: 0.2605423, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -304,12 +304,12 @@ AnimationClip: m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 - m_StopTime: 0.33333334 + m_StopTime: 0.3 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 @@ -333,7 +333,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: -1.3934289 inSlope: 0 outSlope: 0 @@ -361,7 +361,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: 1.5959997 inSlope: 0 outSlope: 0 @@ -389,7 +389,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: -0.9728899 inSlope: 0 outSlope: 0 @@ -417,7 +417,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: 0 inSlope: 0 outSlope: 0 @@ -445,7 +445,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: 0 inSlope: 0 outSlope: 0 @@ -473,7 +473,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: 0 inSlope: 0 outSlope: 0 @@ -501,34 +501,34 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: -1.2040669 inSlope: 0 - outSlope: -4.9593315 + outSlope: -5.077 tangentMode: 65 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.18333334 - value: -1.7 - inSlope: -4.9593315 - outSlope: 0 - tangentMode: 5 + time: 0.23333333 + value: -1.8810002 + inSlope: -5.077 + outSlope: 13.538667 + tangentMode: 69 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.21666667 + time: 0.28333333 value: -1.2040669 - inSlope: 14.877996 + inSlope: 13.538667 outSlope: 0 tangentMode: 5 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: -1.2040669 inSlope: 0 outSlope: 0 @@ -556,7 +556,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: 1.3948857 inSlope: 0 outSlope: 0 @@ -565,7 +565,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.18333334 + time: 0.23333333 value: 1.3948857 inSlope: 0 outSlope: 0 @@ -574,7 +574,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.21666667 + time: 0.28333333 value: 1.3948857 inSlope: 0 outSlope: 0 @@ -583,7 +583,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: 1.3948857 inSlope: 0 outSlope: 0 @@ -611,7 +611,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: -0.0009195685 inSlope: 0 outSlope: 0 @@ -620,7 +620,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.18333334 + time: 0.23333333 value: -0.0009195685 inSlope: 0 outSlope: 0 @@ -629,7 +629,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.21666667 + time: 0.28333333 value: -0.0009195685 inSlope: 0 outSlope: 0 @@ -638,7 +638,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: -0.0009195685 inSlope: 0 outSlope: 0 @@ -657,7 +657,7 @@ AnimationClip: serializedVersion: 2 m_Curve: - serializedVersion: 3 - time: 0.05 + time: 0.06666667 value: -20.285 inSlope: 0 outSlope: 0 @@ -666,7 +666,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: -74 inSlope: 0 outSlope: 0 @@ -675,7 +675,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: -20.285 inSlope: 0 outSlope: 0 @@ -694,7 +694,7 @@ AnimationClip: serializedVersion: 2 m_Curve: - serializedVersion: 3 - time: 0.05 + time: 0.06666667 value: -90 inSlope: 0 outSlope: 0 @@ -703,7 +703,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: -90 inSlope: 0 outSlope: 0 @@ -712,7 +712,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: -90 inSlope: 0 outSlope: 0 @@ -731,7 +731,7 @@ AnimationClip: serializedVersion: 2 m_Curve: - serializedVersion: 3 - time: 0.05 + time: 0.06666667 value: 90 inSlope: 0 outSlope: 0 @@ -740,7 +740,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: 90 inSlope: 0 outSlope: 0 @@ -749,7 +749,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: 90 inSlope: 0 outSlope: 0 @@ -777,7 +777,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: -1.2040669 inSlope: 0 outSlope: 0 @@ -786,8 +786,8 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.18333334 - value: -1.7 + time: 0.23333333 + value: -1.881 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -795,7 +795,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.21666667 + time: 0.28333333 value: -1.2040669 inSlope: 0 outSlope: 0 @@ -804,7 +804,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: -1.2040669 inSlope: 0 outSlope: 0 @@ -832,7 +832,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: 1.3948857 inSlope: 0 outSlope: 0 @@ -841,7 +841,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.18333334 + time: 0.23333333 value: 1.3948857 inSlope: 0 outSlope: 0 @@ -850,7 +850,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.21666667 + time: 0.28333333 value: 1.3948857 inSlope: 0 outSlope: 0 @@ -859,7 +859,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: 1.3948857 inSlope: 0 outSlope: 0 @@ -887,7 +887,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.1 value: -0.0009195685 inSlope: 0 outSlope: 0 @@ -896,7 +896,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.18333334 + time: 0.23333333 value: -0.0009195685 inSlope: 0 outSlope: 0 @@ -905,7 +905,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.21666667 + time: 0.28333333 value: -0.0009195685 inSlope: 0 outSlope: 0 @@ -914,7 +914,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: -0.0009195685 inSlope: 0 outSlope: 0 @@ -942,7 +942,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.05 + time: 0.06666667 value: -1.1 inSlope: 0 outSlope: 0 @@ -951,7 +951,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.16666667 value: -0.99435574 inSlope: 0 outSlope: 0 @@ -960,7 +960,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: -0.99435574 inSlope: 0 outSlope: 0 @@ -988,7 +988,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.05 + time: 0.06666667 value: 0.2605423 inSlope: 0 outSlope: 0 @@ -997,7 +997,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.16666667 value: 0.2605423 inSlope: 0 outSlope: 0 @@ -1006,7 +1006,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: 0.2605423 inSlope: 0 outSlope: 0 @@ -1034,7 +1034,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.05 + time: 0.06666667 value: 0 inSlope: 0 outSlope: 0 @@ -1043,7 +1043,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.083333336 + time: 0.16666667 value: 0 inSlope: 0 outSlope: 0 @@ -1052,7 +1052,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.33333334 + time: 0.3 value: 0 inSlope: 0 outSlope: 0 diff --git a/Assets/Animations/Weapons/USP.controller b/Assets/Animations/Weapons/USP.controller index 6b91923..22cef26 100644 --- a/Assets/Animations/Weapons/USP.controller +++ b/Assets/Animations/Weapons/USP.controller @@ -1,55 +1,5 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1101 &-6362556569056045556 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 2 - m_ConditionEvent: isShooting - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: -3265146705065767202} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.25 - m_TransitionOffset: 0 - m_ExitTime: 0.375 - m_HasExitTime: 0 - m_HasFixedDuration: 0 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 ---- !u!1101 &-5215087011789661488 -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: isShooting - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 7859408999326589745} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.24999988 - m_TransitionOffset: 0.054883055 - m_ExitTime: 0.7591473 - m_HasExitTime: 0 - m_HasFixedDuration: 0 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 --- !u!1107 &-3970592403941733754 AnimatorStateMachine: serializedVersion: 6 @@ -59,12 +9,12 @@ AnimatorStateMachine: m_PrefabAsset: {fileID: 0} m_Name: Base Layer m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: 7859408999326589745} - m_Position: {x: 360, y: 110, z: 0} - serializedVersion: 1 m_State: {fileID: -3265146705065767202} m_Position: {x: 250, y: 200, z: 0} + - serializedVersion: 1 + m_State: {fileID: 4420670033728139345} + m_Position: {x: 440, y: 120, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] @@ -86,7 +36,7 @@ AnimatorState: m_Speed: 1 m_CycleOffset: 0 m_Transitions: - - {fileID: -5215087011789661488} + - {fileID: 2881017148864571823} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -116,13 +66,13 @@ AnimatorController: m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: isShooting m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer @@ -136,18 +86,68 @@ AnimatorController: m_IKPass: 0 m_SyncedLayerAffectsTiming: 0 m_Controller: {fileID: 9100000} ---- !u!1102 &7859408999326589745 +--- !u!1101 &1230280673047908757 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: isShooting + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: -3265146705065767202} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 3.4516401 + m_TransitionOffset: 0 + m_ExitTime: 0.24486756 + m_HasExitTime: 0 + m_HasFixedDuration: 0 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1101 &2881017148864571823 +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: isShooting + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 4420670033728139345} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.11916071 + m_TransitionOffset: 0.046032865 + m_ExitTime: 0.9954955 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1102 &4420670033728139345 AnimatorState: serializedVersion: 6 m_ObjectHideFlags: 1 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: USP - m_Speed: 1 - m_CycleOffset: 0 + m_Name: USP_Shooting + m_Speed: 3 + m_CycleOffset: 1 m_Transitions: - - {fileID: -6362556569056045556} + - {fileID: 1230280673047908757} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -159,7 +159,7 @@ AnimatorState: m_TimeParameterActive: 0 m_Motion: {fileID: 7400000, guid: 912c3053e55b61e45a0b03c6d1da97c5, type: 2} m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: + m_SpeedParameter: Blend + m_MirrorParameter: isShooting + m_CycleOffsetParameter: Blend + m_TimeParameter: Blend diff --git a/Assets/Scenes/TestScene.unity b/Assets/Scenes/TestScene.unity index 4b205b7..56064e5 100644 --- a/Assets/Scenes/TestScene.unity +++ b/Assets/Scenes/TestScene.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 705507994} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641258, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: diff --git a/Assets/Scripts/Weapons/Weapon.cs b/Assets/Scripts/Weapons/Weapon.cs index 92ad44d..d3fbe4e 100644 --- a/Assets/Scripts/Weapons/Weapon.cs +++ b/Assets/Scripts/Weapons/Weapon.cs @@ -33,7 +33,7 @@ public class Weapon : MonoBehaviour { if (Input.GetButton("Fire") && allowShoot && currentAmmunition > 0) { - anim.Play("USP"); + anim.Play("USP_Shooting"); isShooting = true; StartCoroutine(fireRate()); fire();