more changes to make it better
This commit is contained in:
@@ -99,12 +99,16 @@ AnimatorStateMachine:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 6982170299964900261}
|
||||
m_Position: {x: 480, y: 310, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 7236297632769904969}
|
||||
m_Position: {x: 400, y: 470, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_AnyStateTransitions:
|
||||
- {fileID: 2627427753025589979}
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 180, y: 470, z: 0}
|
||||
m_AnyStatePosition: {x: 130, y: 470, z: 0}
|
||||
m_EntryPosition: {x: -130, y: 450, z: 0}
|
||||
m_ExitPosition: {x: 640, y: 460, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
@@ -214,6 +218,53 @@ AnimatorState:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &2627427753025589979
|
||||
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: Body_ThrowHammer
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 7236297632769904969}
|
||||
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!1101 &4239922128183662101
|
||||
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: -7806160175022390470}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.8863636
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &6982170299964900261
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
@@ -241,6 +292,33 @@ AnimatorState:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &7236297632769904969
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ThrowHammer
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 4239922128183662101}
|
||||
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: a0447cbe7f357b24f9a7801fc6a16453, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &7718566636244291230
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 21e3ad5e4b3e88642b6d822dc8a0b317
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4bb5352bf6007349a0c3136cc4404b6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+25951
-3
File diff suppressed because it is too large
Load Diff
+208
-129
@@ -3764,7 +3764,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1923000537}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.9320464, y: 1.169395, z: 3.7507777}
|
||||
m_LocalPosition: {x: 0.9320464, y: 1.169395, z: 5}
|
||||
m_LocalScale: {x: 2, y: 2, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -3855,7 +3855,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2034197305}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 5.01, y: -0.28, z: 0}
|
||||
m_LocalPosition: {x: 5.01, y: -0.28, z: 2}
|
||||
m_LocalScale: {x: 4.6356883, y: 4.68697, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -4249,6 +4249,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 593888134675041391}
|
||||
- component: {fileID: 593888134675041392}
|
||||
- component: {fileID: 593888134675041393}
|
||||
m_Layer: 0
|
||||
m_Name: Dwarf
|
||||
m_TagString: Untagged
|
||||
@@ -4390,7 +4391,7 @@ Transform:
|
||||
m_GameObject: {fileID: 249451357978777301}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0.8480481, z: 0, w: 0.5299193}
|
||||
m_LocalPosition: {x: 0, y: -0.537, z: -1}
|
||||
m_LocalPosition: {x: 0, y: -0.537, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@@ -4420,6 +4421,23 @@ Animator:
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!114 &593888134675041393
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 249451357978777301}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59cb4a98d6866124793e8758b2ec958a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::HammerThrower
|
||||
_spawnPoint: {fileID: 1586111131116016716}
|
||||
hammerInHand: {fileID: 6823722725711890662}
|
||||
_throwSpeed: 5
|
||||
_throwCooldown: 1.5
|
||||
_playerCollider: {fileID: 8117888831474612991}
|
||||
--- !u!4 &766659779101801451
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4438,22 +4456,6 @@ Transform:
|
||||
- {fileID: 7893683967731061273}
|
||||
m_Father: {fileID: 2240819492353051520}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &878132877757975067
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6104749267994584073}
|
||||
m_Layer: 7
|
||||
m_Name: HammerSpawnPoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &934032392481278156
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4501,6 +4503,21 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1273836225606385487
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6823722725711890662}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.3607041, y: 0.19431941, z: 0.060498074, w: 0.91020465}
|
||||
m_LocalPosition: {x: -0.049, y: 0.109, z: -0.062}
|
||||
m_LocalScale: {x: 100, y: 100, z: 100}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1586111131116016716}
|
||||
m_LocalEulerAnglesHint: {x: -42.855, y: 25.024, z: -2.349}
|
||||
--- !u!4 &1475320551908104862
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4530,7 +4547,7 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1626757939958625943}
|
||||
- {fileID: 1273836225606385487}
|
||||
- {fileID: 9120364082674576674}
|
||||
- {fileID: 8830787380966555514}
|
||||
m_Father: {fileID: 3180682117419703852}
|
||||
@@ -4551,21 +4568,6 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1626757939958625943
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2345031526428594651}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.3607041, y: 0.19431941, z: 0.060498074, w: 0.91020465}
|
||||
m_LocalPosition: {x: -0.049, y: 0.109, z: -0.062}
|
||||
m_LocalScale: {x: 100, y: 100, z: 100}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1586111131116016716}
|
||||
m_LocalEulerAnglesHint: {x: -42.855, y: 25.024, z: -2.349}
|
||||
--- !u!1 &1877504680528807743
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4646,32 +4648,6 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &2345031526428594651
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1626757939958625943}
|
||||
- component: {fileID: 2429415202642361336}
|
||||
- component: {fileID: 7398538190024008576}
|
||||
m_Layer: 0
|
||||
m_Name: Hammer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!33 &2429415202642361336
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2345031526428594651}
|
||||
m_Mesh: {fileID: 8164388750953057965, guid: 511d37df67c6c014a99a7db09f58e195, type: 3}
|
||||
--- !u!114 &2434832672896571937
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5283,21 +5259,6 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6104749267994584073
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 878132877757975067}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.068, y: -0.141, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7687862676731468201}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &6164081771643141703
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5363,6 +5324,14 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!33 &6634541637282179933
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6823722725711890662}
|
||||
m_Mesh: {fileID: 4300000, guid: 686fb217598c1d841999ac35a72d1275, type: 2}
|
||||
--- !u!4 &6697672531457651841
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5395,6 +5364,27 @@ Transform:
|
||||
- {fileID: 8577166843976751618}
|
||||
m_Father: {fileID: 6186581214704809878}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6823722725711890662
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1273836225606385487}
|
||||
- component: {fileID: 6634541637282179933}
|
||||
- component: {fileID: 8829349425300725802}
|
||||
- component: {fileID: 8829349425300725803}
|
||||
- component: {fileID: 8829349425300725805}
|
||||
- component: {fileID: 8829349425300725804}
|
||||
m_Layer: 0
|
||||
m_Name: Hammer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6911613208742082748
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5489,55 +5479,6 @@ Transform:
|
||||
- {fileID: 7613422198643176895}
|
||||
m_Father: {fileID: 2143880938197688424}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &7398538190024008576
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2345031526428594651}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 64871922876699705, guid: 511d37df67c6c014a99a7db09f58e195, type: 3}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &7488176126360314821
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5632,7 +5573,6 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 593888134675041391}
|
||||
- {fileID: 6104749267994584073}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &7821048192973000025
|
||||
@@ -5727,7 +5667,7 @@ MonoBehaviour:
|
||||
_mapLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 8
|
||||
_modelPrefab: {fileID: 0}
|
||||
_hammerThrower: {fileID: 593888134675041393}
|
||||
--- !u!114 &8117888831474612989
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5752,10 +5692,11 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 59cb4a98d6866124793e8758b2ec958a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::HammerThrower
|
||||
_spawnPoint: {fileID: 6104749267994584073}
|
||||
_hammerPrefab: {fileID: 6648495433791226095, guid: 111653ffd63dcc64a91ceb9c5d52aa04, type: 3}
|
||||
_spawnPoint: {fileID: 0}
|
||||
hammerInHand: {fileID: 0}
|
||||
_throwSpeed: 5
|
||||
_throwCooldown: 1.5
|
||||
_playerCollider: {fileID: 0}
|
||||
--- !u!70 &8117888831474612991
|
||||
CapsuleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5904,6 +5845,144 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!23 &8829349425300725802
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6823722725711890662}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 2e85dee7d03fc8544946d2629f3b028c, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!61 &8829349425300725803
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6823722725711890662}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0.00003917386, y: -0.0008624221}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 0.0014507164, y: 0.003984518}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!50 &8829349425300725804
|
||||
Rigidbody2D:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6823722725711890662}
|
||||
m_BodyType: 0
|
||||
m_Simulated: 0
|
||||
m_UseFullKinematicContacts: 0
|
||||
m_UseAutoMass: 0
|
||||
m_Mass: 1
|
||||
m_LinearDamping: 0
|
||||
m_AngularDamping: 0.05
|
||||
m_GravityScale: 0
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_Interpolate: 0
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 0
|
||||
m_Constraints: 0
|
||||
--- !u!114 &8829349425300725805
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6823722725711890662}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a389cb21d7bb9ce4391feffae499272f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Hammer
|
||||
_lifespan: 5
|
||||
_stunDuration: 1
|
||||
_impactNoiseRadius: 10
|
||||
_emitNoiseOnImpact: 1
|
||||
--- !u!4 &8830787380966555514
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -7,11 +7,14 @@ public class Hammer : MonoBehaviour
|
||||
[SerializeField] private float _impactNoiseRadius = 10f;
|
||||
[SerializeField] private bool _emitNoiseOnImpact = true;
|
||||
|
||||
public event System.Action OnReturnedToHand;
|
||||
|
||||
private float _lifeTimer;
|
||||
private Vector2 _velocity;
|
||||
private bool _facingRight;
|
||||
private Rigidbody2D _rigidbody;
|
||||
private bool _hasCollided = false;
|
||||
private bool _isThrown = false;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -23,10 +26,12 @@ public class Hammer : MonoBehaviour
|
||||
{
|
||||
_facingRight = facingRight;
|
||||
_velocity = new Vector2(facingRight ? speed : -speed, 0);
|
||||
|
||||
_isThrown = true;
|
||||
|
||||
if (_rigidbody != null)
|
||||
{
|
||||
_rigidbody.linearVelocity = _velocity;
|
||||
_rigidbody.angularVelocity = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +58,7 @@ public class Hammer : MonoBehaviour
|
||||
{
|
||||
HandleEnemyCollision(enemy, collision.relativeVelocity);
|
||||
EmitImpactNoise(collision.GetContact(0).point);
|
||||
Destroy(gameObject);
|
||||
ReturnToHand();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,13 +68,13 @@ public class Hammer : MonoBehaviour
|
||||
{
|
||||
mapElement.Hit();
|
||||
EmitImpactNoise(collision.GetContact(0).point);
|
||||
Destroy(gameObject);
|
||||
ReturnToHand();
|
||||
return;
|
||||
}
|
||||
|
||||
// Fallback: destroy on any collision
|
||||
// Fallback: return hammer on any collision
|
||||
EmitImpactNoise(collision.GetContact(0).point);
|
||||
Destroy(gameObject);
|
||||
ReturnToHand();
|
||||
}
|
||||
|
||||
private void HandleEnemyCollision(Character enemy, Vector2 impactVelocity)
|
||||
@@ -94,4 +99,13 @@ public class Hammer : MonoBehaviour
|
||||
noiseSystem.Emit(position, _impactNoiseRadius);
|
||||
}
|
||||
}
|
||||
|
||||
private void ReturnToHand()
|
||||
{
|
||||
_isThrown = false;
|
||||
if (OnReturnedToHand != null)
|
||||
{
|
||||
OnReturnedToHand.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
|
||||
public class PlayerController : Character
|
||||
{
|
||||
[SerializeField] GameObject _modelPrefab;
|
||||
[SerializeField] private HammerThrower _hammerThrower;
|
||||
private GameObject _hammer;
|
||||
|
||||
private bool _isHoldingHammer = true;
|
||||
@@ -12,14 +12,13 @@ public class PlayerController : Character
|
||||
|
||||
private InputManager _inputManager;
|
||||
private PlayerState _playerState;
|
||||
private HammerThrower _hammerThrower;
|
||||
|
||||
private Vector2 _currentMovement;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_inputManager = GetComponent<InputManager>();
|
||||
_playerState = GetComponent<PlayerState>();
|
||||
_hammerThrower = GetComponent<HammerThrower>();
|
||||
|
||||
_inputManager.OnFire += OnFireButtonPressed;
|
||||
_inputManager.OnMovementChanged += OnMovementChanged;
|
||||
@@ -53,7 +52,6 @@ public class PlayerController : Character
|
||||
}
|
||||
|
||||
MoveTo(_currentMovement.x, isAllowVertical ? _currentMovement.y : 0);
|
||||
_hammerThrower.SetFacingDirection(_facingRight);
|
||||
}
|
||||
|
||||
private void OnMovementChanged(Vector2 movement)
|
||||
@@ -73,12 +71,9 @@ public class PlayerController : Character
|
||||
public void ThrowHammerObject()
|
||||
{
|
||||
_hammerThrower.TryThrowHammer();
|
||||
UpdatePlayerSprite();
|
||||
}
|
||||
|
||||
private void UpdatePlayerSprite()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void SetWalkingAnimation(bool isWalking)
|
||||
{
|
||||
_animator.SetBool("Legs_Walk", isWalking);
|
||||
@@ -87,10 +82,6 @@ public class PlayerController : Character
|
||||
|
||||
protected override void SetClimbingAnimation(bool isClimbing)
|
||||
{
|
||||
if (isClimbing)
|
||||
{
|
||||
|
||||
}
|
||||
_animator.SetBool("Climb", isClimbing);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@ using UnityEngine;
|
||||
public class HammerThrower : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Transform _spawnPoint;
|
||||
[SerializeField] private GameObject _hammerPrefab;
|
||||
|
||||
[SerializeField] private GameObject hammerInHand;
|
||||
[SerializeField] private float _throwSpeed = 5f;
|
||||
[SerializeField] private float _throwCooldown = 1.5f;
|
||||
|
||||
[SerializeField] private Collider2D _playerCollider;
|
||||
private GameObject _currentHammer;
|
||||
private bool _hasHammer = true;
|
||||
private bool _facingRight = true;
|
||||
private float _cooldownTimer = 0f;
|
||||
private Collider2D _playerCollider;
|
||||
|
||||
public bool HasHammer => _hasHammer;
|
||||
public bool CanThrow => _hasHammer && _cooldownTimer <= 0f;
|
||||
@@ -20,7 +20,7 @@ public class HammerThrower : MonoBehaviour
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_playerCollider = GetComponent<Collider2D>() ?? GetComponentInChildren<Collider2D>();
|
||||
_currentHammer = hammerInHand;
|
||||
}
|
||||
|
||||
public void SetFacingDirection(bool facingRight)
|
||||
@@ -39,10 +39,22 @@ public class HammerThrower : MonoBehaviour
|
||||
|
||||
private void ThrowHammer()
|
||||
{
|
||||
if (hammerInHand == null || _spawnPoint == null)
|
||||
return;
|
||||
|
||||
_currentHammer = hammerInHand;
|
||||
_currentHammer.transform.SetParent(null);
|
||||
_currentHammer.transform.position = _spawnPoint.position;
|
||||
_currentHammer.transform.rotation = _spawnPoint.rotation;
|
||||
_hasHammer = false;
|
||||
_cooldownTimer = _throwCooldown;
|
||||
|
||||
_currentHammer = Instantiate(_hammerPrefab, _spawnPoint.position, _spawnPoint.rotation);
|
||||
var hammer = _currentHammer.GetComponent<Hammer>();
|
||||
if (hammer != null)
|
||||
{
|
||||
hammer.OnReturnedToHand += ReturnHammerToHand;
|
||||
hammer.Initialize(_facingRight, _throwSpeed);
|
||||
}
|
||||
|
||||
if (_playerCollider != null)
|
||||
{
|
||||
@@ -52,33 +64,39 @@ public class HammerThrower : MonoBehaviour
|
||||
Physics2D.IgnoreCollision(_playerCollider, hammerCollider);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize hammer with direction and speed
|
||||
var hammerComponent = _currentHammer.GetComponent<Hammer>();
|
||||
if (hammerComponent != null)
|
||||
{
|
||||
hammerComponent.Initialize(_facingRight, _throwSpeed);
|
||||
}
|
||||
|
||||
// Flip hammer visual based on direction
|
||||
_currentHammer.transform.localScale = new Vector2(
|
||||
_currentHammer.transform.localScale.x * (_facingRight ? 1 : -1),
|
||||
_currentHammer.transform.localScale.y
|
||||
);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// Update cooldown timer
|
||||
if (_cooldownTimer > 0f)
|
||||
{
|
||||
_cooldownTimer -= Time.deltaTime;
|
||||
}
|
||||
}
|
||||
|
||||
// Hammer destroyed → hammer returned
|
||||
if (!_hasHammer && _currentHammer == null)
|
||||
private void ReturnHammerToHand()
|
||||
{
|
||||
if (_currentHammer == null || _spawnPoint == null)
|
||||
return;
|
||||
|
||||
_currentHammer.transform.SetParent(_spawnPoint);
|
||||
_currentHammer.transform.localPosition = Vector3.zero;
|
||||
_currentHammer.transform.localRotation = Quaternion.identity;
|
||||
|
||||
var rb = _currentHammer.GetComponent<Rigidbody2D>();
|
||||
if (rb != null)
|
||||
{
|
||||
_hasHammer = true;
|
||||
rb.linearVelocity = Vector2.zero;
|
||||
rb.angularVelocity = 0f;
|
||||
}
|
||||
|
||||
var hammer = _currentHammer.GetComponent<Hammer>();
|
||||
if (hammer != null)
|
||||
{
|
||||
hammer.OnReturnedToHand -= ReturnHammerToHand;
|
||||
}
|
||||
|
||||
_hasHammer = true;
|
||||
_cooldownTimer = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3fc499926f6089489a035f09c9f8666
|
||||
guid: 4e255e0eec9b1c445825b531c930b597
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a009b84c540a254887d7c21dad0e8ea
|
||||
NativeFormatImporter:
|
||||
guid: 3bbc118db80e4c440bf0dafa79a9f913
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user