From 5a5a54905b06c54da9adad6c1d69c84c53eaeab1 Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Tue, 27 Jun 2023 00:25:08 +0200 Subject: [PATCH] fixed more interactions --- .../Games/NightWalkAgb/JumpPlatform.prefab | 310 ++++++++++++++++++ .../Games/NightWalkAgb/AgbNightWalk.cs | 6 +- .../Scripts/Games/NightWalkAgb/AgbPlatform.cs | 275 ++++++++++------ 3 files changed, 498 insertions(+), 93 deletions(-) diff --git a/Assets/Resources/Prefabs/Games/NightWalkAgb/JumpPlatform.prefab b/Assets/Resources/Prefabs/Games/NightWalkAgb/JumpPlatform.prefab index b5fbd0ccd..4dc1f1b33 100644 --- a/Assets/Resources/Prefabs/Games/NightWalkAgb/JumpPlatform.prefab +++ b/Assets/Resources/Prefabs/Games/NightWalkAgb/JumpPlatform.prefab @@ -259,6 +259,7 @@ Transform: - {fileID: 2747914681378034359} - {fileID: 5424118043307149915} - {fileID: 8931515185694154255} + - {fileID: 2027593487611815609} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -276,6 +277,7 @@ MonoBehaviour: m_EditorClassIdentifier: platform: {fileID: 8602790381015410525} fallYan: {fileID: 142440390168805750} + fallYanRoll: {fileID: 5091303851177858944} fish: {fileID: 3392966659349309181} rollPlatform: {fileID: 5041901577087691681} rollPlatformLong: {fileID: 4921680285842369143} @@ -300,6 +302,90 @@ Animator: m_AllowConstantClipSamplingOptimization: 1 m_KeepAnimatorStateOnDisable: 0 m_WriteDefaultValuesOnDisable: 0 +--- !u!1 &1915914666835140407 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4157901245270411314} + - component: {fileID: 24506715270522208} + m_Layer: 0 + m_Name: smear + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4157901245270411314 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915914666835140407} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2027593487611815609} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &24506715270522208 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915914666835140407} + 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: 10754, guid: 0000000000000000f000000000000000, type: 0} + 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: 0 + m_Sprite: {fileID: 1594823612, guid: 425aa48453840844d9f049d7ebd849ce, 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.24, y: 2.79} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &2133463123473372129 GameObject: m_ObjectHideFlags: 0 @@ -1574,6 +1660,146 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &4963355011290045854 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3694789889951042834} + - component: {fileID: 8150013434798386265} + m_Layer: 0 + m_Name: Sprite + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3694789889951042834 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4963355011290045854} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.02, y: 5.67, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2027593487611815609} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &8150013434798386265 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4963355011290045854} + 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: 10754, guid: 0000000000000000f000000000000000, type: 0} + 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: 0 + m_Sprite: {fileID: -2087613087, guid: 425aa48453840844d9f049d7ebd849ce, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1.42, y: 2.94} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &5091303851177858944 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2027593487611815609} + - component: {fileID: 3507924328377865173} + m_Layer: 0 + m_Name: playYanFallRoll + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &2027593487611815609 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5091303851177858944} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.69, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3694789889951042834} + - {fileID: 3913083703923818769} + - {fileID: 4157901245270411314} + m_Father: {fileID: 9016694733661613840} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &3507924328377865173 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5091303851177858944} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: f14668a359da86d41b7c37f7bfcd9bee, 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 &5220100509239958087 GameObject: m_ObjectHideFlags: 0 @@ -1658,6 +1884,90 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &5237381046300883530 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3913083703923818769} + - component: {fileID: 5475349914657052771} + m_Layer: 0 + m_Name: sweat + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3913083703923818769 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5237381046300883530} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.88, y: 6.23, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2027593487611815609} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &5475349914657052771 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5237381046300883530} + 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: 10754, guid: 0000000000000000f000000000000000, type: 0} + 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: 0 + m_Sprite: {fileID: 242634543, guid: 425aa48453840844d9f049d7ebd849ce, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1.06, y: 1.8} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &5680332895435834434 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs b/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs index 73933d7d3..6bd77b899 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs @@ -67,7 +67,11 @@ namespace HeavenStudio.Games.Loaders { preFunctionLength = 1, defaultLength = 2, - preFunction = delegate { var e = eventCaller.currentEntity; AgbNightWalk.PlayRollCue(e.beat, e); } + preFunction = delegate { var e = eventCaller.currentEntity; if (!e["mute"]) AgbNightWalk.PlayRollCue(e.beat, e); }, + parameters = new List() + { + new Param("mute", false, "Mute Sound") + } }, new GameAction("end", "End") { diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs b/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs index 4eb89a5de..7ce142e7f 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs @@ -36,6 +36,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk private PlayerActionEvent releaseEvent; [NonSerialized] public bool stopped; [SerializeField] private GameObject fallYan; + [SerializeField] private GameObject fallYanRoll; [SerializeField] private Animator fish; [SerializeField] private Animator rollPlatform; [SerializeField] private GameObject rollPlatformLong; @@ -85,10 +86,65 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk platform.SetActive(false); if (startBeat < endBeat) { - inputEvent = game.ScheduleInput(startBeat, endBeat - startBeat, InputType.STANDARD_ALT_DOWN, JustRollHold, RollMissHold, Empty); - releaseEvent = game.ScheduleInput(startBeat, endBeat - startBeat + 0.5, InputType.STANDARD_ALT_UP, JustRollRelease, RollMissRelease, Empty); + if (game.ShouldNotJumpOnBeat(endBeat) || isFish) + { + inputEvent = game.ScheduleUserInput(startBeat, endBeat - startBeat, InputType.STANDARD_ALT_DOWN, JustRollHold, RollMissHold, Empty); + releaseEvent = game.ScheduleUserInput(startBeat, endBeat - startBeat + 0.5, InputType.STANDARD_ALT_UP, JustRollRelease, RollMissRelease, Empty); + if (nextPlatformIsSameHeight && !isFinalBlock) + { + BeatAction.New(gameObject, new List() + { + new BeatAction.Action(endBeat, delegate + { + if (GameManager.instance.autoplay && !stopped) + { + game.playYan.Walk(); + } + }), + new BeatAction.Action(endBeat + 0.5, delegate + { + if (GameManager.instance.autoplay && !stopped && !isEndEvent) + { + game.playYan.Walk(); + anim.DoScaledAnimationAsync("Note", 0.5f); + SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type); + } + }), + new BeatAction.Action(endBeat + 1, delegate + { + if (GameManager.instance.autoplay && !stopped && !isEndEvent) + { + rollPlatform.DoScaledAnimationAsync("Note", 0.5f); + SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type); + } + }) + }); + } + else + { + BeatAction.New(gameObject, new List() + { + new BeatAction.Action(endBeat + 0.5, delegate + { + if (GameManager.instance.autoplay && !stopped) + { + handler.StopAll(); + handler.DestroyPlatforms(endBeat + 2, endBeat - 3, endBeat + 6); + SoundByte.PlayOneShotGame("nightWalkAgb/wot"); + game.playYan.Hide(); + fallYanRoll.SetActive(true); + fallYanRoll.GetComponent().DoScaledAnimationAsync("FallSmear", 0.5f); + } + }) + }); + } + } + else + { + inputEvent = game.ScheduleInput(startBeat, endBeat - startBeat, InputType.STANDARD_ALT_DOWN, JustRollHold, RollMissHold, Empty); + releaseEvent = game.ScheduleInput(startBeat, endBeat - startBeat + 0.5, InputType.STANDARD_ALT_UP, JustRollRelease, RollMissRelease, Empty); + } canKick = true; - canKickRelease = true; BeatAction.New(gameObject, new List() { new BeatAction.Action(endBeat, delegate @@ -102,18 +158,25 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk } } }), - new BeatAction.Action(endBeat + 0.5, delegate - { - if (!stopped) - { - SoundByte.PlayOneShotGame("nightWalkAgb/boxKick"); - if (canKickRelease) - { - rollPlatform.Play("Kick", 0, 0); - } - } - }), }); + if (nextPlatformIsSameHeight && !isEndEvent) + { + canKickRelease = true; + BeatAction.New(gameObject, new List() + { + new BeatAction.Action(endBeat + 0.5, delegate + { + if (!stopped) + { + SoundByte.PlayOneShotGame("nightWalkAgb/boxKick"); + if (canKickRelease) + { + rollPlatform.Play("Kick", 0, 0); + } + } + }), + }); + } } } else @@ -146,41 +209,41 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk if (nextPlatformIsSameHeight && !isFinalBlock) { BeatAction.New(gameObject, new List() - { - new BeatAction.Action(endBeat, delegate { - if (GameManager.instance.autoplay && !stopped) + new BeatAction.Action(endBeat, delegate { - game.playYan.Walk(); - } - }), - new BeatAction.Action(endBeat + 0.5, delegate - { - if (GameManager.instance.autoplay && !stopped && !isEndEvent) + if (GameManager.instance.autoplay && !stopped) + { + game.playYan.Walk(); + } + }), + new BeatAction.Action(endBeat + 0.5, delegate { - anim.DoScaledAnimationAsync("Note", 0.5f); - SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type); - } - }) - }); + if (GameManager.instance.autoplay && !stopped && !isEndEvent) + { + anim.DoScaledAnimationAsync("Note", 0.5f); + SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type); + } + }) + }); } else { BeatAction.New(gameObject, new List() - { - new BeatAction.Action(endBeat, delegate { - if (GameManager.instance.autoplay && !stopped) + new BeatAction.Action(endBeat, delegate { - handler.StopAll(); - handler.DestroyPlatforms(endBeat + 2, endBeat - 3, endBeat + 6); - SoundByte.PlayOneShotGame("nightWalkAgb/wot"); - game.playYan.Hide(); - fallYan.SetActive(true); - fallYan.GetComponent().DoScaledAnimationAsync("FallSmear", 0.5f); - } - }) - }); + if (GameManager.instance.autoplay && !stopped) + { + handler.StopAll(); + handler.DestroyPlatforms(endBeat + 2, endBeat - 3, endBeat + 6); + SoundByte.PlayOneShotGame("nightWalkAgb/wot"); + game.playYan.Hide(); + fallYan.SetActive(true); + fallYan.GetComponent().DoScaledAnimationAsync("FallSmear", 0.5f); + } + }) + }); } } else if (!isFish) @@ -241,7 +304,8 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk float normalizedFallBeat = cond.GetPositionFromBeat(playYanFallBeat, 2); EasingFunction.Function func = EasingFunction.GetEasingFunction(EasingFunction.Ease.EaseInQuad); float newPlayYanY = func(0, -12, normalizedFallBeat); - fallYan.transform.localPosition = new Vector3(0, newPlayYanY); + if (fallYan.activeSelf) fallYan.transform.localPosition = new Vector3(0, newPlayYanY); + else if (fallYanRoll.activeSelf) fallYanRoll.transform.localPosition = new Vector3(fallYanRoll.transform.localPosition.x, newPlayYanY); } if (!startGlowing && isEndEvent && game.hitJumps >= game.requiredJumps && AgbNightWalk.hitJumpsPersist >= game.requiredJumpsP) @@ -264,7 +328,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk { anim.DoScaledAnimationAsync("Destroy", 0.5f); SoundByte.PlayOneShotGame("nightWalkAgb/disappear"); - if (fallYan.activeSelf) + if (fallYan.activeSelf || fallYanRoll.activeSelf) { SoundByte.PlayOneShotGame("nightWalkAgb/fall"); playYanIsFalling = true; @@ -296,37 +360,6 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk { canKickRelease = false; double beat = Conductor.instance.songPositionInBeats; - if (isFish) - { - game.ScoreMiss(); - game.playYan.transform.localPosition = new Vector3(0, 2); - game.playYan.Shock(); - fish.DoScaledAnimationAsync("Shock", 0.5f); - handler.StopAll(); - handler.DestroyPlatforms(caller.timer + caller.startBeat + 2, endBeat - 2, endBeat + 6); - BeatAction.New(gameObject, new List() - { - new BeatAction.Action(caller.timer + caller.startBeat + 4, delegate - { - game.playYan.Fall(caller.timer + caller.startBeat + 4); - fish.DoScaledAnimationAsync("FishIdle", 0.5f); - }) - }); - } - else if (isFinalBlock) - { - handler.DestroyPlatforms(caller.timer + caller.startBeat + 2, endBeat - 2, endBeat); - double missTime = 1.5 - Conductor.instance.SecsToBeats(Minigame.earlyTime, Conductor.instance.GetBpmAtBeat(beat)); - BeatAction.New(gameObject, new List() - { - new BeatAction.Action(beat + missTime, delegate - { - game.ScoreMiss(); - handler.StopAll(); - }), - - }); - } if (isEndEvent) { if (game.hitJumps >= game.requiredJumps && AgbNightWalk.hitJumpsPersist >= game.requiredJumpsP) @@ -340,7 +373,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk { BeatAction.New(gameObject, new List() { - new BeatAction.Action(beat + 0.5, delegate + new BeatAction.Action(beat + 1, delegate { game.ScoreMiss(); game.playYan.Shock(); @@ -356,24 +389,74 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk } else { - game.playYan.HighJump(beat, true, state >= 1f || state <= -1f); - handler.DestroyPlatforms(caller.timer + caller.startBeat + 2, endBeat - 2, endBeat); - double missTime = 1.5 - Conductor.instance.SecsToBeats(Minigame.earlyTime, Conductor.instance.GetBpmAtBeat(beat)); - BeatAction.New(gameObject, new List() + if (isFish) { - new BeatAction.Action(beat + missTime, delegate + game.ScoreMiss(); + game.playYan.transform.localPosition = new Vector3(0, 2); + game.playYan.Shock(); + fish.DoScaledAnimationAsync("Shock", 0.5f); + handler.StopAll(); + handler.DestroyPlatforms(caller.timer + caller.startBeat + 2, endBeat - 2, endBeat + 6); + BeatAction.New(gameObject, new List() { - game.ScoreMiss(); - handler.StopAll(); - }), + new BeatAction.Action(caller.timer + caller.startBeat + 4, delegate + { + game.playYan.Fall(caller.timer + caller.startBeat + 4); + fish.DoScaledAnimationAsync("FishIdle", 0.5f); + }) + }); + } + else + { + game.playYan.HighJump(beat, true, state >= 1f || state <= -1f); + handler.DestroyPlatforms(caller.timer + caller.startBeat + 2, endBeat - 2, endBeat); + double missTime = 1.5 - Conductor.instance.SecsToBeats(Minigame.earlyTime, Conductor.instance.GetBpmAtBeat(beat)); + BeatAction.New(gameObject, new List() + { + new BeatAction.Action(beat + missTime, delegate + { + game.ScoreMiss(); + handler.StopAll(); + }), - }); + }); + } } } else { handler.RaiseHeight(beat, lastAdditionalHeightInUnits, additionalHeightInUnits); game.playYan.HighJump(beat, isFinalBlock, state >= 1f || state <= -1f); + if (isFish) + { + game.ScoreMiss(); + game.playYan.transform.localPosition = new Vector3(0, 2); + game.playYan.Shock(); + fish.DoScaledAnimationAsync("Shock", 0.5f); + handler.StopAll(); + handler.DestroyPlatforms(caller.timer + caller.startBeat + 2, endBeat - 2, endBeat + 6); + BeatAction.New(gameObject, new List() + { + new BeatAction.Action(caller.timer + caller.startBeat + 4, delegate + { + game.playYan.Fall(caller.timer + caller.startBeat + 4); + fish.DoScaledAnimationAsync("FishIdle", 0.5f); + }) + }); + } + else if (isFinalBlock) + { + handler.DestroyPlatforms(caller.timer + caller.startBeat + 2, endBeat - 2, endBeat); + double missTime2 = 1.5 - Conductor.instance.SecsToBeats(Minigame.earlyTime, Conductor.instance.GetBpmAtBeat(beat)); + BeatAction.New(gameObject, new List() + { + new BeatAction.Action(beat + missTime2, delegate + { + game.ScoreMiss(); + handler.StopAll(); + }), + }); + } } if (state >= 1f || state <= -1f) { @@ -400,12 +483,24 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk private void RollMissRelease(PlayerActionEvent caller) { - game.playYan.Walk(); - SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type, caller.timer + caller.startBeat + 0.5); - BeatAction.New(gameObject, new List() + if (nextPlatformIsSameHeight) { - new BeatAction.Action(caller.timer + caller.startBeat + 0.5, delegate { rollPlatform.DoScaledAnimationAsync("Note", 0.5f); }) - }); + game.playYan.Walk(); + SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type, caller.timer + caller.startBeat + 0.5); + BeatAction.New(gameObject, new List() + { + new BeatAction.Action(caller.timer + caller.startBeat + 0.5, delegate { rollPlatform.DoScaledAnimationAsync("Note", 0.5f); }) + }); + } + else + { + handler.StopAll(); + handler.DestroyPlatforms(caller.timer + caller.startBeat + 1.5, endBeat - 2, endBeat + 6); + SoundByte.PlayOneShotGame("nightWalkAgb/wot"); + game.playYan.Hide(); + fallYanRoll.SetActive(true); + fallYanRoll.GetComponent().DoScaledAnimationAsync("FallSmear", 0.5f); + } } private void Just(PlayerActionEvent caller, float state) @@ -446,10 +541,6 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk }), }); - } - if (isEndEvent) - { - } if (state >= 1 || state <= -1) {