mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-29 04:42:13 +01:00
Weapons start_2
+ added shooting animation + added idle animation
This commit is contained in:
8
Assets/Animations.meta
Normal file
8
Assets/Animations.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a1f94b991cf40a5419a01255cddb1d7e
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Animations/Weapons.meta
Normal file
8
Assets/Animations/Weapons.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4065e56574656e54d80ae964faa4c582
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
1133
Assets/Animations/Weapons/USP.anim
Normal file
1133
Assets/Animations/Weapons/USP.anim
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/Animations/Weapons/USP.anim.meta
Normal file
8
Assets/Animations/Weapons/USP.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 912c3053e55b61e45a0b03c6d1da97c5
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
165
Assets/Animations/Weapons/USP.controller
Normal file
165
Assets/Animations/Weapons/USP.controller
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
%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
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
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}
|
||||||
|
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: 50, y: 230, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: -3265146705065767202}
|
||||||
|
--- !u!1102 &-3265146705065767202
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: USP_Idle
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions:
|
||||||
|
- {fileID: -5215087011789661488}
|
||||||
|
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: 7400000, guid: eb3ade9656109ee4387849796f993989, type: 2}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: USP
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters:
|
||||||
|
- m_Name: Blend
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 0}
|
||||||
|
- m_Name: isShooting
|
||||||
|
m_Type: 4
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 0}
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: -3970592403941733754}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
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 &7859408999326589745
|
||||||
|
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_Transitions:
|
||||||
|
- {fileID: -6362556569056045556}
|
||||||
|
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: 7400000, guid: 912c3053e55b61e45a0b03c6d1da97c5, type: 2}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
8
Assets/Animations/Weapons/USP.controller.meta
Normal file
8
Assets/Animations/Weapons/USP.controller.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 321e7626d8ff31343a98ca2ed11f5fe8
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 9100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
205
Assets/Animations/Weapons/USP_Idle.anim
Normal file
205
Assets/Animations/Weapons/USP_Idle.anim
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!74 &7400000
|
||||||
|
AnimationClip:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: USP_Idle
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Legacy: 0
|
||||||
|
m_Compressed: 0
|
||||||
|
m_UseHighQualityCurve: 1
|
||||||
|
m_RotationCurves: []
|
||||||
|
m_CompressedRotationCurves: []
|
||||||
|
m_EulerCurves: []
|
||||||
|
m_PositionCurves:
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: {x: -1.3934289, y: 1.5959997, z: -0.9728899}
|
||||||
|
inSlope: {x: 0, 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.5
|
||||||
|
value: {x: -1.3934289, y: 1.61, z: -0.9728899}
|
||||||
|
inSlope: {x: 0, 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: 1
|
||||||
|
value: {x: -1.3934289, y: 1.5959997, z: -0.9728899}
|
||||||
|
inSlope: {x: 0, 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}
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
path:
|
||||||
|
m_ScaleCurves: []
|
||||||
|
m_FloatCurves: []
|
||||||
|
m_PPtrCurves: []
|
||||||
|
m_SampleRate: 60
|
||||||
|
m_WrapMode: 0
|
||||||
|
m_Bounds:
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
m_Extent: {x: 0, y: 0, z: 0}
|
||||||
|
m_ClipBindingConstant:
|
||||||
|
genericBindings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
path: 0
|
||||||
|
attribute: 1
|
||||||
|
script: {fileID: 0}
|
||||||
|
typeID: 4
|
||||||
|
customType: 0
|
||||||
|
isPPtrCurve: 0
|
||||||
|
pptrCurveMapping: []
|
||||||
|
m_AnimationClipSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||||
|
m_AdditiveReferencePoseTime: 0
|
||||||
|
m_StartTime: 0
|
||||||
|
m_StopTime: 1
|
||||||
|
m_OrientationOffsetY: 0
|
||||||
|
m_Level: 0
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_HasAdditiveReferencePose: 0
|
||||||
|
m_LoopTime: 1
|
||||||
|
m_LoopBlend: 0
|
||||||
|
m_LoopBlendOrientation: 0
|
||||||
|
m_LoopBlendPositionY: 0
|
||||||
|
m_LoopBlendPositionXZ: 0
|
||||||
|
m_KeepOriginalOrientation: 0
|
||||||
|
m_KeepOriginalPositionY: 1
|
||||||
|
m_KeepOriginalPositionXZ: 0
|
||||||
|
m_HeightFromFeet: 0
|
||||||
|
m_Mirror: 0
|
||||||
|
m_EditorCurves:
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: -1.3934289
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.5
|
||||||
|
value: -1.3934289
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: -1.3934289
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.x
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1.5959997
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.5
|
||||||
|
value: 1.61
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: 1.5959997
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.y
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: -0.9728899
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.5
|
||||||
|
value: -0.9728899
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: -0.9728899
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.z
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
m_EulerEditorCurves: []
|
||||||
|
m_HasGenericRootTransform: 1
|
||||||
|
m_HasMotionFloatCurves: 0
|
||||||
|
m_Events: []
|
||||||
8
Assets/Animations/Weapons/USP_Idle.anim.meta
Normal file
8
Assets/Animations/Weapons/USP_Idle.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: eb3ade9656109ee4387849796f993989
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1164,6 +1164,46 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: -2.178
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0.28210068
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: -0.001999855
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 0.59534067
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: -0.59576917
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: -0.3738438
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0.38841915
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: -24.769
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: -89.331
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8380834887736873757, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 90.733
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -6727777295156004340, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
- target: {fileID: -6727777295156004340, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
value:
|
value:
|
||||||
@@ -1208,6 +1248,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
value: 7
|
value: 7
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2568609636103234418, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: -1.2040669
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4866802741838930128, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
- target: {fileID: 4866802741838930128, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
value: 7
|
value: 7
|
||||||
@@ -1216,10 +1260,22 @@ PrefabInstance:
|
|||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 2100000, guid: 3d840727f7707a0428afd012777242eb, type: 2}
|
objectReference: {fileID: 2100000, guid: 3d840727f7707a0428afd012777242eb, type: 2}
|
||||||
|
- target: {fileID: 6037558612037783262, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: -1.2040669
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 6710513118507747510, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
- target: {fileID: 6710513118507747510, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 2100000, guid: 2bdfe923058ca3845ba7903bc4f3c61f, type: 2}
|
objectReference: {fileID: 2100000, guid: 2bdfe923058ca3845ba7903bc4f3c61f, type: 2}
|
||||||
|
- target: {fileID: 7999324725397794317, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: -0.99435574
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7999324725397794317, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0.2605423
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8191996517437680109, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
- target: {fileID: 8191996517437680109, guid: db8a9548ba56c1949bb28f7c6129bbeb, type: 3}
|
||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
value: 7
|
value: 7
|
||||||
@@ -11250,6 +11306,99 @@ ParticleSystem:
|
|||||||
m_PostInfinity: 2
|
m_PostInfinity: 2
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
vectorLabel1_3: W
|
vectorLabel1_3: W
|
||||||
|
--- !u!1 &1915787001
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1915787003}
|
||||||
|
- component: {fileID: 1915787002}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Point Light
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!108 &1915787002
|
||||||
|
Light:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1915787001}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 10
|
||||||
|
m_Type: 2
|
||||||
|
m_Shape: 0
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_Intensity: 1
|
||||||
|
m_Range: 168.45
|
||||||
|
m_SpotAngle: 30
|
||||||
|
m_InnerSpotAngle: 21.80208
|
||||||
|
m_CookieSize: 10
|
||||||
|
m_Shadows:
|
||||||
|
m_Type: 0
|
||||||
|
m_Resolution: -1
|
||||||
|
m_CustomResolution: -1
|
||||||
|
m_Strength: 1
|
||||||
|
m_Bias: 0.05
|
||||||
|
m_NormalBias: 0.4
|
||||||
|
m_NearPlane: 0.2
|
||||||
|
m_CullingMatrixOverride:
|
||||||
|
e00: 1
|
||||||
|
e01: 0
|
||||||
|
e02: 0
|
||||||
|
e03: 0
|
||||||
|
e10: 0
|
||||||
|
e11: 1
|
||||||
|
e12: 0
|
||||||
|
e13: 0
|
||||||
|
e20: 0
|
||||||
|
e21: 0
|
||||||
|
e22: 1
|
||||||
|
e23: 0
|
||||||
|
e30: 0
|
||||||
|
e31: 0
|
||||||
|
e32: 0
|
||||||
|
e33: 1
|
||||||
|
m_UseCullingMatrixOverride: 0
|
||||||
|
m_Cookie: {fileID: 0}
|
||||||
|
m_DrawHalo: 0
|
||||||
|
m_Flare: {fileID: 0}
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_Lightmapping: 4
|
||||||
|
m_LightShadowCasterMode: 0
|
||||||
|
m_AreaSize: {x: 1, y: 1}
|
||||||
|
m_BounceIntensity: 1
|
||||||
|
m_ColorTemperature: 6570
|
||||||
|
m_UseColorTemperature: 0
|
||||||
|
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_UseBoundingSphereOverride: 0
|
||||||
|
m_UseViewFrustumForShadowCasterCull: 1
|
||||||
|
m_ShadowRadius: 0
|
||||||
|
m_ShadowAngle: 0
|
||||||
|
--- !u!4 &1915787003
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1915787001}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 1.3654473, y: 1.88, z: -5.06}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 7
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1960893053
|
--- !u!1 &1960893053
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -11542,7 +11691,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
active: 1
|
active: 1
|
||||||
damage: 20
|
damage: 20
|
||||||
firerate: 2
|
firerate: 0.2
|
||||||
recoilStrength: 15
|
recoilStrength: 15
|
||||||
currentAmmunition: 12
|
currentAmmunition: 12
|
||||||
totalAmmunition: 12
|
totalAmmunition: 12
|
||||||
@@ -11550,6 +11699,25 @@ MonoBehaviour:
|
|||||||
smoke: {fileID: 1612241555}
|
smoke: {fileID: 1612241555}
|
||||||
bulletExit: {fileID: 964267714}
|
bulletExit: {fileID: 964267714}
|
||||||
camera: {fileID: 963194225}
|
camera: {fileID: 963194225}
|
||||||
|
--- !u!95 &1995791060
|
||||||
|
Animator:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1995791057}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Avatar: {fileID: 0}
|
||||||
|
m_Controller: {fileID: 9100000, guid: 321e7626d8ff31343a98ca2ed11f5fe8, type: 2}
|
||||||
|
m_CullingMode: 0
|
||||||
|
m_UpdateMode: 0
|
||||||
|
m_ApplyRootMotion: 0
|
||||||
|
m_LinearVelocityBlending: 0
|
||||||
|
m_WarningMessage:
|
||||||
|
m_HasTransformHierarchy: 1
|
||||||
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
|
m_KeepAnimatorControllerStateOnDisable: 0
|
||||||
--- !u!1 &2119583729
|
--- !u!1 &2119583729
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ public class Weapon : MonoBehaviour
|
|||||||
{
|
{
|
||||||
[SerializeField] bool active = false;
|
[SerializeField] bool active = false;
|
||||||
[SerializeField] float damage = 0;
|
[SerializeField] float damage = 0;
|
||||||
[SerializeField] int firerate = 0;
|
[SerializeField] float firerate = 0;
|
||||||
[SerializeField] float recoilStrength = 0;
|
[SerializeField] float recoilStrength = 0;
|
||||||
[SerializeField] int currentAmmunition = 0;
|
[SerializeField] int currentAmmunition = 0;
|
||||||
[SerializeField] int totalAmmunition = 0;
|
[SerializeField] int totalAmmunition = 0;
|
||||||
@@ -14,11 +14,16 @@ public class Weapon : MonoBehaviour
|
|||||||
[SerializeField] ParticleSystem smoke;
|
[SerializeField] ParticleSystem smoke;
|
||||||
[SerializeField] GameObject bulletExit;
|
[SerializeField] GameObject bulletExit;
|
||||||
[SerializeField] GameObject camera;
|
[SerializeField] GameObject camera;
|
||||||
|
|
||||||
public bool Active { get => active; set => active = value; }
|
public bool Active { get => active; set => active = value; }
|
||||||
|
|
||||||
|
private bool allowShoot = true, isShooting = false;
|
||||||
|
Animator anim;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
anim = GetComponent<Animator>();
|
||||||
|
|
||||||
if (Physics.Raycast(camera.transform.position, camera.transform.forward, out RaycastHit hit))
|
if (Physics.Raycast(camera.transform.position, camera.transform.forward, out RaycastHit hit))
|
||||||
{
|
{
|
||||||
transform.rotation = Quaternion.Euler(0f, hit.point.y, 0f);
|
transform.rotation = Quaternion.Euler(0f, hit.point.y, 0f);
|
||||||
@@ -26,15 +31,29 @@ public class Weapon : MonoBehaviour
|
|||||||
}
|
}
|
||||||
private void FixedUpdate()
|
private void FixedUpdate()
|
||||||
{
|
{
|
||||||
if (Input.GetButton("Fire1"))
|
if (Input.GetButton("Fire") && allowShoot && currentAmmunition > 0)
|
||||||
{
|
{
|
||||||
|
anim.Play("USP");
|
||||||
|
isShooting = true;
|
||||||
|
StartCoroutine(fireRate());
|
||||||
fire();
|
fire();
|
||||||
|
currentAmmunition--;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isShooting = false;
|
||||||
|
}
|
||||||
|
if (Input.GetButton("Reload"))
|
||||||
|
{
|
||||||
|
currentAmmunition = totalAmmunition;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
private void fire()
|
private void fire()
|
||||||
{
|
{
|
||||||
|
allowShoot = false;
|
||||||
flash.Play();
|
flash.Play();
|
||||||
smoke.Play();
|
//smoke.Play();
|
||||||
RaycastHit hit;
|
RaycastHit hit;
|
||||||
|
|
||||||
if(Physics.Raycast(bulletExit.transform.position,bulletExit.transform.forward, out hit))
|
if(Physics.Raycast(bulletExit.transform.position,bulletExit.transform.forward, out hit))
|
||||||
@@ -46,5 +65,14 @@ public class Weapon : MonoBehaviour
|
|||||||
}
|
}
|
||||||
Instantiate(bulletImpact, hit.point, Quaternion.LookRotation(hit.normal));*/
|
Instantiate(bulletImpact, hit.point, Quaternion.LookRotation(hit.normal));*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IEnumerator fireRate()
|
||||||
|
{
|
||||||
|
allowShoot = false;
|
||||||
|
yield return new WaitForSeconds(firerate);
|
||||||
|
allowShoot = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -293,3 +293,35 @@ InputManager:
|
|||||||
type: 0
|
type: 0
|
||||||
axis: 0
|
axis: 0
|
||||||
joyNum: 0
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Reload
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: r
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 1
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Fire
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: mouse 0
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 1
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user