From 7a64f890c5f6d031c76f62fd75a93da5a3d11245 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Tue, 18 May 2021 17:40:00 +0100 Subject: [PATCH] add time hat --- .../ArtefactObjects/Power/PA_Freeze.asset | 2 +- game/Assets/Data/Events/Found Freeze.asset | 15 + .../Data/Events/Found Freeze.asset.meta | 8 + .../Materials/Simple/Simple Transparent.mat | 34 +- game/Assets/Prefabs/Character/Time Hat.prefab | 304 ++++++++++++++++++ .../Prefabs/Character/Time Hat.prefab.meta | 7 + game/Assets/Prefabs/Player.prefab | 120 ++++++- game/Assets/Scripts/Character/TimeHat.cs | 44 +++ game/Assets/Scripts/Character/TimeHat.cs.meta | 11 + 9 files changed, 514 insertions(+), 31 deletions(-) create mode 100644 game/Assets/Data/Events/Found Freeze.asset create mode 100644 game/Assets/Data/Events/Found Freeze.asset.meta create mode 100644 game/Assets/Prefabs/Character/Time Hat.prefab create mode 100644 game/Assets/Prefabs/Character/Time Hat.prefab.meta create mode 100644 game/Assets/Scripts/Character/TimeHat.cs create mode 100644 game/Assets/Scripts/Character/TimeHat.cs.meta diff --git a/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Freeze.asset b/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Freeze.asset index 43a4469..fe2dbb4 100644 --- a/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Freeze.asset +++ b/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Freeze.asset @@ -17,5 +17,5 @@ MonoBehaviour: _descriptionKey: DESC_FREEZE _name: Freeze _prefab: {fileID: 3799998566341120319, guid: 321b94f09a638c448a2044ad0fa292f1, type: 3} - _onFound: {fileID: 0} + _onFound: {fileID: 11400000, guid: 5624ba2a0409d8245b485dc3f4d8b807, type: 2} _power: {fileID: 11400000, guid: 0cd9cf6494bb6f54d9b97631010d780e, type: 2} diff --git a/game/Assets/Data/Events/Found Freeze.asset b/game/Assets/Data/Events/Found Freeze.asset new file mode 100644 index 0000000..b3582b1 --- /dev/null +++ b/game/Assets/Data/Events/Found Freeze.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a977303773797047b37664649362484, type: 3} + m_Name: Found Freeze + m_EditorClassIdentifier: + _logRaised: 0 diff --git a/game/Assets/Data/Events/Found Freeze.asset.meta b/game/Assets/Data/Events/Found Freeze.asset.meta new file mode 100644 index 0000000..fae6742 --- /dev/null +++ b/game/Assets/Data/Events/Found Freeze.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5624ba2a0409d8245b485dc3f4d8b807 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Materials/Simple/Simple Transparent.mat b/game/Assets/Materials/Simple/Simple Transparent.mat index 5963d98..37cfefd 100644 --- a/game/Assets/Materials/Simple/Simple Transparent.mat +++ b/game/Assets/Materials/Simple/Simple Transparent.mat @@ -8,14 +8,16 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Simple Transparent - m_Shader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: + m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3} + m_ShaderKeywords: _ALPHATEST_ON m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + disabledShaderPasses: + - SHADOWCASTER m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -24,7 +26,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _BumpMap: - m_Texture: {fileID: 2800000, guid: fab85e0cacda9644a99e5182a86b71f5, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailAlbedoMap: @@ -44,7 +46,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 2800000, guid: 56a34508c5d13bc41945c6961739dcc4, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: @@ -76,19 +78,20 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - - _AlphaClip: 0 + - _AlphaClip: 1 - _Blend: 0 - _BumpScale: 1 - _ClearCoatMask: 0 - _ClearCoatSmoothness: 0 - _Cull: 2 - - _Cutoff: 0.5 + - _Cutoff: 0 - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - - _DstBlend: 0 + - _DstBlend: 10 - _EnvironmentReflections: 1 - _GlossMapScale: 0 - _Glossiness: 0 + - _GlossinessSource: 0 - _GlossyReflections: 0 - _Metallic: 0 - _OcclusionStrength: 1 @@ -96,15 +99,18 @@ Material: - _QueueOffset: 0 - _ReceiveShadows: 1 - _SampleGI: 0 + - _Shininess: 0 - _Smoothness: 1 + - _SmoothnessSource: 0 - _SmoothnessTextureChannel: 1 + - _SpecSource: 0 - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _Surface: 0 + - _SrcBlend: 5 + - _Surface: 1 - _WorkflowMode: 1 - - _ZWrite: 1 + - _ZWrite: 0 m_Colors: - - _BaseColor: {r: 0.9716981, g: 0.8034816, b: 0.28875935, a: 1} + - _BaseColor: {r: 1, g: 1, b: 1, a: 0} - _Color: {r: 1, g: 0.8987622, b: 0.19215685, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/game/Assets/Prefabs/Character/Time Hat.prefab b/game/Assets/Prefabs/Character/Time Hat.prefab new file mode 100644 index 0000000..73ed1ee --- /dev/null +++ b/game/Assets/Prefabs/Character/Time Hat.prefab @@ -0,0 +1,304 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!95 &5228246278496071712 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6964855357421070179} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: cb11e96596a26454ebfacc4d64d7fc68, 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 &7430955781813958996 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4102077886778076298} + - component: {fileID: 161271564574031698} + - component: {fileID: 7610159371063739632} + - component: {fileID: 5955468169986969314} + m_Layer: 7 + m_Name: Time Hat + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4102077886778076298 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7430955781813958996} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 9024041447285529929} + - {fileID: 7774325281593982425} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &161271564574031698 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7430955781813958996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2948b341d27a8504398f082f85df758b, type: 3} + m_Name: + m_EditorClassIdentifier: + _freezeDuration: {fileID: 11400000, guid: 19273ba4ac237ab4381926cfb195dda8, type: 2} + _orbGraphics: {fileID: 7774325281593982425} + _animDuration: 0.3 +--- !u!114 &7610159371063739632 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7430955781813958996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0a5de09a27d949d4db67034f55c57e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + _event: {fileID: 11400000, guid: 6e31084a96bb93a44a85563a6208d0da, type: 2} + _response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 161271564574031698} + m_TargetAssemblyTypeName: UnityEngine.MonoBehaviour, UnityEngine + m_MethodName: CancelInvoke + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &5955468169986969314 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7430955781813958996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0a5de09a27d949d4db67034f55c57e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + _event: {fileID: 11400000, guid: 59d69c62286018b4ca2d89fa75d4c68a, type: 2} + _response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 161271564574031698} + m_TargetAssemblyTypeName: TimeHat, Assembly-CSharp + m_MethodName: Trigger + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1001 &7811857329737046578 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4102077886778076298} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalScale.x + value: 0.6985896 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalScale.y + value: 0.6985896 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalScale.z + value: 0.6985896 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalPosition.x + value: -0.002 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalPosition.y + value: 0.105 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalPosition.z + value: 0.021 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -5117141298263055781, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: bf03fd6edc7ad60479bd07675e34fc18, type: 2} + - target: {fileID: 919132149155446097, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_Name + value: ORB_Low + objectReference: {fileID: 0} + - target: {fileID: 3530763462396548657, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: b53bf65897c597c4eba9c8888f1cfc10, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} +--- !u!1 &6964855357421070179 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + m_PrefabInstance: {fileID: 7811857329737046578} + m_PrefabAsset: {fileID: 0} +--- !u!4 &7774325281593982425 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 199d2370a6266f64587a1a9b8d2c337d, type: 3} + m_PrefabInstance: {fileID: 7811857329737046578} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &9024041447285655497 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4102077886778076298} + m_Modifications: + - target: {fileID: 100000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_Name + value: safetygoggles_low + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalScale.x + value: 0.741004 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalScale.y + value: 0.64707446 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalScale.z + value: 0.83083475 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalPosition.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalPosition.y + value: 0.07860012 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalPosition.z + value: 0.078503266 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalRotation.w + value: 0.9992464 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalRotation.x + value: 0.038620193 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalRotation.y + value: 0.0016385611 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalRotation.z + value: -0.0035240585 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 4.427 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0.173 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -0.397 + objectReference: {fileID: 0} + - target: {fileID: 2300000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 5d5260a94884a404ca29f832ae73dc0f, type: 2} + - target: {fileID: 2300000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_Materials.Array.data[1] + value: + objectReference: {fileID: 2100000, guid: bf03fd6edc7ad60479bd07675e34fc18, type: 2} + - target: {fileID: 2300000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: bf03fd6edc7ad60479bd07675e34fc18, type: 2} + - target: {fileID: 2300000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + propertyPath: m_Materials.Array.data[3] + value: + objectReference: {fileID: 2100000, guid: bf03fd6edc7ad60479bd07675e34fc18, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} +--- !u!4 &9024041447285529929 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 400000, guid: 6296e48663fd7ad46b1a2af507f871cf, type: 3} + m_PrefabInstance: {fileID: 9024041447285655497} + m_PrefabAsset: {fileID: 0} diff --git a/game/Assets/Prefabs/Character/Time Hat.prefab.meta b/game/Assets/Prefabs/Character/Time Hat.prefab.meta new file mode 100644 index 0000000..01b988a --- /dev/null +++ b/game/Assets/Prefabs/Character/Time Hat.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 04503cf3076df70418e556785dc3677c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Prefabs/Player.prefab b/game/Assets/Prefabs/Player.prefab index 6c7bc7b..1033062 100644 --- a/game/Assets/Prefabs/Player.prefab +++ b/game/Assets/Prefabs/Player.prefab @@ -445,18 +445,6 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 1 m_CallState: 2 - - m_Target: {fileID: 0} - m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine - m_MethodName: SetActive - m_Mode: 6 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 --- !u!114 &6606601648879830728 MonoBehaviour: m_ObjectHideFlags: 0 @@ -541,6 +529,7 @@ GameObject: - component: {fileID: 13726837642651463} - component: {fileID: 3386527785285682116} - component: {fileID: 1922822437564541245} + - component: {fileID: 7227967597265107354} - component: {fileID: 1386167010841057469} m_Layer: 7 m_Name: Graphics @@ -683,6 +672,34 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 1 m_CallState: 2 +--- !u!114 &7227967597265107354 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 13726837642651461} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0a5de09a27d949d4db67034f55c57e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + _event: {fileID: 11400000, guid: 5624ba2a0409d8245b485dc3f4d8b807, type: 2} + _response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4861701825881359288} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 --- !u!114 &1386167010841057469 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1088,6 +1105,72 @@ Light: m_UseViewFrustumForShadowCasterCull: 1 m_ShadowRadius: 0 m_ShadowAngle: 0 +--- !u!1001 &2618899142363134700 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 654446260661958228} + m_Modifications: + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4102077886778076298, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7430955781813958996, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_Name + value: Time Hat + objectReference: {fileID: 0} + - target: {fileID: 7430955781813958996, guid: 04503cf3076df70418e556785dc3677c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 04503cf3076df70418e556785dc3677c, type: 3} +--- !u!1 &4861701825881359288 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7430955781813958996, guid: 04503cf3076df70418e556785dc3677c, type: 3} + m_PrefabInstance: {fileID: 2618899142363134700} + m_PrefabAsset: {fileID: 0} --- !u!1001 &3425477616327879296 PrefabInstance: m_ObjectHideFlags: 0 @@ -2957,6 +3040,11 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3} +--- !u!4 &2883153423186464107 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3} + m_PrefabInstance: {fileID: 3425477616327879296} + m_PrefabAsset: {fileID: 0} --- !u!4 &101233846360686744 stripped Transform: m_CorrespondingSourceObject: {fileID: -5841702960688190952, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3} @@ -2967,9 +3055,9 @@ Transform: m_CorrespondingSourceObject: {fileID: 193541922877487131, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3} m_PrefabInstance: {fileID: 3425477616327879296} m_PrefabAsset: {fileID: 0} ---- !u!4 &867077028833665492 stripped +--- !u!4 &654446260661958228 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2558541879051176788, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3} + m_CorrespondingSourceObject: {fileID: 2782295302538845396, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3} m_PrefabInstance: {fileID: 3425477616327879296} m_PrefabAsset: {fileID: 0} --- !u!1 &2542515566603360209 stripped @@ -2977,9 +3065,9 @@ GameObject: m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3} m_PrefabInstance: {fileID: 3425477616327879296} m_PrefabAsset: {fileID: 0} ---- !u!4 &2883153423186464107 stripped +--- !u!4 &867077028833665492 stripped Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3} + m_CorrespondingSourceObject: {fileID: 2558541879051176788, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3} m_PrefabInstance: {fileID: 3425477616327879296} m_PrefabAsset: {fileID: 0} --- !u!1001 &5562922103527413356 diff --git a/game/Assets/Scripts/Character/TimeHat.cs b/game/Assets/Scripts/Character/TimeHat.cs new file mode 100644 index 0000000..ce43267 --- /dev/null +++ b/game/Assets/Scripts/Character/TimeHat.cs @@ -0,0 +1,44 @@ +using System.Collections; +using System.Collections.Generic; +using DG.Tweening; +using DG.Tweening.Core; +using Ktyl.Util; +using UnityEngine; + +public class TimeHat : MonoBehaviour +{ + [SerializeField] private SerialFloat _freezeDuration; + [SerializeField] private Transform _orbGraphics; + [SerializeField] private float _animDuration = 0.3f; + + private Vector3 _activeScale; + + // Start is called before the first frame update + void Start() + { + _activeScale = _orbGraphics.localScale; + _orbGraphics.localScale = Vector3.zero; + } + + public void Trigger() + { + _orbGraphics + .DOScale(_activeScale, _animDuration) + .SetEase(Ease.OutCirc); + + var t = 0f; + DOTween.To( + () => t, + _ => { }, + 1f, + _freezeDuration) + .OnComplete(Reset); + } + + public void Reset() + { + _orbGraphics + .DOScale(Vector3.one * Mathf.Epsilon, _animDuration) + .SetEase(Ease.InCirc); + } +} diff --git a/game/Assets/Scripts/Character/TimeHat.cs.meta b/game/Assets/Scripts/Character/TimeHat.cs.meta new file mode 100644 index 0000000..6626293 --- /dev/null +++ b/game/Assets/Scripts/Character/TimeHat.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2948b341d27a8504398f082f85df758b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: