From be3c913c4ecef8f235d73d9445728342541b2a23 Mon Sep 17 00:00:00 2001 From: Braedon Date: Thu, 3 Feb 2022 17:20:26 -0500 Subject: [PATCH] Entity object parameters testing --- Assets/Scenes/Editor.unity | 1102 ++++++++++++++++- Assets/Scripts/Beatmap.cs | 19 + Assets/Scripts/Conductor.cs | 7 +- .../Games/ClappyTrio/ClappyTrioPlayer.cs | 4 +- Assets/Scripts/Games/ForkLifter/ForkLifter.cs | 5 +- .../Games/ForkLifter/ForkLifterPlayer.cs | 133 -- Assets/Scripts/Games/ForkLifter/Pea.cs | 4 +- Assets/Scripts/Games/KarateMan/Bomb.cs | 8 +- Assets/Scripts/Games/KarateMan/KarateJoe.cs | 2 +- Assets/Scripts/Games/KarateMan/Pot.cs | 16 +- Assets/Scripts/Games/SpaceSoccer/Ball.cs | 8 +- Assets/Scripts/Games/SpaceSoccer/Kicker.cs | 10 +- Assets/Scripts/Games/Spaceball/Alien.cs | 4 +- Assets/Scripts/Games/Spaceball/Spaceball.cs | 18 +- .../Scripts/Games/Spaceball/SpaceballBall.cs | 6 +- Assets/Scripts/LevelEditor/BoxSelection.cs | 10 +- Assets/Scripts/LevelEditor/Editor.cs | 77 +- .../EventSelector/EventParameterManager.cs | 76 ++ .../EventParameterManager.cs.meta | 11 + .../EventSelector/EventPropertyPrefab.cs | 37 + .../EventSelector/EventPropertyPrefab.cs.meta | 11 + .../Scripts/LevelEditor/Timeline/Timeline.cs | 2 +- .../LevelEditor/Timeline/TimelineEventObj.cs | 41 +- Assets/Scripts/Minigames.cs | 28 +- Assets/Scripts/Util/EntityTypes.cs | 23 + Assets/Scripts/Util/EntityTypes.cs.meta | 11 + .../Util/SwapEditorShortcutsOnPlayerFocus.cs | 4 +- 27 files changed, 1413 insertions(+), 264 deletions(-) create mode 100644 Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs create mode 100644 Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs.meta create mode 100644 Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs create mode 100644 Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs.meta create mode 100644 Assets/Scripts/Util/EntityTypes.cs create mode 100644 Assets/Scripts/Util/EntityTypes.cs.meta diff --git a/Assets/Scenes/Editor.unity b/Assets/Scenes/Editor.unity index 821d901a..635a0a1b 100644 --- a/Assets/Scenes/Editor.unity +++ b/Assets/Scenes/Editor.unity @@ -244,6 +244,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3236230} m_CullTransparentMesh: 1 +--- !u!1 &5490983 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5490984} + - component: {fileID: 5490986} + - component: {fileID: 5490985} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5490984 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5490983} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 396879233} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 63.92, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &5490985 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5490983} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Integer + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: c2df694f599b22b42817910ff570a9df, type: 2} + m_sharedMaterial: {fileID: -5829441969153149921, guid: c2df694f599b22b42817910ff570a9df, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 20.5 + m_fontSizeBase: 20 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &5490986 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5490983} + m_CullTransparentMesh: 1 --- !u!1 &9435780 GameObject: m_ObjectHideFlags: 0 @@ -529,6 +663,81 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 93132552} m_CullTransparentMesh: 1 +--- !u!1 &110654309 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 110654310} + - component: {fileID: 110654312} + - component: {fileID: 110654311} + m_Layer: 5 + m_Name: GameEventSelectorBG + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &110654310 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 110654309} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1050802356} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 120.81002, y: -0.0011005} + m_SizeDelta: {x: 578.36, y: 314.07} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &110654311 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 110654309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.09019608, g: 0.09019608, b: 0.09019608, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &110654312 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 110654309} + m_CullTransparentMesh: 1 --- !u!1 &112206233 GameObject: m_ObjectHideFlags: 0 @@ -2034,7 +2243,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1050802356} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -2481,7 +2690,7 @@ GameObject: - component: {fileID: 307892649} - component: {fileID: 307892648} m_Layer: 5 - m_Name: Text (TMP) + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2526,7 +2735,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 'Playback Speed: 1.0x' + m_text: 'Playback Speed: 1x' m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 78e7291cdeccdfc4fa61249845605144, type: 2} m_sharedMaterial: {fileID: 5250768452915780979, guid: 78e7291cdeccdfc4fa61249845605144, type: 2} @@ -2898,6 +3107,60 @@ MonoBehaviour: m_EditorClassIdentifier: m_Padding: {x: 0, y: 0, z: 0, w: 0} m_Softness: {x: 0, y: 0} +--- !u!1 &396879232 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 396879233} + - component: {fileID: 396879234} + m_Layer: 5 + m_Name: Integer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &396879233 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 396879232} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 5490984} + - {fileID: 1182082594} + - {fileID: 2067224778} + m_Father: {fileID: 830452352} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 288.675, y: -25} + m_SizeDelta: {x: 537.35, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &396879234 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 396879232} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b7c76a246115c1459c963e93f7db056, type: 3} + m_Name: + m_EditorClassIdentifier: + caption: {fileID: 5490985} + slider: {fileID: 2067224779} + parameterManager: {fileID: 830452354} --- !u!1 &411779173 GameObject: m_ObjectHideFlags: 0 @@ -3992,6 +4255,57 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 529053005} m_CullTransparentMesh: 1 +--- !u!1 &530463410 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 530463411} + - component: {fileID: 530463412} + m_Layer: 5 + m_Name: Text Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &530463411 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 530463410} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1453521078} + m_Father: {fileID: 1182082594} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &530463412 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 530463410} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: {x: -8, y: -5, z: -8, w: -5} + m_Softness: {x: 0, y: 0} --- !u!1 &547319782 GameObject: m_ObjectHideFlags: 0 @@ -4363,7 +4677,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1050802356} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} @@ -4438,7 +4752,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1050802356} - m_RootOrder: 7 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -4982,6 +5296,81 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 619942672} m_CullTransparentMesh: 1 +--- !u!1 &626268481 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 626268482} + - component: {fileID: 626268484} + - component: {fileID: 626268483} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &626268482 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 626268481} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2067224778} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &626268483 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 626268481} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &626268484 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 626268481} + m_CullTransparentMesh: 1 --- !u!1 &643814082 GameObject: m_ObjectHideFlags: 0 @@ -5012,7 +5401,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1050802356} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} @@ -6468,6 +6857,42 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 820032004} m_CullTransparentMesh: 1 +--- !u!1 &829406322 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 829406323} + m_Layer: 5 + m_Name: Fill Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &829406323 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 829406322} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1296765242} + m_Father: {fileID: 2067224778} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: -5, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &830452351 GameObject: m_ObjectHideFlags: 0 @@ -6477,6 +6902,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 830452352} + - component: {fileID: 830452353} + - component: {fileID: 830452354} m_Layer: 5 m_Name: EventProperties m_TagString: Untagged @@ -6494,15 +6921,64 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] + m_Children: + - {fileID: 396879233} m_Father: {fileID: 1050802356} - m_RootOrder: 8 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 120.83, y: -19.691} m_SizeDelta: {x: 576.29, y: 270.69} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &830452353 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 830452351} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 20 + m_Right: 20 + m_Top: 10 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &830452354 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 830452351} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c8ae907a3485c8a43b30312182de8b1b, type: 3} + m_Name: + m_EditorClassIdentifier: + eventSelector: {fileID: 1056099131} + IntegerP: {fileID: 396879232} + entity: + beat: 0 + track: 0 + length: 0 + valA: 0 + type: 0 + datamodel: + eventObj: {fileID: 0} --- !u!1 &830672828 GameObject: m_ObjectHideFlags: 0 @@ -7360,6 +7836,42 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 983551348} m_CullTransparentMesh: 1 +--- !u!1 &989912616 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 989912617} + m_Layer: 5 + m_Name: Handle Slide Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &989912617 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989912616} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1534220299} + m_Father: {fileID: 2067224778} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &991363086 GameObject: m_ObjectHideFlags: 0 @@ -7825,6 +8337,7 @@ RectTransform: m_Children: - {fileID: 156962254} - {fileID: 1154875943} + - {fileID: 110654310} - {fileID: 1056099132} - {fileID: 1997273393} - {fileID: 566999363} @@ -7983,9 +8496,9 @@ GameObject: m_Component: - component: {fileID: 1056099132} - component: {fileID: 1056099134} - - component: {fileID: 1056099133} - component: {fileID: 1056099135} - component: {fileID: 1056099136} + - component: {fileID: 1056099133} m_Layer: 5 m_Name: GameEventSelector m_TagString: Untagged @@ -8006,7 +8519,7 @@ RectTransform: m_Children: - {fileID: 590210126} m_Father: {fileID: 1050802356} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -8026,7 +8539,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.09019608, g: 0.09019608, b: 0.09019608, a: 1} + m_Color: {r: 0.09019608, g: 0.09019608, b: 0.09019608, a: 0} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -8828,6 +9341,183 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1162892833} m_CullTransparentMesh: 1 +--- !u!1 &1182082593 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1182082594} + - component: {fileID: 1182082597} + - component: {fileID: 1182082596} + - component: {fileID: 1182082595} + m_Layer: 5 + m_Name: InputField (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1182082594 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1182082593} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 530463411} + m_Father: {fileID: 396879233} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 68.92, y: 0} + m_SizeDelta: {x: 50, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &1182082595 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1182082593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1182082596} + m_TextViewport: {fileID: 530463411} + m_TextComponent: {fileID: 1453521079} + m_Placeholder: {fileID: 0} + m_VerticalScrollbar: {fileID: 0} + m_VerticalScrollbarEventHandler: {fileID: 0} + m_LayoutGroup: {fileID: 0} + m_ScrollSensitivity: 1 + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_HideSoftKeyboard: 0 + m_CharacterValidation: 0 + m_RegexValue: + m_GlobalPointSize: 14 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnSelect: + m_PersistentCalls: + m_Calls: [] + m_OnDeselect: + m_PersistentCalls: + m_Calls: [] + m_OnTextSelection: + m_PersistentCalls: + m_Calls: [] + m_OnEndTextSelection: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_OnTouchScreenKeyboardStatusChanged: + m_PersistentCalls: + m_Calls: [] + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: '0 + +' + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 + m_RichText: 1 + m_GlobalFontAsset: {fileID: 11400000, guid: c2df694f599b22b42817910ff570a9df, type: 2} + m_OnFocusSelectAll: 1 + m_ResetOnDeActivation: 1 + m_RestoreOriginalTextOnEscape: 1 + m_isRichTextEditingAllowed: 0 + m_LineLimit: 0 + m_InputValidator: {fileID: 0} +--- !u!114 &1182082596 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1182082593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1182082597 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1182082593} + m_CullTransparentMesh: 1 --- !u!1 &1196204502 GameObject: m_ObjectHideFlags: 0 @@ -9865,6 +10555,81 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1287203019} m_CullTransparentMesh: 1 +--- !u!1 &1296765241 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1296765242} + - component: {fileID: 1296765244} + - component: {fileID: 1296765243} + m_Layer: 5 + m_Name: Fill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1296765242 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1296765241} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 829406323} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1296765243 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1296765241} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1296765244 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1296765241} + m_CullTransparentMesh: 1 --- !u!1 &1310571273 GameObject: m_ObjectHideFlags: 0 @@ -10460,6 +11225,140 @@ MonoBehaviour: layer: {fileID: 1906769994} tempoLayer: {fileID: 1511927534} musicLayer: {fileID: 954835807} +--- !u!1 &1453521077 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1453521078} + - component: {fileID: 1453521080} + - component: {fileID: 1453521079} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1453521078 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1453521077} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 530463411} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1453521079 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1453521077} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "0\n\u200B" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: c2df694f599b22b42817910ff570a9df, type: 2} + m_sharedMaterial: {fileID: -5829441969153149921, guid: c2df694f599b22b42817910ff570a9df, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 1 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1453521080 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1453521077} + m_CullTransparentMesh: 1 --- !u!1 &1462347073 GameObject: m_ObjectHideFlags: 0 @@ -10988,6 +11887,81 @@ MonoBehaviour: m_EditorClassIdentifier: snap: 1 count: 0 +--- !u!1 &1534220298 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1534220299} + - component: {fileID: 1534220301} + - component: {fileID: 1534220300} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1534220299 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1534220298} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 989912617} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1534220300 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1534220298} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1534220301 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1534220298} + m_CullTransparentMesh: 1 --- !u!1 &1549727851 GameObject: m_ObjectHideFlags: 0 @@ -13488,7 +14462,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Navigation: - m_Mode: 3 + m_Mode: 0 m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} @@ -13597,7 +14571,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1050802356} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 1} @@ -14154,6 +15128,108 @@ MonoBehaviour: m_EditorClassIdentifier: m_Padding: {x: 0, y: 0, z: 0, w: 0} m_Softness: {x: 0, y: 0} +--- !u!1 &2067224777 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2067224778} + - component: {fileID: 2067224779} + m_Layer: 5 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2067224778 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2067224777} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 626268482} + - {fileID: 829406323} + - {fileID: 989912617} + m_Father: {fileID: 396879233} + m_RootOrder: 2 + 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: 61.96001, y: 0.0000097752} + m_SizeDelta: {x: -123.92, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2067224779 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2067224777} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1534220300} + m_FillRect: {fileID: 1296765242} + m_HandleRect: {fileID: 1534220299} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 1 + m_Value: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 396879234} + m_TargetAssemblyTypeName: RhythmHeavenMania.Editor.EventPropertyPrefab, Assembly-CSharp + m_MethodName: TestChange + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &2127582756 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Beatmap.cs b/Assets/Scripts/Beatmap.cs index 3ad72256..cdf4ff30 100644 --- a/Assets/Scripts/Beatmap.cs +++ b/Assets/Scripts/Beatmap.cs @@ -26,6 +26,25 @@ namespace RhythmHeavenMania { return this.MemberwiseClone(); } + + public object this[string propertyName] + { + get + { + return typeof(Entity).GetField(propertyName).GetValue(this); + } + set + { + try + { + typeof(Entity).GetField(propertyName).SetValue(this, value); + } + catch (Exception ex) + { + UnityEngine.Debug.LogError($"You probably misspelled a paramater, or defined the object type wrong. Exception log: {ex}"); + } + } + } } [Serializable] diff --git a/Assets/Scripts/Conductor.cs b/Assets/Scripts/Conductor.cs index 1abb1dab..702025e8 100644 --- a/Assets/Scripts/Conductor.cs +++ b/Assets/Scripts/Conductor.cs @@ -153,7 +153,12 @@ namespace RhythmHeavenMania return result; } - public float GetLoopPositionFromBeat(float startBeat, float length) + public float GetLoopPositionFromBeat(float beatOffset, float length) + { + return Mathf.Repeat(songPositionInBeats + beatOffset, length); + } + + public float GetPositionFromBeat(float startBeat, float length) { float a = Mathp.Normalize(songPositionInBeats, startBeat, startBeat + length); return a; diff --git a/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs b/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs index 6a88b78f..5516f253 100644 --- a/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs +++ b/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs @@ -20,7 +20,7 @@ namespace RhythmHeavenMania.Games.ClappyTrio public bool canHit; private GameObject clapEffect; - int aceTimes = 0; + new int aceTimes = 0; private void Start() { @@ -45,7 +45,7 @@ namespace RhythmHeavenMania.Games.ClappyTrio if (clapVacant == true) { - float normalizedBeat = (Conductor.instance.GetLoopPositionFromBeat(lastClapBeat, lastClapLength)); + float normalizedBeat = (Conductor.instance.GetPositionFromBeat(lastClapBeat, lastClapLength)); /*if (normalizedBeat > Minigame.EarlyTime() && normalizedBeat < Minigame.PerfectTime() && lastIndex == 0) { diff --git a/Assets/Scripts/Games/ForkLifter/ForkLifter.cs b/Assets/Scripts/Games/ForkLifter/ForkLifter.cs index 0eb882be..3226a37a 100644 --- a/Assets/Scripts/Games/ForkLifter/ForkLifter.cs +++ b/Assets/Scripts/Games/ForkLifter/ForkLifter.cs @@ -39,8 +39,9 @@ namespace RhythmHeavenMania.Games.ForkLifter handAnim.Play("Hand_Flick", 0, 0); GameObject fo = Instantiate(flickedObject); fo.transform.parent = flickedObject.transform.parent; - fo.GetComponent().startBeat = beat; - fo.GetComponent().type = type; + Pea pea = fo.GetComponent(); + pea.startBeat = beat; + pea.type = type; fo.SetActive(true); } } diff --git a/Assets/Scripts/Games/ForkLifter/ForkLifterPlayer.cs b/Assets/Scripts/Games/ForkLifter/ForkLifterPlayer.cs index 102c9f54..caf7cabe 100644 --- a/Assets/Scripts/Games/ForkLifter/ForkLifterPlayer.cs +++ b/Assets/Scripts/Games/ForkLifter/ForkLifterPlayer.cs @@ -119,139 +119,6 @@ namespace RhythmHeavenMania.Games.ForkLifter public void Stab(Pea p) { if (isEating) return; - /*var EligibleHits = ForkLifter.instance.EligibleHits; - bool canHit = (ForkLifter.instance.EligibleHits.Count > 0) && (currentHitInList < ForkLifter.instance.EligibleHits.Count); - - int events = ForkLifter.instance.MultipleEventsAtOnce(); - - for (int pt = 0; pt < events; pt++) - { - if (canHit) - { - GameObject pea = new GameObject(); - - if (EligibleHits[currentHitInList].perfect) - { - pea.transform.parent = perfect.transform; - pea.transform.localScale = Vector2.one; - - pea.transform.localPosition = Vector3.zero; - - for (int i = 0; i < perfect.transform.childCount; i++) - { - perfect.transform.GetChild(i).transform.localPosition = new Vector3(0, (-1.67f - (0.15724f * i)) + 0.15724f * currentPerfectPeasOnFork); - } - - SpriteRenderer psprite = pea.AddComponent(); - psprite.sprite = ForkLifter.instance.peaHitSprites[EligibleHits[currentHitInList].gameObject.GetComponent().type]; - psprite.sortingOrder = 20; - switch (EligibleHits[currentHitInList].gameObject.GetComponent().type) - { - case 0: - psprite.sortingOrder = 101; - break; - case 1: - psprite.sortingOrder = 104; - break; - case 2: - psprite.sortingOrder = 103; - break; - case 3: - psprite.sortingOrder = 102; - break; - } - - GameObject hitFXo = new GameObject(); - hitFXo.transform.localPosition = new Vector3(1.9969f, -3.7026f); - hitFXo.transform.localScale = new Vector3(3.142196f, 3.142196f); - SpriteRenderer hfxs = hitFXo.AddComponent(); - hfxs.sprite = hitFX; - hfxs.sortingOrder = 100; - hfxs.DOColor(new Color(1, 1, 1, 0), 0.05f).OnComplete(delegate { Destroy(hitFXo); }); - - FastEffectHit(ForkLifter.instance.EligibleHits[currentHitInList].gameObject.GetComponent().type); - - Jukebox.PlayOneShotGame("forkLifter/stab"); - - currentPerfectPeasOnFork++; - - if (EligibleHits[currentHitInList].gameObject.GetComponent().type == 1) - { - topbun = true; - } - else if (EligibleHits[currentHitInList].gameObject.GetComponent().type == 2) - { - middleburger = true; - } - else if (EligibleHits[currentHitInList].gameObject.GetComponent().type == 3) - { - bottombun = true; - } - - RemovePea(); - - GameProfiler.instance.IncreaseScore(); - } - else if (EligibleHits[currentHitInList].early) - { - pea.transform.parent = early.transform; - pea.transform.localScale = Vector2.one; - - pea.transform.localPosition = Vector3.zero; - pea.transform.localRotation = Quaternion.Euler(0, 0, 90); - - for (int i = 0; i < early.transform.childCount; i++) - { - early.transform.GetChild(i).transform.localPosition = new Vector3(0, (-1.67f - (0.15724f * i)) + 0.15724f * currentEarlyPeasOnFork); - } - - SpriteRenderer psprite = pea.AddComponent(); - psprite.sprite = ForkLifter.instance.peaHitSprites[EligibleHits[currentHitInList].gameObject.GetComponent().type]; - psprite.sortingOrder = 20; - HitFXMiss(new Vector2(1.0424f, -4.032f), new Vector2(1.129612f, 1.129612f)); - HitFXMiss(new Vector2(0.771f, -3.016f), new Vector2(1.71701f, 1.71701f)); - HitFXMiss(new Vector2(2.598f, -2.956f), new Vector2(1.576043f, 1.576043f)); - HitFXMiss(new Vector2(2.551f, -3.609f), new Vector2(1.200788f, 1.200788f)); - - FastEffectHit(ForkLifter.instance.EligibleHits[currentHitInList].gameObject.GetComponent().type); - - Jukebox.PlayOneShot("miss"); - - currentEarlyPeasOnFork++; - - RemovePea(); - } - else if (EligibleHits[currentHitInList].late) - { - pea.transform.parent = late.transform; - pea.transform.localScale = Vector2.one; - - pea.transform.localPosition = Vector3.zero; - pea.transform.localRotation = Quaternion.Euler(0, 0, 90); - - for (int i = 0; i < late.transform.childCount; i++) - { - late.transform.GetChild(i).transform.localPosition = new Vector3(0, (-1.67f - (0.15724f * i)) + 0.15724f * currentLatePeasOnFork); - } - - SpriteRenderer psprite = pea.AddComponent(); - psprite.sprite = ForkLifter.instance.peaHitSprites[EligibleHits[currentHitInList].gameObject.GetComponent().type]; - psprite.sortingOrder = 20; - HitFXMiss(new Vector2(1.0424f, -4.032f), new Vector2(1.129612f, 1.129612f)); - HitFXMiss(new Vector2(0.771f, -3.016f), new Vector2(1.71701f, 1.71701f)); - HitFXMiss(new Vector2(2.598f, -2.956f), new Vector2(1.576043f, 1.576043f)); - HitFXMiss(new Vector2(2.551f, -3.609f), new Vector2(1.200788f, 1.200788f)); - - FastEffectHit(ForkLifter.instance.EligibleHits[currentHitInList].gameObject.GetComponent().type); - - Jukebox.PlayOneShot("miss"); - - currentLatePeasOnFork++; - - RemovePea(); - } - } - }*/ if (p == null) { diff --git a/Assets/Scripts/Games/ForkLifter/Pea.cs b/Assets/Scripts/Games/ForkLifter/Pea.cs index 9f4dc923..20d57a37 100644 --- a/Assets/Scripts/Games/ForkLifter/Pea.cs +++ b/Assets/Scripts/Games/ForkLifter/Pea.cs @@ -166,11 +166,11 @@ namespace RhythmHeavenMania.Games.ForkLifter private void Update() { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(startBeat, 2.45f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(startBeat, 2.45f); anim.Play("Flicked_Object", -1, normalizedBeatAnim); anim.speed = 0; - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(startBeat, 2f); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, 2f); StateCheck(normalizedBeat); diff --git a/Assets/Scripts/Games/KarateMan/Bomb.cs b/Assets/Scripts/Games/KarateMan/Bomb.cs index 5dcc4b89..7d3962f7 100644 --- a/Assets/Scripts/Games/KarateMan/Bomb.cs +++ b/Assets/Scripts/Games/KarateMan/Bomb.cs @@ -51,12 +51,12 @@ namespace RhythmHeavenMania.Games.KarateMan { if (!missed) { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(startBeat, 1.25f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(startBeat, 1.25f); anim.Play("BombOut", 0, normalizedBeatAnim); anim.speed = 0; - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(startBeat, 0.75f); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, 0.75f); StateCheckNoList(normalizedBeat); @@ -88,7 +88,7 @@ namespace RhythmHeavenMania.Games.KarateMan } else { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(missBeat, 1f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(missBeat, 1f); anim.Play("BombMiss", 0, normalizedBeatAnim); anim.speed = 0; RotHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastRot.z, lastRot.z - 180, normalizedBeatAnim)); @@ -101,7 +101,7 @@ namespace RhythmHeavenMania.Games.KarateMan } else { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(hitBeat, 3f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(hitBeat, 3f); anim.Play("BombHit", 0, normalizedBeatAnim); anim.speed = 0; diff --git a/Assets/Scripts/Games/KarateMan/KarateJoe.cs b/Assets/Scripts/Games/KarateMan/KarateJoe.cs index 14da5d2f..587a7c2b 100644 --- a/Assets/Scripts/Games/KarateMan/KarateJoe.cs +++ b/Assets/Scripts/Games/KarateMan/KarateJoe.cs @@ -45,7 +45,7 @@ namespace RhythmHeavenMania.Games.KarateMan { if (inCombo) { - comboNormalizedBeat = Conductor.instance.GetLoopPositionFromBeat(comboBeat, 1); + comboNormalizedBeat = Conductor.instance.GetPositionFromBeat(comboBeat, 1); if (hitCombo) { diff --git a/Assets/Scripts/Games/KarateMan/Pot.cs b/Assets/Scripts/Games/KarateMan/Pot.cs index cdd2e93b..46d032fa 100644 --- a/Assets/Scripts/Games/KarateMan/Pot.cs +++ b/Assets/Scripts/Games/KarateMan/Pot.cs @@ -117,7 +117,7 @@ namespace RhythmHeavenMania.Games.KarateMan spriteComp.enabled = false; - float time2Destroy = Conductor.instance.GetLoopPositionFromBeat(createBeat, 4); + float time2Destroy = Conductor.instance.GetPositionFromBeat(createBeat, 4); if (time2Destroy >= 1) Destroy(this.gameObject); @@ -131,11 +131,11 @@ namespace RhythmHeavenMania.Games.KarateMan animTime = 2.27777777777f; } - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(startBeat, animTime); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(startBeat, animTime); anim.Play(throwAnim, 0, normalizedBeatAnim); anim.speed = 0; - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(startBeat, beatTime); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, beatTime); Shadow.transform.localScale = Vector3.Lerp(new Vector3(4.12f, 4.12f), new Vector3(0.34f, 0.34f), shadowCurveScale.Evaluate(normalizedBeatAnim)); Shadow.transform.localPosition = new Vector3(Mathf.Lerp(7.63f, endShadowThrowPos.x, shadowCurve.Evaluate(normalizedBeatAnim)), Mathf.Lerp(-12.26f, endShadowThrowPos.y, shadowCurve.Evaluate(normalizedBeatAnim))); @@ -210,8 +210,8 @@ namespace RhythmHeavenMania.Games.KarateMan if (!isHit && !isThrown) { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(hitBeat, 1.5f); - newHolder.transform.localPosition = new Vector3(transform.localPosition.x, Mathf.Lerp(0, 0.55f, Conductor.instance.GetLoopPositionFromBeat(hitBeat, 0.45f))); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(hitBeat, 1.5f); + newHolder.transform.localPosition = new Vector3(transform.localPosition.x, Mathf.Lerp(0, 0.55f, Conductor.instance.GetPositionFromBeat(hitBeat, 0.45f))); Holder.transform.localPosition = new Vector3(Mathf.Lerp(lastPos.x, 0.9f, normalizedBeatAnim), Mathf.Lerp(lastPos.y, -3.43f, missCurve.Evaluate(normalizedBeatAnim))); Holder.transform.GetChild(0).transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastRot, lastRot - 523.203f, normalizedBeatAnim)); Shadow.transform.localPosition = new Vector3(Mathf.Lerp(lastShadowX, 0.9f, normalizedBeatAnim), Shadow.transform.localPosition.y); @@ -221,7 +221,7 @@ namespace RhythmHeavenMania.Games.KarateMan { if (isHit) { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(hitBeat, 1.5f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(hitBeat, 1.5f); var y = Mathf.Lerp(lastPos.y, -3.27f, hitCurve.Evaluate(normalizedBeatAnim)); var x = Mathf.Lerp(lastPos.x, hitLength, hitCurveX.Evaluate(normalizedBeatAnim)); newHolder.transform.localPosition = new Vector3(transform.localPosition.x, Mathf.Lerp(0, 0.45f, hitCurveY.Evaluate(normalizedBeatAnim))); @@ -236,8 +236,8 @@ namespace RhythmHeavenMania.Games.KarateMan { if (isHit) { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(hitBeat, 1.5f); - newHolder.transform.localPosition = new Vector3(transform.localPosition.x, Mathf.Lerp(0, 0.55f, Conductor.instance.GetLoopPositionFromBeat(hitBeat, 0.45f))); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(hitBeat, 1.5f); + newHolder.transform.localPosition = new Vector3(transform.localPosition.x, Mathf.Lerp(0, 0.55f, Conductor.instance.GetPositionFromBeat(hitBeat, 0.45f))); Holder.transform.localPosition = new Vector3(Mathf.Lerp(lastPos.x, 0.9f, normalizedBeatAnim), Mathf.Lerp(lastPos.y, -3.43f, missCurve.Evaluate(normalizedBeatAnim))); Holder.transform.GetChild(0).transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastRot, lastRot - 523.203f, normalizedBeatAnim)); Shadow.transform.localPosition = new Vector3(Mathf.Lerp(lastShadowX, 0.9f, normalizedBeatAnim), Shadow.transform.localPosition.y); diff --git a/Assets/Scripts/Games/SpaceSoccer/Ball.cs b/Assets/Scripts/Games/SpaceSoccer/Ball.cs index abe2ab12..98cc37e6 100644 --- a/Assets/Scripts/Games/SpaceSoccer/Ball.cs +++ b/Assets/Scripts/Games/SpaceSoccer/Ball.cs @@ -111,7 +111,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer { if (dispensing) { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(dispensedBeat, 2.35f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(dispensedBeat, 2.35f); dispenseCurve.KeyPoints[0].transform.position = new Vector3(kicker.transform.position.x - 6f, kicker.transform.position.y - 6f); dispenseCurve.KeyPoints[1].transform.position = new Vector3(kicker.transform.position.x - 1f, kicker.transform.position.y - 6f); @@ -129,7 +129,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer } else if (kicked.enabled) { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(kicked.startBeat, 1.5f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(kicked.startBeat, 1.5f); if (!lastKickLeft) { @@ -162,7 +162,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer } else if (highKicked.enabled) { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(highKicked.startBeat, 1.8f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(highKicked.startBeat, 1.8f); highKickCurve.KeyPoints[1].transform.position = new Vector3(kicker.transform.position.x - 3.5f, kicker.transform.position.y - 6f); @@ -189,7 +189,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer } else if (toe.enabled) { - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(toe.startBeat, 1.85f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(toe.startBeat, 1.85f); if (!lastKickLeft) { diff --git a/Assets/Scripts/Games/SpaceSoccer/Kicker.cs b/Assets/Scripts/Games/SpaceSoccer/Kicker.cs index e08ace74..66f72f35 100644 --- a/Assets/Scripts/Games/SpaceSoccer/Kicker.cs +++ b/Assets/Scripts/Games/SpaceSoccer/Kicker.cs @@ -213,7 +213,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer { if (ball.dispensing) { - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(ball.dispensedBeat, 2f); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(ball.dispensedBeat, 2f); StateCheck(normalizedBeat, !player); CheckIfFall(normalizedBeat); @@ -234,7 +234,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer } else if (ball.kicked.enabled) { - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(ball.kicked.startBeat, 1f); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(ball.kicked.startBeat, 1f); StateCheck(normalizedBeat, !player); CheckIfFall(normalizedBeat); @@ -255,10 +255,10 @@ namespace RhythmHeavenMania.Games.SpaceSoccer } else if (ball.highKicked.enabled) { - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(ball.highKicked.startBeat, 1.5f); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(ball.highKicked.startBeat, 1.5f); if (!kickPrepare) { - float normalizedBeatPrepare = Conductor.instance.GetLoopPositionFromBeat(ball.highKicked.startBeat, 1f); + float normalizedBeatPrepare = Conductor.instance.GetPositionFromBeat(ball.highKicked.startBeat, 1f); StateCheck(normalizedBeatPrepare, !player); CheckIfFall(normalizedBeat); @@ -293,7 +293,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer } else if (ball.toe.enabled) { - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(ball.toe.startBeat, 1.5f); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(ball.toe.startBeat, 1.5f); StateCheck(normalizedBeat, !player); CheckIfFall(normalizedBeat); diff --git a/Assets/Scripts/Games/Spaceball/Alien.cs b/Assets/Scripts/Games/Spaceball/Alien.cs index 12ed1925..5f577e91 100644 --- a/Assets/Scripts/Games/Spaceball/Alien.cs +++ b/Assets/Scripts/Games/Spaceball/Alien.cs @@ -21,7 +21,7 @@ namespace RhythmHeavenMania.Games.Spaceball { if (Conductor.instance.isPlaying && !isShowing) { - // anim.Play("AlienSwing", 0, Conductor.instance.loopPositionInAnalog * 2); + anim.Play("AlienSwing", 0, Conductor.instance.GetLoopPositionFromBeat(0, 1f)); anim.speed = 0; } else if (!Conductor.instance.isPlaying) @@ -31,7 +31,7 @@ namespace RhythmHeavenMania.Games.Spaceball if (isShowing) { - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(showBeat, 1f); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(showBeat, 1f); anim.Play("AlienShow", 0, normalizedBeat); anim.speed = 0; diff --git a/Assets/Scripts/Games/Spaceball/Spaceball.cs b/Assets/Scripts/Games/Spaceball/Spaceball.cs index 4acae1be..66f36165 100644 --- a/Assets/Scripts/Games/Spaceball/Spaceball.cs +++ b/Assets/Scripts/Games/Spaceball/Spaceball.cs @@ -59,17 +59,6 @@ namespace RhythmHeavenMania.Games.Spaceball { /*try { - var allPlayerActions = EventCaller.GetAllPlayerEntities("spaceball"); - int currentPlayerEvent = GameManager.instance.currentPlayerEvent - EventCaller.GetAllPlayerEntitiesExceptBeforeBeat("spaceball", Conductor.instance.songPositionInBeats).Count; - - if (currentPlayerEvent < allPlayerActions.Count) - { - if (Conductor.instance.songPositionInBeats > allPlayerActions[currentPlayerEvent].beat - 1) - { - Dispenser.GetComponent().Play("DispenserPrepare", 0, 0); - } - } - if (currentZoomIndex < allCameraEvents.Count && currentZoomIndex >= 0) { if (Conductor.instance.songPositionInBeats >= allCameraEvents[currentZoomIndex].beat) @@ -79,7 +68,7 @@ namespace RhythmHeavenMania.Games.Spaceball } } - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(currentZoomCamBeat, currentZoomCamLength); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(currentZoomCamBeat, currentZoomCamLength); if (normalizedBeat > Minigame.EndTime()) { @@ -158,6 +147,11 @@ namespace RhythmHeavenMania.Games.Spaceball Dispenser.GetComponent().Play("DispenserShoot", 0, 0); } + public void PrepareDispenser() + { + Dispenser.GetComponent().Play("DispenserPrepare", 0, 0); + } + public void Costume(int type) { SpaceballPlayer.instance.SetCostume(type); diff --git a/Assets/Scripts/Games/Spaceball/SpaceballBall.cs b/Assets/Scripts/Games/Spaceball/SpaceballBall.cs index 02e9a4de..105412f6 100644 --- a/Assets/Scripts/Games/Spaceball/SpaceballBall.cs +++ b/Assets/Scripts/Games/Spaceball/SpaceballBall.cs @@ -81,7 +81,7 @@ namespace RhythmHeavenMania.Games.Spaceball { if (hit) { - float nba = Conductor.instance.GetLoopPositionFromBeat(hitBeat, 14); + float nba = Conductor.instance.GetPositionFromBeat(hitBeat, 14); Holder.transform.localPosition = Vector3.Lerp(hitPos, new Vector3(randomEndPosX, 0f, -600f), nba); Holder.transform.eulerAngles = Vector3.Lerp(new Vector3(0, 0, hitRot), new Vector3(0, 0, -2260), nba); } @@ -90,7 +90,7 @@ namespace RhythmHeavenMania.Games.Spaceball float beatLength = 1f; if (high) beatLength = 2f; - float normalizedBeatAnim = Conductor.instance.GetLoopPositionFromBeat(startBeat, beatLength + 0.15f); + float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(startBeat, beatLength + 0.15f); // print(normalizedBeatAnim + " " + Time.frameCount); if (high) @@ -104,7 +104,7 @@ namespace RhythmHeavenMania.Games.Spaceball anim.speed = 0; - float normalizedBeat = Conductor.instance.GetLoopPositionFromBeat(startBeat, beatLength); + float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, beatLength); StateCheck(normalizedBeat); diff --git a/Assets/Scripts/LevelEditor/BoxSelection.cs b/Assets/Scripts/LevelEditor/BoxSelection.cs index cb67080a..b9cb6361 100644 --- a/Assets/Scripts/LevelEditor/BoxSelection.cs +++ b/Assets/Scripts/LevelEditor/BoxSelection.cs @@ -22,6 +22,8 @@ namespace RhythmHeavenMania.Editor private bool clickedInTimeline = false; + private TMPro.TMP_Text sizeText; + public static BoxSelection instance { get; private set; } private void Awake() @@ -36,6 +38,8 @@ namespace RhythmHeavenMania.Editor Color boxCol = EditorTheme.theme.properties.BoxSelectionCol.Hex2RGB(); boxVisual.GetComponent().color = new Color(boxCol.r, boxCol.g, boxCol.b, 0.3f); boxVisual.transform.GetChild(0).GetComponent().color = EditorTheme.theme.properties.BoxSelectionOutlineCol.Hex2RGB(); + + sizeText = boxVisual.transform.GetChild(1).GetComponent(); } private void Update() @@ -57,9 +61,9 @@ namespace RhythmHeavenMania.Editor } if (boxVisual.rect.width * boxVisual.transform.localScale.x >= 0.5f) - boxVisual.transform.GetChild(1).GetComponent().text = $"{string.Format("{0:0.000}", boxVisual.rect.width * boxVisual.transform.localScale.x)}"; + sizeText.text = $"{string.Format("{0:0.000}", boxVisual.rect.width * boxVisual.transform.localScale.x)}"; else - boxVisual.transform.GetChild(1).GetComponent().text = string.Empty; // i'm lazy + sizeText.text = string.Empty; // i'm lazy // click @@ -162,7 +166,7 @@ namespace RhythmHeavenMania.Editor public Vector3 MousePosition() { - var mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); + var mousePos = Editor.instance.EditorCamera.ScreenToWorldPoint(Input.mousePosition); // var mousePos = new Vector2(); // RectTransformUtility.ScreenPointToLocalPointInRectangle(timelineContent, Input.mousePosition, Camera.main, out mousePos); return new Vector3(mousePos.x, mousePos.y, 0); diff --git a/Assets/Scripts/LevelEditor/Editor.cs b/Assets/Scripts/LevelEditor/Editor.cs index 2569a6fa..d4cc1dfb 100644 --- a/Assets/Scripts/LevelEditor/Editor.cs +++ b/Assets/Scripts/LevelEditor/Editor.cs @@ -50,6 +50,7 @@ namespace RhythmHeavenMania.Editor [Header("Properties")] private bool changedMusic = false; + private bool loadedMusic = false; private string currentRemixPath = ""; private int lastEditorObjectsCount = 0; private bool fullscreen; @@ -95,20 +96,6 @@ namespace RhythmHeavenMania.Editor public void LateUpdate() { - // This is buggy - /*if (Conductor.instance.isPlaying || Conductor.instance.isPaused) - { - GetComponent().enabled = false; - GetComponent().enabled = false; - GetComponent().enabled = false; - } - else - { - GetComponent().enabled = true; - GetComponent().enabled = true; - GetComponent().enabled = true; - }*/ - if (Input.GetKeyDown(KeyCode.Tab)) { Fullscreen(); @@ -147,23 +134,38 @@ namespace RhythmHeavenMania.Editor } if (Timeline.instance.timelineState.selected == true) - if (Input.GetMouseButtonUp(0)) { - List selectedEvents = Timeline.instance.eventObjs.FindAll(c => c.selected == true && c.eligibleToMove == true); + if (Input.GetMouseButtonUp(0)) + { + List selectedEvents = Timeline.instance.eventObjs.FindAll(c => c.selected == true && c.eligibleToMove == true); + + if (selectedEvents.Count > 0) + { + List result = new List(); + + for (int i = 0; i < selectedEvents.Count; i++) + { + if (selectedEvents[i].isCreating == false) + { + result.Add(selectedEvents[i]); + } + selectedEvents[i].OnUp(); + } + CommandManager.instance.Execute(new Commands.Move(result)); + } + } + } + + if (Input.GetMouseButtonUp(1)) + { + List selectedEvents = Timeline.instance.eventObjs.FindAll(c => c.selected == true); if (selectedEvents.Count > 0) { - List result = new List(); - for (int i = 0; i < selectedEvents.Count; i++) { - if (selectedEvents[i].isCreating == false) - { - result.Add(selectedEvents[i]); - } - selectedEvents[i].OnUp(); + // EventParameterManager.instance.StartParams(selectedEvents[i].entity); } - CommandManager.instance.Execute(new Commands.Move(result)); } } @@ -192,6 +194,14 @@ namespace RhythmHeavenMania.Editor } lastEditorObjectsCount = GameManager.instance.BeatmapEntities(); + + if (Application.isEditor) + { + if (Input.GetKeyDown(KeyCode.S)) + { + SaveRemix(false); + } + } } public static Sprite GameIcon(string name) @@ -217,11 +227,6 @@ namespace RhythmHeavenMania.Editor } } ); - - - // byte[] bytes = OggVorbis.VorbisPlugin.GetOggVorbis(Conductor.instance.musicSource.clip, 1); - // print(bytes.Length); - // OggVorbis.VorbisPlugin.Save(@"C:/Users/Braedon/Downloads/test.ogg", Conductor.instance.musicSource.clip, 1); } private async Task LoadClip(string path) @@ -301,7 +306,7 @@ namespace RhythmHeavenMania.Editor { using (FileStream zipFile = File.Open(path, FileMode.Create)) { - using (var archive = new ZipArchive(zipFile, ZipArchiveMode.Update, true)) + using (var archive = new ZipArchive(zipFile, ZipArchiveMode.Update)) { var levelFile = archive.CreateEntry("remix.json", System.IO.Compression.CompressionLevel.NoCompression); using (var zipStream = levelFile.Open()) @@ -362,6 +367,7 @@ namespace RhythmHeavenMania.Editor stream.CopyTo(ms); bytes = ms.ToArray(); Conductor.instance.musicSource.clip = OggVorbis.VorbisPlugin.ToAudioClip(bytes, "music"); + loadedMusic = true; } } } @@ -410,17 +416,6 @@ namespace RhythmHeavenMania.Editor return json; } - public void DebugSave() - { - // temp -#if UNITY_EDITOR - string path = UnityEditor.AssetDatabase.GetAssetPath(GameManager.instance.txt); - path = Application.dataPath.Remove(Application.dataPath.Length - 6, 6) + path; - System.IO.File.WriteAllText(path, JsonConvert.SerializeObject(GameManager.instance.Beatmap)); - Debug.Log("Saved to " + path); -#endif - } - public void SetGameEventTitle(string txt) { GameEventSelectorTitle.text = txt; diff --git a/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs b/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs new file mode 100644 index 00000000..24bdb242 --- /dev/null +++ b/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs @@ -0,0 +1,76 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace RhythmHeavenMania.Editor +{ + public class EventParameterManager : MonoBehaviour + { + [Header("General References")] + [SerializeField] private GameObject eventSelector; + + [Header("Property Prefabs")] + [SerializeField] private GameObject IntegerP; + + public Beatmap.Entity entity; + + public static EventParameterManager instance { get; set; } + + private void Awake() + { + instance = this; + } + + public void StartParams(Beatmap.Entity entity) + { + AddParams(entity); + } + + private void AddParams(Beatmap.Entity entity) + { + var minigame = EventCaller.instance.GetMinigame(entity.datamodel.Split(0)); + int actionIndex = minigame.actions.IndexOf(minigame.actions.Find(c => c.actionName == entity.datamodel.Split(1))); + Minigames.GameAction action = minigame.actions[actionIndex]; + + if (action.parameters != null) + { + eventSelector.SetActive(false); + this.entity = entity; + + Editor.instance.SetGameEventTitle($"Properties for {entity.datamodel}"); + + for (int i = 1; i < transform.childCount; i++) + { + Destroy(transform.GetChild(i).gameObject); + } + + for (int i = 0; i < action.parameters.Count; i++) + { + object param = action.parameters[i].parameter; + string caption = action.parameters[i].propertyCaption; + string propertyName = action.parameters[i].propertyName; + + AddParam(propertyName, param, caption); + } + } + } + + private void AddParam(string propertyName, object type, string caption) + { + GameObject prefab = IntegerP; + + if (type.GetType() == typeof(EntityTypes.Integer)) + { + prefab = IntegerP; + } + + GameObject input = Instantiate(prefab); + input.transform.SetParent(this.gameObject.transform); + input.SetActive(true); + input.transform.localScale = Vector2.one; + + var property = input.GetComponent(); + property.SetProperties(propertyName, type, caption); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs.meta b/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs.meta new file mode 100644 index 00000000..542daf02 --- /dev/null +++ b/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c8ae907a3485c8a43b30312182de8b1b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs b/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs new file mode 100644 index 00000000..8576fe24 --- /dev/null +++ b/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +using TMPro; + +namespace RhythmHeavenMania.Editor +{ + public class EventPropertyPrefab : MonoBehaviour + { + public TMP_Text caption; + public Slider slider; + public TMP_InputField inputField; + + private string propertyName; + + [SerializeField] private EventParameterManager parameterManager; + + public void SetProperties(string propertyName, object type, string caption) + { + this.propertyName = propertyName; + this.caption.text = caption; + + var integer = ((EntityTypes.Integer)type); + + slider.minValue = integer.min; + slider.maxValue = integer.max; + } + + public void TestChange() + { + inputField.text = slider.value.ToString(); + parameterManager.entity[propertyName] = (int)slider.value; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs.meta b/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs.meta new file mode 100644 index 00000000..d9fa55f9 --- /dev/null +++ b/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3b7c76a246115c1459c963e93f7db056 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs index e619a403..0120f38e 100644 --- a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs +++ b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs @@ -541,7 +541,7 @@ namespace RhythmHeavenMania.Editor.Track { if (Input.GetMouseButton(1)) { - PlaybackSpeed.transform.GetChild(3).GetComponent().text = $"Playback Speed: 1.0x"; + PlaybackSpeed.transform.GetChild(3).GetComponent().text = $"Playback Speed: 1x"; PlaybackSpeed.value = 1f; } } diff --git a/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs b/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs index 3aa2911a..4d44d699 100644 --- a/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs +++ b/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs @@ -146,20 +146,20 @@ namespace RhythmHeavenMania.Editor.Track { Vector3 mousePos = Editor.instance.EditorCamera.ScreenToWorldPoint(Input.mousePosition); - // lastPos_ = transform.localPosition; + lastPos_ = transform.localPosition; - // this.transform.position = new Vector3(mousePos.x - startPosX, mousePos.y - startPosY - 0.40f, 0); - // this.transform.localPosition = new Vector3(Mathf.Clamp(Mathp.Round2Nearest(this.transform.localPosition.x, 0.25f), 0, Mathf.Infinity), Timeline.instance.SnapToLayer(this.transform.localPosition.y)); - moveTemp.transform.position = new Vector3(mousePos.x - startPosX, mousePos.y - startPosY - 0.40f, 0); - moveTemp.transform.localPosition = new Vector3(Mathf.Clamp(Mathp.Round2Nearest(moveTemp.transform.localPosition.x, 0.25f), 0, Mathf.Infinity), Timeline.instance.SnapToLayer(moveTemp.transform.localPosition.y)); + this.transform.position = new Vector3(mousePos.x - startPosX, mousePos.y - startPosY - 0.40f, 0); + this.transform.localPosition = new Vector3(Mathf.Clamp(Mathp.Round2Nearest(this.transform.localPosition.x, 0.25f), 0, Mathf.Infinity), Timeline.instance.SnapToLayer(this.transform.localPosition.y)); + // moveTemp.transform.position = new Vector3(mousePos.x - startPosX, mousePos.y - startPosY - 0.40f, 0); + // moveTemp.transform.localPosition = new Vector3(Mathf.Clamp(Mathp.Round2Nearest(moveTemp.transform.localPosition.x, 0.25f), 0, Mathf.Infinity), Timeline.instance.SnapToLayer(moveTemp.transform.localPosition.y)); - if (lastPos != moveTemp.transform.localPosition) + if (lastPos != transform.localPosition) { OnMove(); - this.transform.DOLocalMove(new Vector3(Mathf.Clamp(Mathp.Round2Nearest(moveTemp.transform.localPosition.x, 0.25f), 0, Mathf.Infinity), Timeline.instance.SnapToLayer(moveTemp.transform.localPosition.y)), 0.15f).SetEase(Ease.OutExpo); + // this.transform.DOLocalMove(new Vector3(Mathf.Clamp(Mathp.Round2Nearest(moveTemp.transform.localPosition.x, 0.25f), 0, Mathf.Infinity), Timeline.instance.SnapToLayer(moveTemp.transform.localPosition.y)), 0.15f).SetEase(Ease.OutExpo); } - lastPos = moveTemp.transform.localPosition; + lastPos = transform.localPosition; } } else if (resizingLeft) @@ -231,20 +231,23 @@ namespace RhythmHeavenMania.Editor.Track public void OnDown() { - if (selected && Timeline.instance.timelineState.selected) + if (Input.GetMouseButton(0)) { - lastPos_ = transform.localPosition; - - for (int i = 0; i < Timeline.instance.eventObjs.Count; i++) + if (selected && Timeline.instance.timelineState.selected) { - Vector3 mousePos = Editor.instance.EditorCamera.ScreenToWorldPoint(Input.mousePosition); - Timeline.instance.eventObjs[i].startPosX = mousePos.x - Timeline.instance.eventObjs[i].transform.position.x; - Timeline.instance.eventObjs[i].startPosY = mousePos.y - Timeline.instance.eventObjs[i].transform.position.y; - } + lastPos_ = transform.localPosition; - moving = true; - // lastMovePos = transform.localPosition; - // OnComplete(); + for (int i = 0; i < Timeline.instance.eventObjs.Count; i++) + { + Vector3 mousePos = Editor.instance.EditorCamera.ScreenToWorldPoint(Input.mousePosition); + Timeline.instance.eventObjs[i].startPosX = mousePos.x - Timeline.instance.eventObjs[i].transform.position.x; + Timeline.instance.eventObjs[i].startPosY = mousePos.y - Timeline.instance.eventObjs[i].transform.position.y; + } + + moving = true; + // lastMovePos = transform.localPosition; + // OnComplete(); + } } } diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 362dcb7b..c683c4a2 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -42,13 +42,30 @@ namespace RhythmHeavenMania public EventCallback function; public float defaultLength; public bool resizable; + public List parameters; - public GameAction(string actionName, EventCallback function, float defaultLength = 1, bool resizable = false) + public GameAction(string actionName, EventCallback function, float defaultLength = 1, bool resizable = false, List parameters = null) { this.actionName = actionName; this.function = function; this.defaultLength = defaultLength; this.resizable = resizable; + this.parameters = parameters; + } + } + + [System.Serializable] + public class Param + { + public string propertyName; + public object parameter; + public string propertyCaption; + + public Param(string propertyName, object parameter, string propertyCaption) + { + this.propertyName = propertyName; + this.parameter = parameter; + this.propertyCaption = propertyCaption; } } @@ -106,11 +123,12 @@ namespace RhythmHeavenMania }), new Minigame("spaceball", "Spaceball", "00A518", false, false, new List() { - new GameAction("shoot", delegate { Spaceball.instance.Shoot(eventCaller.currentBeat, false, eventCaller.currentType); }, 2), + new GameAction("shoot", delegate { Spaceball.instance.Shoot(eventCaller.currentBeat, false, eventCaller.currentType); }, 2, false), new GameAction("shootHigh", delegate { Spaceball.instance.Shoot(eventCaller.currentBeat, true, eventCaller.currentType); }, 3), - new GameAction("costume", delegate { Spaceball.instance.Costume(eventCaller.currentType); } ), + new GameAction("costume", delegate { Spaceball.instance.Costume(eventCaller.currentType); }, 1f, false, new List() { new Param("type", new EntityTypes.Integer(0, 2), "type") } ), new GameAction("alien", delegate { Spaceball.instance.alien.Show(eventCaller.currentBeat); } ), - new GameAction("cameraZoom", delegate { }, 4, true ), + new GameAction("camera", delegate { }, 4, true ), + new GameAction("prepare dispenser", delegate { Spaceball.instance.PrepareDispenser(); }, 1 ), }), new Minigame("karateman", "Karate Man", "70A8D8", false, false, new List() { @@ -139,7 +157,7 @@ namespace RhythmHeavenMania new GameAction("break c'mon ooh", delegate { DJSchool.instance.BreakCmon(eventCaller.currentBeat); }, 3f), new GameAction("scratch-o hey", delegate { DJSchool.instance.ScratchoHey(eventCaller.currentBeat); }, 3f), }), - /*new Minigame("rhythmRally", "Rhythm Rally", "B888F8", true, new List() + /*new Minigame("rhythmRally", "Rhythm Rally", "B888F8", true, false, new List() { }), diff --git a/Assets/Scripts/Util/EntityTypes.cs b/Assets/Scripts/Util/EntityTypes.cs new file mode 100644 index 00000000..e8689958 --- /dev/null +++ b/Assets/Scripts/Util/EntityTypes.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace RhythmHeavenMania +{ + public class EntityTypes + { + public struct Integer + { + public int min; + public int val; + public int max; + + public Integer(int min, int max, int val = 0) + { + this.min = min; + this.val = val; + this.max = max; + } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Util/EntityTypes.cs.meta b/Assets/Scripts/Util/EntityTypes.cs.meta new file mode 100644 index 00000000..bf617815 --- /dev/null +++ b/Assets/Scripts/Util/EntityTypes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e1956b6aa51cd2a46869d3e2289fbf4e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Util/SwapEditorShortcutsOnPlayerFocus.cs b/Assets/Scripts/Util/SwapEditorShortcutsOnPlayerFocus.cs index ceeb1d86..076ec238 100644 --- a/Assets/Scripts/Util/SwapEditorShortcutsOnPlayerFocus.cs +++ b/Assets/Scripts/Util/SwapEditorShortcutsOnPlayerFocus.cs @@ -1,11 +1,9 @@ -using UnityEngine; #if UNITY_EDITOR +using UnityEngine; using UnityEditor; using UnityEditor.ShortcutManagement; -#endif using System.Linq; -#if UNITY_EDITOR [InitializeOnLoad] public class SwitchShortcutsProfileOnPlay {