From a1f3bb005ea40184b4b8f780c852cb9aff970599 Mon Sep 17 00:00:00 2001 From: ThePurpleAnon <100617766+ThePurpleAnon@users.noreply.github.com> Date: Tue, 27 Feb 2024 01:46:12 -0600 Subject: [PATCH] god dammit fuck this game --- Assets/Resources/Games/chargingChicken.prefab | 33 +- .../Games/ChargingChicken/Island.prefab | 193 +++++++++- .../StonePlatform/PlatformFall.anim | 363 ++++++++++++++++-- .../ChargingChicken/Animations/Water.meta | 8 + .../Animations/Water/WaterAnim.controller | 101 +++++ .../Water/WaterAnim.controller.meta | 8 + .../Animations/Water/WaterScroll.anim | 116 ++++++ .../Animations/Water/WaterScroll.anim.meta | 8 + .../ChargingChicken/chicken_cellshader.mat | 2 +- Assets/Scenes/Editor.unity | 4 +- .../Games/ChargingChicken/ChargingChicken.cs | 50 ++- .../Scripts/Games/ChargingChicken/Island.cs | 39 +- ...Generator.Editor.ProjectSettingsData.asset | 1 + 13 files changed, 862 insertions(+), 64 deletions(-) create mode 100644 Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water.meta create mode 100644 Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterAnim.controller create mode 100644 Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterAnim.controller.meta create mode 100644 Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterScroll.anim create mode 100644 Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterScroll.anim.meta diff --git a/Assets/Resources/Games/chargingChicken.prefab b/Assets/Resources/Games/chargingChicken.prefab index 21458649e..cd42af1e2 100644 --- a/Assets/Resources/Games/chargingChicken.prefab +++ b/Assets/Resources/Games/chargingChicken.prefab @@ -10,6 +10,7 @@ GameObject: m_Component: - component: {fileID: 5079513360686983010} - component: {fileID: 369622609815772378} + - component: {fileID: 7426045041154988916} m_Layer: 0 m_Name: Sea m_TagString: Untagged @@ -90,6 +91,27 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!95 &7426045041154988916 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 801850082581195523} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 9a74c07cf0dcf544d91c240670d0e2a7, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 --- !u!1 &858171601846565751 GameObject: m_ObjectHideFlags: 0 @@ -580,15 +602,14 @@ MonoBehaviour: bgLow: {fileID: 6514028314290566012} bgHigh: {fileID: 6392346911876790710} ChickenAnim: {fileID: 122590160896605966} + WaterAnim: {fileID: 7426045041154988916} sea: {fileID: 5079513360686983010} - islandBaseTransform: {fileID: 0} yardsText: {fileID: 8575941321201979456} bubbleText: {fileID: 5637715493577622280} countBubble: {fileID: 8579964775969778696} IslandBase: {fileID: 452761269397350257, guid: 9b9f56f7fd4b4ea43a550dca1b787e98, type: 3} chickenColors: {fileID: 2100000, guid: acc543038ca31514fa57524efa7642f9, type: 2} headlightColor: {fileID: 1126427993834615640} - isInputting: 0 --- !u!1 &3828967778714515104 GameObject: m_ObjectHideFlags: 0 @@ -662,7 +683,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 10 + m_SortingOrder: 6 m_Sprite: {fileID: -326528370, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 @@ -746,7 +767,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 5 + m_SortingOrder: 0 m_Sprite: {fileID: 1414815060, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 @@ -1168,7 +1189,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 5 + m_SortingOrder: 0 m_Sprite: {fileID: 1414815060, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 @@ -1510,7 +1531,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 15 + m_SortingOrder: 7 m_Sprite: {fileID: -2039604112, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 diff --git a/Assets/Resources/Prefabs/Games/ChargingChicken/Island.prefab b/Assets/Resources/Prefabs/Games/ChargingChicken/Island.prefab index 8fe091abc..425d21ac4 100644 --- a/Assets/Resources/Prefabs/Games/ChargingChicken/Island.prefab +++ b/Assets/Resources/Prefabs/Games/ChargingChicken/Island.prefab @@ -33,6 +33,90 @@ Transform: m_Father: {fileID: 732984989503240041} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &80156402005524873 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9046507025991307577} + - component: {fileID: 5268335766498835668} + m_Layer: 0 + m_Name: Platform2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &9046507025991307577 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 80156402005524873} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.8514514, y: -0.9991054, z: 0} + m_LocalScale: {x: 1.03, y: 1.03, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6716266173113673127} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &5268335766498835668 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 80156402005524873} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: acc543038ca31514fa57524efa7642f9, 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: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 10 + m_Sprite: {fileID: 1848434777, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.68, y: 0.76} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &472791442889573690 GameObject: m_ObjectHideFlags: 0 @@ -62,6 +146,8 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 315182087035321974} + - {fileID: 9046507025991307577} + - {fileID: 6285526404627867202} m_Father: {fileID: 5055808538011896587} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -306,7 +392,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 16 + m_SortingOrder: 1 m_Sprite: {fileID: -1128882636, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 @@ -427,8 +513,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3778088294134279665} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.57845163, y: 0.6581054, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: -0.61118, y: 0.667, z: 0} + m_LocalScale: {x: 1.0177, y: 1.0177, z: 1} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 6716266173113673127} @@ -968,6 +1054,9 @@ MonoBehaviour: SmallLandmass: {fileID: 5628817811886241001} FullLandmass: {fileID: 7495323784547262482} StonePlatform: {fileID: 3778088294134279665} + Platform1: {fileID: 7681896577572022242} + Platform2: {fileID: 80156402005524873} + Platform3: {fileID: 8734499266199773495} --- !u!1 &5628817811886241001 GameObject: m_ObjectHideFlags: 0 @@ -984,7 +1073,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &6166229908306089762 Transform: m_ObjectHideFlags: 0 @@ -1040,7 +1129,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 13 + m_SortingOrder: 0 m_Sprite: {fileID: 62603071, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 @@ -1208,7 +1297,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 16 + m_SortingOrder: 1 m_Sprite: {fileID: -674752916, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 @@ -1604,12 +1693,12 @@ GameObject: - component: {fileID: 315182087035321974} - component: {fileID: 523039980841813546} m_Layer: 0 - m_Name: Platform + m_Name: Platform1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &315182087035321974 Transform: m_ObjectHideFlags: 0 @@ -1665,7 +1754,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 0 + m_SortingOrder: 10 m_Sprite: {fileID: -1149931286, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 @@ -1795,6 +1884,90 @@ Transform: m_Father: {fileID: 8712487420719949613} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8734499266199773495 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6285526404627867202} + - component: {fileID: 4521512962646006828} + m_Layer: 0 + m_Name: Platform3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &6285526404627867202 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8734499266199773495} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.8514514, y: -0.9991054, z: 0} + m_LocalScale: {x: 1.03, y: 1.03, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6716266173113673127} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &4521512962646006828 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8734499266199773495} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: acc543038ca31514fa57524efa7642f9, 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: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 10 + m_Sprite: {fileID: -4757701, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.68, y: 0.76} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &9006172406279215321 GameObject: m_ObjectHideFlags: 0 @@ -1867,7 +2040,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 15 + m_SortingOrder: 0 m_Sprite: {fileID: -1484318784, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 diff --git a/Assets/Resources/Sprites/Games/ChargingChicken/Animations/StonePlatform/PlatformFall.anim b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/StonePlatform/PlatformFall.anim index 0f82f3b42..010ef8a95 100644 --- a/Assets/Resources/Sprites/Games/ChargingChicken/Animations/StonePlatform/PlatformFall.anim +++ b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/StonePlatform/PlatformFall.anim @@ -13,8 +13,7 @@ AnimationClip: m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: + m_EulerCurves: - curve: serializedVersion: 2 m_Curve: @@ -22,15 +21,15 @@ AnimationClip: time: 0 value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 76.89201} tangentMode: 0 - weightedMode: 0 + weightedMode: 3 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.35063696} - serializedVersion: 3 time: 0.16666667 - value: {x: 0, y: -7, z: 0} - inSlope: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 46.8} + inSlope: {x: -0, y: -0, z: 280.8} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 weightedMode: 0 @@ -40,8 +39,98 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 path: PlatformHolder + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: -1.9746248, z: 0} + outSlope: {x: 0, y: -1.9746248, z: 0} + tangentMode: 0 + weightedMode: 2 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33021447, z: 0.33333334} + - serializedVersion: 3 + time: 0.016666668 + value: {x: -0.025, y: -0.09860466, z: 0} + inSlope: {x: -3.5999997, y: -9.687987, z: 0} + outSlope: {x: -3.5999997, y: -9.687987, z: 0} + tangentMode: 0 + weightedMode: 3 + inWeight: {x: 0.33333334, y: 0.3361099, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33129677, z: 0.33333334} + - serializedVersion: 3 + time: 0.033333335 + value: {x: -0.08, y: -0.31800023, z: 0} + inSlope: {x: 0, y: -16.51099, z: 0} + outSlope: {x: 0, y: -16.51099, z: 0} + tangentMode: 0 + weightedMode: 3 + inWeight: {x: 0.33333334, y: 0.33504304, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.3330459, z: 0.33333334} + - serializedVersion: 3 + time: 0.1 + value: {x: -0.15, y: -2.1867225, z: 0} + inSlope: {x: 0, y: -38.50575, z: 0} + outSlope: {x: 0.6000002, y: -38.50575, z: 0} + tangentMode: 0 + weightedMode: 3 + inWeight: {x: 0.33333334, y: 0.32846, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.34014586, z: 0.33333334} + - serializedVersion: 3 + time: 0.13333334 + value: {x: -0.13, y: -3.629637, z: 0} + inSlope: {x: 0.6000002, y: -48.019802, z: -0} + outSlope: {x: 3.9, y: -48.019802, z: 0} + tangentMode: 0 + weightedMode: 3 + inWeight: {x: 0.33333334, y: 0.3250887, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.34602585, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 0, y: -5.39, z: 0} + inSlope: {x: 3.9, y: -57.72755, z: -0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 3 + inWeight: {x: 0.33333334, y: 0.31891206, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: PlatformHolder m_ScaleCurves: [] - m_FloatCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: PlatformHolder + classID: 1 + script: {fileID: 0} m_PPtrCurves: [] m_SampleRate: 60 m_WrapMode: 0 @@ -57,6 +146,20 @@ AnimationClip: typeID: 4 customType: 0 isPPtrCurve: 0 + - serializedVersion: 2 + path: 2751765835 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2751765835 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 pptrCurveMapping: [] m_AnimationClipSettings: serializedVersion: 2 @@ -92,11 +195,47 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.16666667 - value: 0 + time: 0.016666668 + value: -0.025 + inSlope: -3.5999997 + outSlope: -3.5999997 + tangentMode: 1 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.033333335 + value: -0.08 inSlope: 0 outSlope: 0 - tangentMode: 136 + tangentMode: 1 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.1 + value: -0.15 + inSlope: 0 + outSlope: 0.6000002 + tangentMode: 65 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.13333334 + value: -0.13 + inSlope: 0.6000002 + outSlope: 3.9 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: 3.9 + outSlope: 0 + tangentMode: 69 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 @@ -113,20 +252,20 @@ AnimationClip: - serializedVersion: 3 time: 0 value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 + inSlope: -1.9746248 + outSlope: -1.9746248 + tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 - outWeight: 0.33333334 + outWeight: 0.066607 - serializedVersion: 3 time: 0.16666667 - value: -7 - inSlope: 0 + value: -5.39 + inSlope: -57.72755 outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 + tangentMode: 1 + weightedMode: 3 + inWeight: 0.2980647 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 @@ -148,11 +287,47 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.16666667 + time: 0.016666668 value: 0 inSlope: 0 outSlope: 0 - tangentMode: 136 + tangentMode: 1 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 65 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.13333334 + value: 0 + inSlope: -0 + outSlope: 0 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: -0 + outSlope: 0 + tangentMode: 69 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 @@ -163,7 +338,149 @@ AnimationClip: path: PlatformHolder classID: 4 script: {fileID: 0} - m_EulerEditorCurves: [] + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + weightedMode: 3 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: -0 + outSlope: 0 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: PlatformHolder + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + weightedMode: 3 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: -0 + outSlope: 0 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: PlatformHolder + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 76.89201 + tangentMode: 1 + weightedMode: 3 + inWeight: 0.33333334 + outWeight: 0.35063696 + - serializedVersion: 3 + time: 0.16666667 + value: 46.8 + inSlope: 280.8 + outSlope: 0 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: PlatformHolder + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: PlatformHolder + classID: 1 + script: {fileID: 0} + m_EulerEditorCurves: + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: PlatformHolder + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: PlatformHolder + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: PlatformHolder + classID: 4 + script: {fileID: 0} m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] diff --git a/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water.meta b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water.meta new file mode 100644 index 000000000..4bdc870ee --- /dev/null +++ b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2983fc5f3bf93c84c9174ec08b6c759f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterAnim.controller b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterAnim.controller new file mode 100644 index 000000000..59dfd0c67 --- /dev/null +++ b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterAnim.controller @@ -0,0 +1,101 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-5003858284470914687 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Idle + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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: 0} + 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: WaterAnim + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 592504463933430062} + 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!1107 &592504463933430062 +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: -5003858284470914687} + m_Position: {x: 40, y: 210, z: 0} + - serializedVersion: 1 + m_State: {fileID: 7933384837640181812} + m_Position: {x: 300, y: 100, 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: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -5003858284470914687} +--- !u!1102 &7933384837640181812 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Scroll + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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: 125543edf9dfada44ba5b85b6b9d729c, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: diff --git a/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterAnim.controller.meta b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterAnim.controller.meta new file mode 100644 index 000000000..5c36762f3 --- /dev/null +++ b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterAnim.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9a74c07cf0dcf544d91c240670d0e2a7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterScroll.anim b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterScroll.anim new file mode 100644 index 000000000..c9d9e0064 --- /dev/null +++ b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterScroll.anim @@ -0,0 +1,116 @@ +%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: WaterScroll + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 118.20011 + outSlope: -5.91 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: -1.97 + inSlope: -5.91 + outSlope: 118.20011 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.x + path: + classID: 224 + script: {fileID: 0} + 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: 1460864421 + script: {fileID: 0} + typeID: 224 + customType: 28 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.33333334 + 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: 0 + inSlope: 118.20011 + outSlope: -5.91 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: -1.97 + inSlope: -5.91 + outSlope: 118.20011 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.x + path: + classID: 224 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterScroll.anim.meta b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterScroll.anim.meta new file mode 100644 index 000000000..cd3d3f34e --- /dev/null +++ b/Assets/Resources/Sprites/Games/ChargingChicken/Animations/Water/WaterScroll.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 125543edf9dfada44ba5b85b6b9d729c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/ChargingChicken/chicken_cellshader.mat b/Assets/Resources/Sprites/Games/ChargingChicken/chicken_cellshader.mat index 565ed04ef..51f82a051 100644 --- a/Assets/Resources/Sprites/Games/ChargingChicken/chicken_cellshader.mat +++ b/Assets/Resources/Sprites/Games/ChargingChicken/chicken_cellshader.mat @@ -83,7 +83,7 @@ Material: - _ZWrite: 1 m_Colors: - _AddColor: {r: 0, g: 0, b: 0, a: 0} - - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} - _ColorAlpha: {r: 1, g: 0, b: 0, a: 1} - _ColorBravo: {r: 0, g: 1, b: 0, a: 1} - _ColorDelta: {r: 0, g: 0, b: 1, a: 1} diff --git a/Assets/Scenes/Editor.unity b/Assets/Scenes/Editor.unity index 4d2dc9498..7d40589b0 100644 --- a/Assets/Scenes/Editor.unity +++ b/Assets/Scenes/Editor.unity @@ -26851,7 +26851,7 @@ MonoBehaviour: m_HandleRect: {fileID: 1589389271} m_Direction: 2 m_Value: 1 - m_Size: 0.9843816 + m_Size: 0.9997105 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -32707,7 +32707,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: 0, y: 101.510185} + m_AnchoredPosition: {x: 0, y: 101.510216} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!222 &1154875945 diff --git a/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs b/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs index 70b43057d..a9ac3f94d 100644 --- a/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs +++ b/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs @@ -96,6 +96,7 @@ namespace HeavenStudio.Games [SerializeField] SpriteRenderer bgLow; [SerializeField] SpriteRenderer bgHigh; [SerializeField] Animator ChickenAnim; + [SerializeField] Animator WaterAnim; [SerializeField] Transform sea; [SerializeField] TMP_Text yardsText; [SerializeField] TMP_Text bubbleText; @@ -123,8 +124,6 @@ namespace HeavenStudio.Games double bubbleEndCount = 0; - float seaPos = 0; - Island nextIsland; Island currentIsland; Island staleIsland; @@ -141,6 +140,8 @@ namespace HeavenStudio.Games double platformDistanceConstant = 5.35 / 2; int platformsPerBeat = 4; + float forgivenessConstant = 1.3f; + public enum DrumLoopList { None, @@ -387,6 +388,14 @@ namespace HeavenStudio.Games isInputting = false; //stops the drums } + + if (nextIsland.isMoving) + //chicken/water movement speed + { + float newAnimScale = Util.EasingFunction.EaseOutQuad(1, 0, nextIsland.value1); + ChickenAnim.SetScaledAnimationSpeed((newAnimScale * 0.8f) + 0.2f); + WaterAnim.SetScaledAnimationSpeed((nextIsland.speed1) + (nextIsland.speed2) + 0.2f); + } } public override void OnPlay(double beat) @@ -407,6 +416,8 @@ namespace HeavenStudio.Games colorTo2 = defaultBGColorBottom; nextIsland = Instantiate(IslandBase, transform).GetComponent(); + nextIsland.SmallLandmass.SetActive(true); + WaterAnim.DoScaledAnimationAsync("Scroll", 0.2f); } #endregion @@ -435,12 +446,13 @@ namespace HeavenStudio.Games //hose count animation nextIsland.ChargerArmCountIn(beat); - //TO DO: GET RID OF THIS THIS IS JUST FOR DEMO PURPOSES, IT PLAYS THE LITTLE "COLLAPSE" NOISE BUT IT NEEDS TO BE REPLACED WITH A PROPER DISTANCE CHECK + //collapse island (successful) BeatAction.New(GameManager.instance, new List() { new BeatAction.Action(beat + (length * 2) - 1, delegate { SoundByte.PlayOneShotGame("chargingChicken/complete"); nextIsland.BigLandmass.SetActive(false); + nextIsland.SmallLandmass.SetActive(true); }), }); @@ -463,13 +475,18 @@ namespace HeavenStudio.Games actions.Add(new(beat - 1, delegate { ChickenAnim.DoScaledAnimationAsync("Prepare", 0.5f); bubbleEndCount = beat + length; - SoundByte.PlayOneShotGame("chargingChicken/platformSet"); + SoundByte.PlayOneShotGame("chargingChicken/platformSet", volume: 0.5f); SpawnJourney(journeyBeat, yardsTextLength - 1); })); - //spawns the countdown bubble + //spawns the countdown bubble, allows stones to fall actions.Add(new(beat, delegate { - countBubble.SetActive(bubble); + countBubble.SetActive(bubble); + foreach (var a in stonePlatformJourney) + { + stone = a.thisPlatform; + stone.isBeingSet = false; + } })); length += 1; @@ -636,8 +653,9 @@ namespace HeavenStudio.Games { stone = a.thisPlatform; stone.transform.localPosition = new Vector3((float)(((a.stoneNumber + 1) * platformDistanceConstant) + (platformDistanceConstant / 2)), 0, 0); - stone.BecomeStonePlatform(); - stone.StoneFall(); + stone.BecomeStonePlatform(a.stoneNumber); + stone.StoneFall(a.stoneNumber); + stone.isBeingSet = true; stone.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2); stone.journeyStart = ((a.stoneNumber + 1) * platformDistanceConstant) + (platformDistanceConstant / 2); @@ -680,21 +698,21 @@ namespace HeavenStudio.Games stone.journeyBlastOffTime = Conductor.instance.songPositionInBeatsAsDouble; } - nextIsland.PositionIsland(state); + nextIsland.PositionIsland(state * forgivenessConstant); if(missed) { nextIsland.journeyEnd += (nextIsland.journeyLength - ((nextIsland.journeyBlastOffTime - journeyIntendedLength)) * (nextIsland.journeyLength / (nextIsland.journeyLength + 1))) * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2); - nextIsland.journeyLength = Math.Clamp(((nextIsland.journeyBlastOffTime - journeyIntendedLength) / 1.5) + (nextIsland.journeyLength / 3) - 1, 0, nextIsland.journeyLength - 1); + nextIsland.journeyLength = Math.Clamp(((nextIsland.journeyBlastOffTime - journeyIntendedLength) / 1.5) + (nextIsland.journeyLength / 3) - 1, 0, nextIsland.journeyLength - 2); currentIsland.journeyEnd += ((currentIsland.journeyLength - (currentIsland.journeyBlastOffTime - journeyIntendedLength) + 1) * (currentIsland.journeyLength / (currentIsland.journeyLength + 1))) * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2); - currentIsland.journeyLength = Math.Clamp(((currentIsland.journeyBlastOffTime - journeyIntendedLength) / 1.5) + (currentIsland.journeyLength / 3) - 1, 0, currentIsland.journeyLength - 1.5); + currentIsland.journeyLength = Math.Clamp(((currentIsland.journeyBlastOffTime - journeyIntendedLength) / 1.5) + (currentIsland.journeyLength / 3) - 1, 0, currentIsland.journeyLength - 2); foreach (var a in stonePlatformJourney) { stone = a.thisPlatform; stone.journeyEnd += (stone.journeyLength - ((stone.journeyBlastOffTime - journeyIntendedLength)) * (stone.journeyLength / (stone.journeyLength + 1))) * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2); - stone.journeyLength = Math.Clamp(((stone.journeyBlastOffTime - journeyIntendedLength) / 1.5) + (stone.journeyLength / 3) - 1, 0, stone.journeyLength - 1); + stone.journeyLength = Math.Clamp(((stone.journeyBlastOffTime - journeyIntendedLength) / 1.5) + (stone.journeyLength / 3) - 1, 0, stone.journeyLength - 2); } BeatAction.New(GameManager.instance, new List() @@ -713,14 +731,14 @@ namespace HeavenStudio.Games } else { - nextIsland.journeyEnd -= state * 1.03f; + nextIsland.journeyEnd -= state * 1.03f * forgivenessConstant; - currentIsland.journeyEnd -= state * 1.03f; + currentIsland.journeyEnd -= state * 1.03f * forgivenessConstant; foreach (var a in stonePlatformJourney) { stone = a.thisPlatform; - stone.journeyEnd -= state * 1.03f; + stone.journeyEnd -= state * 1.03f * forgivenessConstant; } BeatAction.New(GameManager.instance, new List() @@ -820,7 +838,7 @@ namespace HeavenStudio.Games nextIsland.respawnStart = Conductor.instance.songPositionInBeatsAsDouble + 0.5; nextIsland.isRespawning = true; - nextIsland.FakeChickenAnim.DoScaledAnimationAsync("Respawn", 0.5f); + nextIsland.FakeChickenAnim.DoUnscaledAnimation("Respawn"); foreach (var a in stonePlatformJourney) { diff --git a/Assets/Scripts/Games/ChargingChicken/Island.cs b/Assets/Scripts/Games/ChargingChicken/Island.cs index cd4081a52..210245cd5 100644 --- a/Assets/Scripts/Games/ChargingChicken/Island.cs +++ b/Assets/Scripts/Games/ChargingChicken/Island.cs @@ -22,6 +22,10 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken [SerializeField] public GameObject FullLandmass; [SerializeField] public GameObject StonePlatform; + [SerializeField] public GameObject Platform1; + [SerializeField] public GameObject Platform2; + [SerializeField] public GameObject Platform3; + [NonSerialized]public double journeySave = 0; [NonSerialized]public double journeyStart = 0; [NonSerialized]public double journeyEnd = 0; @@ -35,6 +39,13 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken [NonSerialized]public bool isStonePlatform = false; [NonSerialized]public bool canFall = false; + [NonSerialized]public bool isFalling = false; + + [NonSerialized]public bool isBeingSet = false; + + [NonSerialized]public float value1 = 0f; + [NonSerialized]public float speed1 = 0f; + [NonSerialized]public float speed2 = 0f; #endregion @@ -45,7 +56,7 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken { if (isMoving) { - float value1 = (Conductor.instance.GetPositionFromBeat(journeyBlastOffTime, journeyLength)); + value1 = (Conductor.instance.GetPositionFromBeat(journeyBlastOffTime, journeyLength)); float newX1 = Util.EasingFunction.EaseOutCubic((float)journeyStart, (float)journeyEnd, value1); IslandPos.localPosition = new Vector3(newX1, 0, 0); } @@ -55,10 +66,14 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken float newX2 = Util.EasingFunction.Linear((float)journeyStart - (float)journeySave, (float)journeyEnd, 1 - value2); IslandPos.localPosition = new Vector3(newX2, 0, 0); } - if (canFall && IslandPos.localPosition.x < 0 && !isRespawning) + if (canFall && IslandPos.localPosition.x < -0.5) { - PlatformAnim.DoScaledAnimationAsync("Fall", 0.5f); + PlatformAnim.DoScaledAnimationAsync("Fall", 0.3f); SoundByte.PlayOneShotGame("chargingChicken/platformFall", volume: 0.5f); + BeatAction.New(GameManager.instance, new List() + { + new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.30, delegate { StoneSplash(); }), + }); canFall = false; } } @@ -105,7 +120,7 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken //stone platform methods #region Stone Platform Methods - public void BecomeStonePlatform() + public void BecomeStonePlatform(int offset) { isStonePlatform = true; canFall = true; @@ -113,11 +128,23 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken BigLandmass.SetActive(false); FullLandmass.SetActive(false); StonePlatform.SetActive(true); + + switch (offset % 3) { + case 0: Platform1.SetActive(true); break; + case 1: Platform2.SetActive(true); break; + case 2: Platform3.SetActive(true); break; + } + } - public void StoneFall() + public void StoneFall(int offset) { - PlatformAnim.DoScaledAnimationAsync("Set", 0.5f); + PlatformAnim.DoScaledAnimation("Set", Conductor.instance.songPositionInBeatsAsDouble + ((double)offset / 16), timeScale: 0.5f); + } + + public void StoneSplash() + { + if (IslandPos.localPosition.x > -6) SoundByte.PlayOneShotGame("chargingChicken/platformSplash", volume: 0.4f); } #endregion diff --git a/ProjectSettings/SatorImaging.UnitySourceGenerator.Editor.ProjectSettingsData.asset b/ProjectSettings/SatorImaging.UnitySourceGenerator.Editor.ProjectSettingsData.asset index 836ccb44a..d06c9b1f8 100644 --- a/ProjectSettings/SatorImaging.UnitySourceGenerator.Editor.ProjectSettingsData.asset +++ b/ProjectSettings/SatorImaging.UnitySourceGenerator.Editor.ProjectSettingsData.asset @@ -19,5 +19,6 @@ MonoBehaviour: ImportedScriptPaths: - Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs - Assets/Scripts/Games/ChargingChicken/Island.cs + - Assets/Scripts/GameManager.cs PathsToSkipImportEvent: [] PathsToIgnoreOverwriteSettingOnAttribute: []