diff --git a/Assets/Resources/Games/nightWalkAgb.prefab b/Assets/Resources/Games/nightWalkAgb.prefab index 49b9ac467..d7cdc69d7 100644 --- a/Assets/Resources/Games/nightWalkAgb.prefab +++ b/Assets/Resources/Games/nightWalkAgb.prefab @@ -80,6 +80,7 @@ MonoBehaviour: defaultYPos: -11.76 platformDistance: 3.8 playerXPos: -6.78 + platformCount: 20 --- !u!1 &955264990193298390 GameObject: m_ObjectHideFlags: 0 @@ -438,7 +439,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 1 + m_SortingOrder: 5 m_Sprite: {fileID: 379567741, guid: 425aa48453840844d9f049d7ebd849ce, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 @@ -496,6 +497,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cad73dbef6e1da04d8e17fbf557d5f8e, type: 3} m_Name: m_EditorClassIdentifier: + offset: {x: 0, y: 0, z: 0} balloons: - {fileID: 5000215835220187240} - {fileID: 7323822048235362859} @@ -681,6 +683,25 @@ MonoBehaviour: firstEnable: 0 playYan: {fileID: 1314280037714680423} platformHandler: {fileID: 6715217060937385611} + jumpPaths: + - name: Jump + preview: 1 + anchor: {fileID: 0} + positions: + - tag: + pos: {x: 0, y: 0, z: 0} + target: {fileID: 0} + height: 2 + duration: 1 + useLastRealPos: 0 + values: [] + - tag: + pos: {x: 0, y: 0, z: 0} + target: {fileID: 0} + height: 0 + duration: 0 + useLastRealPos: 0 + values: [] --- !u!1 &4465275889429203320 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/Prefabs/Games/NightWalkAgb/JumpPlatform.prefab b/Assets/Resources/Prefabs/Games/NightWalkAgb/JumpPlatform.prefab index a2acb79db..ef694cd6e 100644 --- a/Assets/Resources/Prefabs/Games/NightWalkAgb/JumpPlatform.prefab +++ b/Assets/Resources/Prefabs/Games/NightWalkAgb/JumpPlatform.prefab @@ -1,5 +1,89 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &126302545570242458 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4244102933579141545} + - component: {fileID: 5103341255080640346} + m_Layer: 0 + m_Name: Head + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4244102933579141545 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 126302545570242458} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.036, y: 1.82, z: 0} + m_LocalScale: {x: 0.8, y: 0.8, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4980801589172166105} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &5103341255080640346 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 126302545570242458} + 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: 2 + m_Sprite: {fileID: -291031518, 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.84, y: 1.58} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &1815905863429998752 GameObject: m_ObjectHideFlags: 0 @@ -10,6 +94,7 @@ GameObject: m_Component: - component: {fileID: 9016694733661613840} - component: {fileID: 1558448204157038467} + - component: {fileID: 4653690538679061971} m_Layer: 0 m_Name: JumpPlatform m_TagString: Untagged @@ -46,6 +131,111 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2b6892a770a77394ca687ef93f8935db, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!95 &4653690538679061971 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1815905863429998752} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 8e33f3827f8fe0a459e33117a72bd7c1, 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 &3455774344871944137 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1927242747170139385} + - component: {fileID: 5328914926276754244} + m_Layer: 0 + m_Name: jumpImpact + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1927242747170139385 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3455774344871944137} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.16, y: 9.95, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6382310734157045642} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &5328914926276754244 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3455774344871944137} + 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: -938550924, 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: 3.2, y: 1.6} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &4717417375749839996 GameObject: m_ObjectHideFlags: 0 @@ -130,6 +320,91 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &7202126364606349233 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4980801589172166105} + - component: {fileID: 1222923331947670611} + m_Layer: 0 + m_Name: stem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &4980801589172166105 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7202126364606349233} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.034, y: 7.35, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4244102933579141545} + m_Father: {fileID: 6382310734157045642} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1222923331947670611 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7202126364606349233} + 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: 1 + m_Sprite: {fileID: -124737513, 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: 0.83, y: 2.69} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &7945535982687195726 GameObject: m_ObjectHideFlags: 0 @@ -160,6 +435,8 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 4618756608417478071} + - {fileID: 4980801589172166105} + - {fileID: 1927242747170139385} m_Father: {fileID: 9016694733661613840} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform.meta b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform.meta new file mode 100644 index 000000000..e93f7d709 --- /dev/null +++ b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 042d180cf22bff842ac50d24813db245 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Flower.anim b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Flower.anim new file mode 100644 index 000000000..acb2e0881 --- /dev/null +++ b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Flower.anim @@ -0,0 +1,623 @@ +%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: Flower + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0.034, y: 6.994, z: 0} + inSlope: {x: Infinity, y: Infinity, z: Infinity} + outSlope: {x: Infinity, y: Infinity, z: Infinity} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0, z: 0} + outWeight: {x: 0, y: 0, z: 0} + - serializedVersion: 3 + time: 0.016666668 + value: {x: 0.034, y: 7.35, z: 0} + inSlope: {x: Infinity, y: Infinity, z: Infinity} + outSlope: {x: Infinity, y: Infinity, z: Infinity} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Rod/stem + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: -0.036, y: 1.82, z: 0} + inSlope: {x: Infinity, y: Infinity, z: Infinity} + outSlope: {x: Infinity, y: Infinity, z: Infinity} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.016666668 + value: {x: -0.036, y: 1.919, z: 0} + inSlope: {x: Infinity, y: Infinity, z: Infinity} + outSlope: {x: Infinity, y: Infinity, z: Infinity} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.06666667 + value: {x: -0.036, y: 1.82, z: 0} + inSlope: {x: Infinity, y: Infinity, z: Infinity} + outSlope: {x: Infinity, y: Infinity, z: Infinity} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Rod/stem/Head + m_ScaleCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0.8, y: 0.8, z: 1} + inSlope: {x: Infinity, y: Infinity, z: Infinity} + outSlope: {x: Infinity, y: Infinity, z: Infinity} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.016666668 + value: {x: 1, y: 1, z: 1} + inSlope: {x: Infinity, y: Infinity, z: Infinity} + outSlope: {x: Infinity, y: Infinity, z: Infinity} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Rod/stem + 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 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: Rod/stem + classID: 1 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + 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: Rod/light + classID: 1 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.033333335 + 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: Rod/jumpImpact + classID: 1 + script: {fileID: 0} + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 2115410046, guid: 425aa48453840844d9f049d7ebd849ce, type: 3} + attribute: m_Sprite + path: Rod + classID: 212 + script: {fileID: 0} + 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: 3738218430 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2348526577 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 3738218430 + attribute: 3 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 3738218430 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2539502518 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2843559434 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 952365541 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 2115410046, guid: 425aa48453840844d9f049d7ebd849ce, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.06666667 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + 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: 1 + 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: Rod/stem + classID: 1 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + 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: Rod/light + classID: 1 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.8 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.016666668 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.x + path: Rod/stem + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.8 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.016666668 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.y + path: Rod/stem + 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.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.016666668 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.z + path: Rod/stem + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.034 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0.034 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Rod/stem + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 6.994 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 7.35 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Rod/stem + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Rod/stem + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.033333335 + 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: Rod/jumpImpact + classID: 1 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -0.036 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.016666668 + value: -0.036 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.06666667 + value: -0.036 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Rod/stem/Head + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.82 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.016666668 + value: 1.919 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.06666667 + value: 1.82 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Rod/stem/Head + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.06666667 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Rod/stem/Head + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Flower.anim.meta b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Flower.anim.meta new file mode 100644 index 000000000..f0400ff0d --- /dev/null +++ b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Flower.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 026b9086be1490846a2551803e0a0f0e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Idle.anim b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Idle.anim new file mode 100644 index 000000000..66fb53407 --- /dev/null +++ b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Idle.anim @@ -0,0 +1,188 @@ +%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: Idle + 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: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: Rod/stem + classID: 1 + 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 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: Rod/light + classID: 1 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + 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: Rod/jumpImpact + classID: 1 + 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: 3738218430 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2539502518 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2843559434 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + 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: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: Rod/stem + classID: 1 + 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 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: Rod/light + classID: 1 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + 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: Rod/jumpImpact + classID: 1 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Idle.anim.meta b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Idle.anim.meta new file mode 100644 index 000000000..8e8a3f32b --- /dev/null +++ b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/Idle.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2a8b0e932812d034685431bf43c56c8a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/JumpPlatform.controller b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/JumpPlatform.controller new file mode 100644 index 000000000..ae4ae7c22 --- /dev/null +++ b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/JumpPlatform.controller @@ -0,0 +1,101 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1107 &-523919434421660029 +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: 1174346346138376463} + m_Position: {x: 200, y: 0, z: 0} + - serializedVersion: 1 + m_State: {fileID: -396682376527989810} + m_Position: {x: 235, y: 65, 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: 1174346346138376463} +--- !u!1102 &-396682376527989810 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Flower + 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: 026b9086be1490846a2551803e0a0f0e, type: 2} + 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: JumpPlatform + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: -523919434421660029} + 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!1102 &1174346346138376463 +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: 7400000, guid: 2a8b0e932812d034685431bf43c56c8a, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: diff --git a/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/JumpPlatform.controller.meta b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/JumpPlatform.controller.meta new file mode 100644 index 000000000..a2570364d --- /dev/null +++ b/Assets/Resources/Sprites/Games/NightWalkGBA/Animations/Platform/JumpPlatform.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8e33f3827f8fe0a459e33117a72bd7c1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/NightWalkGBA/NightWalkGBA.png.meta b/Assets/Resources/Sprites/Games/NightWalkGBA/NightWalkGBA.png.meta index 3c299db4e..465843806 100644 --- a/Assets/Resources/Sprites/Games/NightWalkGBA/NightWalkGBA.png.meta +++ b/Assets/Resources/Sprites/Games/NightWalkGBA/NightWalkGBA.png.meta @@ -189,7 +189,7 @@ TextureImporter: edges: [] weights: [] - serializedVersion: 2 - name: NightWalkGBA_4 + name: jumpImpact rect: serializedVersion: 2 x: 753 @@ -903,7 +903,7 @@ TextureImporter: edges: [] weights: [] - serializedVersion: 2 - name: NightWalkGBA_38 + name: stem rect: serializedVersion: 2 x: 531 @@ -924,7 +924,7 @@ TextureImporter: edges: [] weights: [] - serializedVersion: 2 - name: NightWalkGBA_39 + name: Heart rect: serializedVersion: 2 x: 693 @@ -1606,6 +1606,7 @@ TextureImporter: weights: [] secondaryTextures: [] nameFileIdTable: + Heart: -291031518 NightWalkGBA_0: 130521762 NightWalkGBA_1: 1507133511 NightWalkGBA_10: 379567741 @@ -1638,9 +1639,6 @@ TextureImporter: NightWalkGBA_35: 1835935371 NightWalkGBA_36: 384230439 NightWalkGBA_37: 1021962739 - NightWalkGBA_38: -124737513 - NightWalkGBA_39: -291031518 - NightWalkGBA_4: -938550924 NightWalkGBA_40: -1838287392 NightWalkGBA_41: -543996660 NightWalkGBA_42: 1233041225 @@ -1672,11 +1670,13 @@ TextureImporter: bp: 529839015 br: 592522720 by: 2115022471 + jumpImpact: -938550924 jumplat2: 2115410046 jumplat3: -199434903 jumpplat1: 629073624 light: -1879352647 platform: 1193791270 + stem: -124737513 spritePackingTag: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs b/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs index 4adce13db..aa3b8cc4c 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs @@ -36,9 +36,35 @@ namespace HeavenStudio.Games public class AgbNightWalk : Minigame { public static AgbNightWalk instance; - [SerializeField] private AgbPlayYan playYan; + public AgbPlayYan playYan; [SerializeField] private AgbPlatformHandler platformHandler; [NonSerialized] public double countInBeat = -1; + [Header("Curves")] + [SerializeField] SuperCurveObject.Path[] jumpPaths; + + new void OnDrawGizmos() + { + base.OnDrawGizmos(); + foreach (SuperCurveObject.Path path in jumpPaths) + { + if (path.preview) + { + playYan.DrawEditorGizmo(path); + } + } + } + + public SuperCurveObject.Path GetPath(string name) + { + foreach (SuperCurveObject.Path path in jumpPaths) + { + if (path.name == name) + { + return path; + } + } + return default(SuperCurveObject.Path); + } private void Awake() { diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs b/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs index 79deccd90..efc1d342f 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs @@ -1,3 +1,4 @@ +using HeavenStudio.Util; using System; using System.Collections; using System.Collections.Generic; @@ -7,12 +8,23 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk { public class AgbPlatform : MonoBehaviour { + public enum PlatformType + { + Flower = 1, + Lollipop = 2, + Umbrella = 3 + } private double startBeat; private double endBeat; - private AgbPlatformHandler handler; - public void Init(double beat, double hitBeat, AgbPlatformHandler handlerToPut) + [NonSerialized] public AgbPlatformHandler handler; + private Animator anim; + + private AgbNightWalk game; + + private PlatformType type = PlatformType.Flower; + + public void StartInput(double beat, double hitBeat) { - handler = handlerToPut; startBeat = beat; endBeat = hitBeat; if (startBeat < endBeat) @@ -23,6 +35,8 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk private void Awake() { + game = AgbNightWalk.instance; + anim = GetComponent(); Update(); } @@ -47,14 +61,18 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk private void ResetInput() { double newStartBeat = endBeat + (handler.platformCount * 0.5f); - Init(newStartBeat, newStartBeat + (handler.platformCount * 0.5f), handler); + anim.Play("Idle", 0, 0); + StartInput(newStartBeat, newStartBeat + (handler.platformCount * 0.5f)); } private void Just(PlayerActionEvent caller, float state) { + game.playYan.Jump(Conductor.instance.songPositionInBeats); if (state >= 1 || state <= -1) { return; } + SoundByte.PlayOneShotGame("nightWalkAgb/jump" + (int)type); + anim.DoScaledAnimationAsync("Flower", 0.5f); } private void Miss(PlayerActionEvent caller) diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs b/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs index 794934640..d45865160 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs @@ -28,7 +28,8 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk for (int i = 0; i < platformCount; i++) { AgbPlatform platform = Instantiate(platformRef, transform); - platform.Init(game.countInBeat + i + 8 - (platformCount * 0.5), game.countInBeat + i + 8, this); + platform.StartInput(game.countInBeat + i + 8 - (platformCount * 0.5), game.countInBeat + i + 8); + platform.handler = this; platform.gameObject.SetActive(true); } } @@ -37,7 +38,8 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk for (int i = 0; i < platformCount; i++) { AgbPlatform platform = Instantiate(platformRef, transform); - platform.Init(Math.Ceiling(beat) + i - (platformCount * 1.5), Math.Ceiling(beat) + i - platformCount, this); + platform.StartInput(Math.Ceiling(beat) + i - (platformCount * 1.5), Math.Ceiling(beat) + i - platformCount); + platform.handler = this; platform.gameObject.SetActive(true); } } diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbPlayYan.cs b/Assets/Scripts/Games/NightWalkAgb/AgbPlayYan.cs index a4bd210d9..c771b945c 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbPlayYan.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbPlayYan.cs @@ -6,20 +6,62 @@ using UnityEngine; namespace HeavenStudio.Games.Scripts_AgbNightWalk { - public class AgbPlayYan : MonoBehaviour + public class AgbPlayYan : SuperCurveObject { + private enum JumpingState + { + Flying, + Walking, + Jumping + } + private JumpingState jumpingState; private AgbNightWalk game; + private double jumpBeat; [SerializeField] private List balloons = new List(); + private Path jumpPath; private void Awake() { game = AgbNightWalk.instance; + jumpPath = game.GetPath("Jump"); foreach (var balloon in balloons) { balloon.Play("Idle", 0, UnityEngine.Random.Range(0f, 1f)); } } + private void Update() + { + var cond = Conductor.instance; + if (cond.isPlaying && !cond.isPaused) + { + switch (jumpingState) + { + case JumpingState.Jumping: + Vector3 pos = GetPathPositionFromBeat(jumpPath, Math.Min(jumpBeat + 1, cond.songPositionInBeatsAsDouble), jumpBeat); + transform.localPosition = pos; + float normalizedBeat = cond.GetPositionFromBeat(jumpBeat, 1); + if (normalizedBeat >= 1f) + { + jumpingState = JumpingState.Walking; + } + break; + case JumpingState.Walking: + transform.localPosition = Vector3.zero; + break; + case JumpingState.Flying: + transform.localPosition = Vector3.zero; + break; + } + } + } + + public void Jump(double beat) + { + jumpingState = JumpingState.Jumping; + jumpBeat = beat; + Update(); + } public void PopBalloon(int index, bool instant) { if (instant)