WhackAMole hammer
This commit is contained in:
parent
cfb9132a80
commit
4cf5ae9b07
117
Assets/GameWiseAssets/WhackAMole/HammerAxis.prefab
Normal file
117
Assets/GameWiseAssets/WhackAMole/HammerAxis.prefab
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1296158462894679004
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1596907418037506269}
|
||||||
|
- component: {fileID: 707013035376863418}
|
||||||
|
- component: {fileID: 5014308191771467756}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: SM_Blueberry_Hammer_Big
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1596907418037506269
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1296158462894679004}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0.000000014901159, z: -0.0000000074505797, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4599042881912657866}
|
||||||
|
m_LocalEulerAnglesHint: {x: 22.322, y: 0, z: 0}
|
||||||
|
--- !u!33 &707013035376863418
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1296158462894679004}
|
||||||
|
m_Mesh: {fileID: 8221784253231188533, guid: c8ae1c00d6d0e144aaa7deb4b0f42213, type: 3}
|
||||||
|
--- !u!23 &5014308191771467756
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1296158462894679004}
|
||||||
|
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_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31388ddf377392b4c91836352c2954a0, 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_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!1 &6058684453237696602
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4599042881912657866}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: HammerAxis
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4599042881912657866
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6058684453237696602}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0.9659258, y: 0, z: 0, w: 0.2588191}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.2220878, y: 0.2220878, z: 0.2220878}
|
||||||
|
m_ConstrainProportionsScale: 1
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 1596907418037506269}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: -150, y: 0, z: 0}
|
7
Assets/GameWiseAssets/WhackAMole/HammerAxis.prefab.meta
Normal file
7
Assets/GameWiseAssets/WhackAMole/HammerAxis.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5285f9e8c3fff984a9b632160a6b123f
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
149
Assets/GameWiseAssets/WhackAMole/HammerParent.prefab
Normal file
149
Assets/GameWiseAssets/WhackAMole/HammerParent.prefab
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &2301759736773346279
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 497938025233807398}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: HammerParent
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &497938025233807398
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2301759736773346279}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.56645715, y: -0.16131559, z: 0.11421778, w: 0.8000362}
|
||||||
|
m_LocalPosition: {x: 7.957705, y: 10.639193, z: -5.354536}
|
||||||
|
m_LocalScale: {x: 0.34831277, y: 0.3483129, z: 0.34831297}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 6694869472487427747}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 70.6, y: -22.8, z: 0}
|
||||||
|
--- !u!1 &8148084552461412064
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 9087776334262059099}
|
||||||
|
- component: {fileID: 2766679952911970952}
|
||||||
|
- component: {fileID: 3797137951851240588}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: SM_Blueberry_Hammer_Big
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &9087776334262059099
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8148084552461412064}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0.000000014901159, z: -0.0000000074505797, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6694869472487427747}
|
||||||
|
m_LocalEulerAnglesHint: {x: 22.322, y: 0, z: 0}
|
||||||
|
--- !u!33 &2766679952911970952
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8148084552461412064}
|
||||||
|
m_Mesh: {fileID: 8221784253231188533, guid: c8ae1c00d6d0e144aaa7deb4b0f42213, type: 3}
|
||||||
|
--- !u!23 &3797137951851240588
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8148084552461412064}
|
||||||
|
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_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31388ddf377392b4c91836352c2954a0, 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_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!1 &9128603059791910679
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6694869472487427747}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: HammerAxis
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &6694869472487427747
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9128603059791910679}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0.9659258, y: 0, z: 0, w: 0.2588191}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 9087776334262059099}
|
||||||
|
m_Father: {fileID: 497938025233807398}
|
||||||
|
m_LocalEulerAnglesHint: {x: -150, y: 0, z: 0}
|
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 634d17e99cddec04fa18e8ecd9dc276e
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -754,6 +754,37 @@ MeshFilter:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 433084919}
|
m_GameObject: {fileID: 433084919}
|
||||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!1 &435493188
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 435493189}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: MoleHammerParent
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &435493189
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 435493188}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.5664571, y: -0.16131553, z: 0.11421775, w: 0.8000362}
|
||||||
|
m_LocalPosition: {x: 6.0914297, y: 10.731937, z: -4.1283693}
|
||||||
|
m_LocalScale: {x: 0.38591117, y: 0.38591132, z: 0.3859116}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 70.6, y: -22.8, z: 0}
|
||||||
--- !u!1 &436760723
|
--- !u!1 &436760723
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1112,7 +1143,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 83.1, y: 0}
|
m_AnchoredPosition: {x: 83.1001, y: 0}
|
||||||
m_SizeDelta: {x: 303.0776, y: 50}
|
m_SizeDelta: {x: 303.0776, y: 50}
|
||||||
m_Pivot: {x: 0, y: 0}
|
m_Pivot: {x: 0, y: 0}
|
||||||
--- !u!114 &669246235
|
--- !u!114 &669246235
|
||||||
@ -1535,6 +1566,37 @@ MeshFilter:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 818928740}
|
m_GameObject: {fileID: 818928740}
|
||||||
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
|
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!1 &939769532
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 939769533}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: MoleHammerParent
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &939769533
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 939769532}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.5664571, y: -0.16131553, z: 0.114217736, w: 0.8000363}
|
||||||
|
m_LocalPosition: {x: 7.9577055, y: 10.639193, z: -5.3545375}
|
||||||
|
m_LocalScale: {x: 0.34831277, y: 0.3483129, z: 0.3483133}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 70.6, y: -22.8, z: 0}
|
||||||
--- !u!1 &963194225
|
--- !u!1 &963194225
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -2330,6 +2392,37 @@ MeshFilter:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1632104297}
|
m_GameObject: {fileID: 1632104297}
|
||||||
m_Mesh: {fileID: -8486766878488114889, guid: 8282b57657c1c6249ac2bb3c0f3f0f7e, type: 3}
|
m_Mesh: {fileID: -8486766878488114889, guid: 8282b57657c1c6249ac2bb3c0f3f0f7e, type: 3}
|
||||||
|
--- !u!1 &1719834072
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1719834073}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: MoleHammerParent
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1719834073
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1719834072}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.5664571, y: -0.16131553, z: 0.11421775, w: 0.8000362}
|
||||||
|
m_LocalPosition: {x: 8.407705, y: 10.639193, z: -3.1645374}
|
||||||
|
m_LocalScale: {x: 0.3483128, y: 0.34831294, z: 0.3483132}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 70.6, y: -22.8, z: 0}
|
||||||
--- !u!1 &1724566850
|
--- !u!1 &1724566850
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -3601,6 +3694,11 @@ MonoBehaviour:
|
|||||||
gameDuration: 30
|
gameDuration: 30
|
||||||
scoreText: {fileID: 669246235}
|
scoreText: {fileID: 669246235}
|
||||||
timerText: {fileID: 1838848884}
|
timerText: {fileID: 1838848884}
|
||||||
|
hammerPrefab: {fileID: 6058684453237696602, guid: 5285f9e8c3fff984a9b632160a6b123f, type: 3}
|
||||||
|
moleHammerPositions:
|
||||||
|
- {fileID: 435493189}
|
||||||
|
- {fileID: 1719834073}
|
||||||
|
- {fileID: 939769533}
|
||||||
--- !u!4 &1943679469
|
--- !u!4 &1943679469
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -3865,6 +3963,21 @@ MeshFilter:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 2071497026}
|
m_GameObject: {fileID: 2071497026}
|
||||||
m_Mesh: {fileID: -207887738857377605, guid: e34ab2337b0716f41ba6cd304eae19fe, type: 3}
|
m_Mesh: {fileID: -207887738857377605, guid: e34ab2337b0716f41ba6cd304eae19fe, type: 3}
|
||||||
|
--- !u!4 &497938024760218994
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2301759737289141939}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.25693586, y: 0.7310241, z: -0.5175938, w: 0.36288357}
|
||||||
|
m_LocalPosition: {x: 1.371562, y: 15.855909, z: -3.8356214}
|
||||||
|
m_LocalScale: {x: 0.22208777, y: 0.22208783, z: 0.2220879}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 70.6, y: -22.8, z: 0}
|
||||||
--- !u!1 &749492132578731000
|
--- !u!1 &749492132578731000
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -4088,6 +4201,22 @@ MonoBehaviour:
|
|||||||
m_numOctaves: 3
|
m_numOctaves: 3
|
||||||
m_octaveOffsetFactor: 0.5
|
m_octaveOffsetFactor: 0.5
|
||||||
m_lockPosition: 0
|
m_lockPosition: 0
|
||||||
|
--- !u!1 &2301759737289141939
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 497938024760218994}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: HammerParent
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
--- !u!135 &2451226347263057802
|
--- !u!135 &2451226347263057802
|
||||||
SphereCollider:
|
SphereCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -4738,3 +4867,7 @@ SceneRoots:
|
|||||||
- {fileID: 1724566852}
|
- {fileID: 1724566852}
|
||||||
- {fileID: 1867286920}
|
- {fileID: 1867286920}
|
||||||
- {fileID: 656961567}
|
- {fileID: 656961567}
|
||||||
|
- {fileID: 497938024760218994}
|
||||||
|
- {fileID: 435493189}
|
||||||
|
- {fileID: 1719834073}
|
||||||
|
- {fileID: 939769533}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
public class Mole : MonoBehaviour
|
public class Mole : MonoBehaviour
|
||||||
{
|
{
|
||||||
public float visibleDuration = 1.0f;
|
public float visibleDuration = 1.0f;
|
||||||
public float moveSpeed = 5f;
|
public float moveSpeed = 5f;
|
||||||
|
|
||||||
private Vector3 hiddenPosition;
|
private Vector3 hiddenPosition;
|
||||||
private Vector3 visiblePosition;
|
private Vector3 visiblePosition;
|
||||||
private bool isVisible = false;
|
private bool isVisible = false;
|
||||||
@ -24,18 +24,38 @@ public class Mole : MonoBehaviour
|
|||||||
public void Show()
|
public void Show()
|
||||||
{
|
{
|
||||||
if (!isMoving)
|
if (!isMoving)
|
||||||
|
{
|
||||||
StartCoroutine(MoveTo(visiblePosition, () =>
|
StartCoroutine(MoveTo(visiblePosition, () =>
|
||||||
{
|
{
|
||||||
isVisible = true;
|
isVisible = true;
|
||||||
Invoke(nameof(Hide), visibleDuration);
|
Invoke(nameof(Hide), visibleDuration);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Hide()
|
public void Hide()
|
||||||
{
|
{
|
||||||
if (!isMoving)
|
if (!isMoving)
|
||||||
|
{
|
||||||
StartCoroutine(MoveTo(hiddenPosition, () => isVisible = false));
|
StartCoroutine(MoveTo(hiddenPosition, () => isVisible = false));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsVisible()
|
||||||
|
{
|
||||||
|
return isVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReactToHit()
|
||||||
|
{
|
||||||
|
if (isVisible)
|
||||||
|
{
|
||||||
|
gameManager.AddScore(1);
|
||||||
|
StartCoroutine(HitReaction());
|
||||||
|
Hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private IEnumerator HitReaction()
|
private IEnumerator HitReaction()
|
||||||
{
|
{
|
||||||
Vector3 originalScale = transform.localScale;
|
Vector3 originalScale = transform.localScale;
|
||||||
@ -46,6 +66,7 @@ public class Mole : MonoBehaviour
|
|||||||
|
|
||||||
transform.localScale = originalScale;
|
transform.localScale = originalScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator MoveTo(Vector3 targetPos, System.Action onComplete)
|
private IEnumerator MoveTo(Vector3 targetPos, System.Action onComplete)
|
||||||
{
|
{
|
||||||
isMoving = true;
|
isMoving = true;
|
||||||
@ -73,16 +94,6 @@ public class Mole : MonoBehaviour
|
|||||||
isVisible = false;
|
isVisible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMouseDown()
|
|
||||||
{
|
|
||||||
if (isVisible)
|
|
||||||
{
|
|
||||||
gameManager.AddScore(1);
|
|
||||||
StartCoroutine(HitReaction());
|
|
||||||
Hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bounce easing function (EaseOutBounce)
|
// Bounce easing function (EaseOutBounce)
|
||||||
private float EaseOutBounce(float x)
|
private float EaseOutBounce(float x)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
|
using DG.Tweening;
|
||||||
|
|
||||||
public class WhackAMoleGameManager : MonoBehaviour
|
public class WhackAMoleGameManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public Mole[] moles;
|
public Mole[] moles;
|
||||||
@ -9,11 +11,17 @@ public class WhackAMoleGameManager : MonoBehaviour
|
|||||||
public TextMeshProUGUI scoreText;
|
public TextMeshProUGUI scoreText;
|
||||||
public TextMeshProUGUI timerText;
|
public TextMeshProUGUI timerText;
|
||||||
|
|
||||||
|
public GameObject hammerPrefab;
|
||||||
|
public Transform[] moleHammerPositions;
|
||||||
|
|
||||||
private int score = 0;
|
private int score = 0;
|
||||||
private float timeLeft;
|
private float timeLeft;
|
||||||
|
|
||||||
|
private Camera mainCamera;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
mainCamera = Camera.main;
|
||||||
timeLeft = gameDuration;
|
timeLeft = gameDuration;
|
||||||
InvokeRepeating(nameof(SpawnMole), 1f, spawnInterval);
|
InvokeRepeating(nameof(SpawnMole), 1f, spawnInterval);
|
||||||
}
|
}
|
||||||
@ -21,12 +29,33 @@ public class WhackAMoleGameManager : MonoBehaviour
|
|||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
timeLeft -= Time.deltaTime;
|
timeLeft -= Time.deltaTime;
|
||||||
timerText.text = "Time: " + Mathf.CeilToInt(timeLeft);
|
timerText.text = "Time: " + Mathf.CeilToInt(Mathf.Max(timeLeft, 0f));
|
||||||
|
|
||||||
if (timeLeft <= 0f)
|
if (timeLeft <= 0f)
|
||||||
{
|
{
|
||||||
CancelInvoke(nameof(SpawnMole));
|
CancelInvoke(nameof(SpawnMole));
|
||||||
timerText.text = "Time: 0";
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for click
|
||||||
|
if (Input.GetMouseButtonDown(0))
|
||||||
|
{
|
||||||
|
Ray ray = mainCamera.ScreenPointToRay(Input.mousePosition);
|
||||||
|
RaycastHit hit;
|
||||||
|
if (Physics.Raycast(ray, out hit))
|
||||||
|
{
|
||||||
|
Mole mole = hit.collider.GetComponent<Mole>();
|
||||||
|
if (mole != null && mole.IsVisible())
|
||||||
|
{
|
||||||
|
mole.ReactToHit();
|
||||||
|
int moleIndex = System.Array.IndexOf(moles, mole);
|
||||||
|
InstantiateHammerAtMole(moleIndex);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
InstantiateHammerAtClick(hit.point);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,4 +72,34 @@ public class WhackAMoleGameManager : MonoBehaviour
|
|||||||
score += points;
|
score += points;
|
||||||
scoreText.text = "Score: " + score;
|
scoreText.text = "Score: " + score;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InstantiateHammerAtMole(int index)
|
||||||
|
{
|
||||||
|
if (index < 0 || index >= moleHammerPositions.Length) return;
|
||||||
|
|
||||||
|
Transform hammerPos = moleHammerPositions[index];
|
||||||
|
GameObject hammer = Instantiate(hammerPrefab, hammerPos.position, hammerPos.rotation);
|
||||||
|
AnimateHammerMesh(hammer);
|
||||||
|
}
|
||||||
|
void InstantiateHammerAtClick(Vector3 position)
|
||||||
|
{
|
||||||
|
Quaternion referenceRotation = moleHammerPositions[0].rotation;
|
||||||
|
|
||||||
|
// Calculate lifted position using the reference's up direction
|
||||||
|
Vector3 liftedPosition = position + referenceRotation * Vector3.up * 0.5f;
|
||||||
|
|
||||||
|
GameObject hammer = Instantiate(hammerPrefab, liftedPosition, referenceRotation);
|
||||||
|
AnimateHammerMesh(hammer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AnimateHammerMesh(GameObject hammer)
|
||||||
|
{
|
||||||
|
Transform meshHammer = hammer.transform.GetChild(0); // assumes first child is the mesh
|
||||||
|
meshHammer.localEulerAngles = new Vector3(-150f, 0f, 0f);
|
||||||
|
meshHammer.DOLocalRotate(Vector3.zero, 0.2f).SetEase(Ease.OutBack);
|
||||||
|
|
||||||
|
// Optional: Destroy hammer after animation
|
||||||
|
Destroy(hammer, 0.5f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user