diff --git a/Assets/Resources/Games/mrUpbeat.prefab b/Assets/Resources/Games/mrUpbeat.prefab index 1582b203..a3867d42 100644 --- a/Assets/Resources/Games/mrUpbeat.prefab +++ b/Assets/Resources/Games/mrUpbeat.prefab @@ -102,6 +102,88 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &1456959186295915410 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5608637247423934025} + - component: {fileID: 221372749823643444} + m_Layer: 0 + m_Name: FallSmear + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &5608637247423934025 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1456959186295915410} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.006, y: 0.76, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1584116570229233278} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &221372749823643444 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1456959186295915410} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + 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: -4427745735040970447, guid: 2781bda31bd88924b9bc88f6c301b1d9, 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.2916667, y: 1.1041666} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &1488695648487991734 GameObject: m_ObjectHideFlags: 0 @@ -318,6 +400,88 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &2958265234527974793 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8709428748473264351} + - component: {fileID: 1940123820260150204} + m_Layer: 0 + m_Name: FallFX + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &8709428748473264351 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2958265234527974793} + m_LocalRotation: {x: 0, y: 0, z: 1, w: 0} + m_LocalPosition: {x: 0.556, y: -0.074, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1584116570229233278} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180} +--- !u!212 &1940123820260150204 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2958265234527974793} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + 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: 5270992882044302245, guid: 2781bda31bd88924b9bc88f6c301b1d9, 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.2916667, y: 1.1041666} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &3862020474253857803 GameObject: m_ObjectHideFlags: 0 @@ -595,6 +759,8 @@ Transform: m_Children: - {fileID: 2124424146951847609} - {fileID: 3332517713256108722} + - {fileID: 5608637247423934025} + - {fileID: 8709428748473264351} m_Father: {fileID: 1584121333826078951} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -783,6 +949,7 @@ MonoBehaviour: metronome: {fileID: 3862020474253857803} man: {fileID: 8160414645038680372} canGo: 0 + beatCount: 0 --- !u!1 &8412912829583803381 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/Sprites/Games/MrUpbeat/Animations/Fall.anim b/Assets/Resources/Sprites/Games/MrUpbeat/Animations/Fall.anim index da82216e..5321ce29 100644 --- a/Assets/Resources/Sprites/Games/MrUpbeat/Animations/Fall.anim +++ b/Assets/Resources/Sprites/Games/MrUpbeat/Animations/Fall.anim @@ -14,24 +14,186 @@ AnimationClip: m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] - m_PositionCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: -0.09, y: 0.4, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + 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.09, y: 0.43, z: 0} + inSlope: {x: 0, y: 3.6, z: 0} + outSlope: {x: 0, y: 3.6, z: 0} + 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.033333335 + value: {x: -0.03, y: 0.53, z: 0} + inSlope: {x: 0, y: 4.799999, z: 0} + outSlope: {x: 0, y: 4.799999, z: 0} + 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.05 + value: {x: -0.03, y: 0.59, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + 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: Head m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] + 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.016666668 + 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: Body/FallSmear + 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 + - serializedVersion: 3 + time: 0.016666668 + 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: Body/FallFX + classID: 1 + script: {fileID: 0} + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 910123527689434379, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + - time: 0.016666668 + value: {fileID: 7267509016467870925, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + - time: 0.033333335 + value: {fileID: -5599596391108488658, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + - time: 0.05 + value: {fileID: -3983884386284601651, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + attribute: m_Sprite + path: Body + classID: 212 + script: {fileID: 0} + - curve: + - time: 0 + value: {fileID: 442070513753258848, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + - time: 0.05 + value: {fileID: -1641719250182597347, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + attribute: m_Sprite + path: Head + 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: [] - pptrCurveMapping: [] + genericBindings: + - serializedVersion: 2 + path: 130111906 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 4033203276 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 3235357039 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 2073732236 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + - serializedVersion: 2 + path: 130111906 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 910123527689434379, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + - {fileID: 7267509016467870925, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + - {fileID: -5599596391108488658, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + - {fileID: -3983884386284601651, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + - {fileID: 442070513753258848, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} + - {fileID: -1641719250182597347, guid: 2781bda31bd88924b9bc88f6c301b1d9, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 - m_StopTime: 1 + m_StopTime: 0.06666667 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 @@ -46,7 +208,165 @@ AnimationClip: m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 - m_EditorCurves: [] + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -0.09 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.016666668 + value: -0.09 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.033333335 + value: -0.03 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Head + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.4 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.016666668 + value: 0.43 + inSlope: 3.6 + outSlope: 3.6 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.033333335 + value: 0.53 + inSlope: 4.799999 + outSlope: 4.799999 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.05 + value: 0.59 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Head + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Head + 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.016666668 + 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: Body/FallSmear + 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 + - serializedVersion: 3 + time: 0.016666668 + 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: Body/FallFX + classID: 1 + script: {fileID: 0} m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 diff --git a/Assets/Resources/Sprites/Games/MrUpbeat/mrupbeat_main.png.meta b/Assets/Resources/Sprites/Games/MrUpbeat/mrupbeat_main.png.meta index b7897c45..20fa8bba 100644 --- a/Assets/Resources/Sprites/Games/MrUpbeat/mrupbeat_main.png.meta +++ b/Assets/Resources/Sprites/Games/MrUpbeat/mrupbeat_main.png.meta @@ -64,10 +64,10 @@ TextureImporter: second: mrupbeat_fall_2 - first: 213: -1109266650601169752 - second: mrupbeat_fall_3 + second: mrupbeat_fall_2 - first: 213: -3983884386284601651 - second: mrupbeat_fall_4 + second: mrupbeat_fall_3 externalObjects: {} serializedVersion: 11 mipmaps: @@ -521,8 +521,8 @@ TextureImporter: y: 433 width: 110 height: 77 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 9 + pivot: {x: 0.23131311, y: 0.2206722} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -542,8 +542,8 @@ TextureImporter: y: 361 width: 110 height: 69 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 9 + pivot: {x: 0.25480798, y: 0.24740025} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -557,35 +557,14 @@ TextureImporter: weights: [] - serializedVersion: 2 name: mrupbeat_fall_2 - rect: - serializedVersion: 2 - x: 1 - y: 289 - width: 110 - height: 69 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: e225b6e00cc3a42b0800000000000000 - internalID: -5599596391108488658 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: mrupbeat_fall_3 rect: serializedVersion: 2 x: 1 y: 225 width: 110 height: 61 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 9 + pivot: {x: 0.19380306, y: 0.24692748} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -598,15 +577,15 @@ TextureImporter: edges: [] weights: [] - serializedVersion: 2 - name: mrupbeat_fall_4 + name: mrupbeat_fall_3 rect: serializedVersion: 2 x: 1 y: 161 width: 110 height: 61 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 9 + pivot: {x: 0.1929862, y: 0.21257469} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] diff --git a/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs b/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs index 4dea3eda..db3d939f 100644 --- a/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs +++ b/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs @@ -17,7 +17,7 @@ namespace RhythmHeavenMania.Games.MrUpbeat public GameEvent beat = new GameEvent(); public GameEvent offbeat = new GameEvent(); public bool canGo = false; - private int beatCount = 0; + public int beatCount = 0; public static MrUpbeat instance; @@ -26,13 +26,15 @@ namespace RhythmHeavenMania.Games.MrUpbeat instance = this; } + private void Start() + { + canGo = false; + man.stepTimes = 0; + SetInterval(0); + } + private void Update() { - if (canGo) - metronome.transform.eulerAngles = new Vector3(0, 0, 270 - Mathf.Cos(Mathf.PI * Conductor.instance.songPositionInBeats) * 75); - //else - // metronome.transform.eulerAngles = new Vector3(0, 0, 200); - List gos = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "mrUpbeat/go"); for(int i=0; i Minigame.LateTime()) { - //Fall(); + if ((game.beatCount % 2 == 0 && stepTimes % 2 == 0) || (game.beatCount % 2 == 1 && stepTimes % 2 == 1)) + { + Fall(); + } targetBeat += 100f; return; }