diff --git a/Assets/Bundled/Games/BuiltToScaleDS/Sounds/PianoPreview.ogg b/Assets/Bundled/Games/BuiltToScaleDS/Sounds/PianoPreview.ogg deleted file mode 100644 index 6448d4d5a..000000000 Binary files a/Assets/Bundled/Games/BuiltToScaleDS/Sounds/PianoPreview.ogg and /dev/null differ diff --git a/Assets/Bundled/Games/BuiltToScaleDS/Sounds/PianoPreview.ogg.meta b/Assets/Bundled/Games/BuiltToScaleDS/Sounds/PianoPreview.ogg.meta deleted file mode 100644 index 07c1871ee..000000000 --- a/Assets/Bundled/Games/BuiltToScaleDS/Sounds/PianoPreview.ogg.meta +++ /dev/null @@ -1,22 +0,0 @@ -fileFormatVersion: 2 -guid: 32a60be2b7dcb764a91b761a6a3d3022 -AudioImporter: - externalObjects: {} - serializedVersion: 6 - defaultSettings: - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - preloadAudioData: 1 - loadInBackground: 0 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Bundled/Games/GleeClub/Sounds/WailPreview.wav b/Assets/Bundled/Games/GleeClub/Sounds/WailPreview.wav deleted file mode 100644 index 04b80f00d..000000000 Binary files a/Assets/Bundled/Games/GleeClub/Sounds/WailPreview.wav and /dev/null differ diff --git a/Assets/Bundled/Games/GleeClub/Sounds/WailPreview.wav.meta b/Assets/Bundled/Games/GleeClub/Sounds/WailPreview.wav.meta deleted file mode 100644 index e5056549b..000000000 --- a/Assets/Bundled/Games/GleeClub/Sounds/WailPreview.wav.meta +++ /dev/null @@ -1,22 +0,0 @@ -fileFormatVersion: 2 -guid: 129f3ac5047e96247955adaff500b692 -AudioImporter: - externalObjects: {} - serializedVersion: 6 - defaultSettings: - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - preloadAudioData: 1 - loadInBackground: 0 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/Prefabs/Common/Overlays/TimingAccuracy.prefab b/Assets/Resources/Prefabs/Common/Overlays/TimingAccuracy.prefab index a94a2703c..0f5b63ef8 100644 --- a/Assets/Resources/Prefabs/Common/Overlays/TimingAccuracy.prefab +++ b/Assets/Resources/Prefabs/Common/Overlays/TimingAccuracy.prefab @@ -5459,21 +5459,21 @@ ParticleSystem: serializedVersion: 2 minMaxState: 4 minColor: {r: 1, g: 0, b: 1, a: 1} - maxColor: {r: 0, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} maxGradient: serializedVersion: 2 - key0: {r: 0.13950695, g: 0.8962264, b: 0.8962264, a: 1} - key1: {r: 1, g: 0.60455173, b: 0.2028302, a: 1} + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 0, g: 0, b: 0, a: 1} key2: {r: 0.8773585, g: 0.15312389, b: 0.8176278, a: 0} - key3: {r: 1, g: 1, b: 0.1273585, a: 0} + key3: {r: 0.14117648, g: 0.8980393, b: 0.8980393, a: 0} key4: {r: 0.5445165, g: 1, b: 0.514151, a: 0} key5: {r: 0.5793154, g: 0.9622642, b: 0.32226774, a: 0} key6: {r: 0.5793154, g: 0.9622642, b: 0.32226774, a: 0} key7: {r: 0, g: 0, b: 0, a: 0} - ctime0: 14173 - ctime1: 21975 - ctime2: 39529 - ctime3: 55653 + ctime0: 0 + ctime1: 65535 + ctime2: 65535 + ctime3: 65535 ctime4: 62414 ctime5: 65535 ctime6: 65535 @@ -5486,8 +5486,8 @@ ParticleSystem: atime5: 0 atime6: 0 atime7: 0 - m_Mode: 1 - m_NumColorKeys: 5 + m_Mode: 0 + m_NumColorKeys: 2 m_NumAlphaKeys: 2 minGradient: serializedVersion: 2 @@ -6603,22 +6603,22 @@ ParticleSystem: enabled: 1 gradient: serializedVersion: 2 - minMaxState: 3 + minMaxState: 1 minColor: {r: 1, g: 1, b: 1, a: 1} maxColor: {r: 1, g: 1, b: 1, a: 1} maxGradient: serializedVersion: 2 key0: {r: 1, g: 1, b: 1, a: 1} - key1: {r: 1, g: 1, b: 0, a: 1} - key2: {r: 0.8235295, g: 0.0627451, b: 0.7607844, a: 0} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 1, g: 1, b: 1, a: 0} key3: {r: 1, g: 1, b: 0, a: 0} key4: {r: 0, g: 0, b: 0, a: 0} key5: {r: 0, g: 0, b: 0, a: 0} key6: {r: 0, g: 0, b: 0, a: 0} key7: {r: 0, g: 0, b: 0, a: 0} ctime0: 0 - ctime1: 51492 - ctime2: 59294 + ctime1: 65535 + ctime2: 65535 ctime3: 55003 ctime4: 0 ctime5: 0 @@ -6637,8 +6637,8 @@ ParticleSystem: m_NumAlphaKeys: 3 minGradient: serializedVersion: 2 - key0: {r: 1, g: 1, b: 1, a: 1} - key1: {r: 0, g: 1, b: 1, a: 1} + key0: {r: 0, g: 0, b: 0, a: 1} + key1: {r: 0, g: 0, b: 0, a: 1} key2: {r: 0.8235295, g: 0.0627451, b: 0.7607844, a: 0} key3: {r: 0.5803922, g: 0.9607844, b: 0.32156864, a: 0} key4: {r: 0, g: 0, b: 0, a: 0} @@ -9488,27 +9488,27 @@ ParticleSystem: m_NumAlphaKeys: 2 CustomDataModule: enabled: 0 - mode0: 0 + mode0: 2 vectorComponentCount0: 4 color0: serializedVersion: 2 - minMaxState: 0 + minMaxState: 1 minColor: {r: 1, g: 1, b: 1, a: 1} - maxColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 0, b: 0, a: 1} maxGradient: serializedVersion: 2 - key0: {r: 1, g: 1, b: 1, a: 1} - key1: {r: 1, g: 1, b: 1, a: 1} - key2: {r: 0, g: 0, b: 0, a: 0} - key3: {r: 0, g: 0, b: 0, a: 0} + key0: {r: 1, g: 0.99215686, b: 0, a: 1} + key1: {r: 1, g: 0, b: 0, a: 1} + key2: {r: 1, g: 0, b: 0, a: 0} + key3: {r: 1, g: 0.43137255, b: 0.0627451, a: 0} key4: {r: 0, g: 0, b: 0, a: 0} key5: {r: 0, g: 0, b: 0, a: 0} key6: {r: 0, g: 0, b: 0, a: 0} key7: {r: 0, g: 0, b: 0, a: 0} ctime0: 0 - ctime1: 65535 - ctime2: 0 - ctime3: 0 + ctime1: 16384 + ctime2: 32768 + ctime3: 49151 ctime4: 0 ctime5: 0 ctime6: 0 @@ -9522,7 +9522,7 @@ ParticleSystem: atime6: 0 atime7: 0 m_Mode: 0 - m_NumColorKeys: 2 + m_NumColorKeys: 4 m_NumAlphaKeys: 2 minGradient: serializedVersion: 2 @@ -9770,7 +9770,7 @@ ParticleSystem: m_PostInfinity: 2 m_RotationOrder: 4 vectorLabel0_3: W - mode1: 0 + mode1: 1 vectorComponentCount1: 4 color1: serializedVersion: 2 @@ -10073,7 +10073,7 @@ ParticleSystemRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 935bc5878e4377e4d92e11173bb5102f, type: 2} + - {fileID: 2100000, guid: 5558d895164867f439186d62dec658fa, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -19916,7 +19916,7 @@ ParticleSystemRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 935bc5878e4377e4d92e11173bb5102f, type: 2} + - {fileID: 2100000, guid: 5558d895164867f439186d62dec658fa, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Resources/Prefabs/Editor/EventProperties/Note.prefab b/Assets/Resources/Prefabs/Editor/EventProperties/Note.prefab index f7bbb2a5e..4bc37a4f0 100644 --- a/Assets/Resources/Prefabs/Editor/EventProperties/Note.prefab +++ b/Assets/Resources/Prefabs/Editor/EventProperties/Note.prefab @@ -30,13 +30,13 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 6158244586633658522} - m_RootOrder: 3 + m_Father: {fileID: 8117968045240430172} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 5, y: 0} - m_SizeDelta: {x: 45.77002, y: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 47, y: 23.44} m_Pivot: {x: 0, y: 0.5} --- !u!222 &6991969534857496180 CanvasRenderer: @@ -100,7 +100,7 @@ MonoBehaviour: m_fontSizeMin: 3 m_fontSizeMax: 20 m_fontStyle: 0 - m_HorizontalAlignment: 1 + m_HorizontalAlignment: 2 m_VerticalAlignment: 512 m_textAlignment: 65535 m_characterSpacing: 0 @@ -137,6 +137,208 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &4464354052749239616 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3080040525156679747} + - component: {fileID: 7690655211411837336} + - component: {fileID: 2364948491564333022} + m_Layer: 5 + m_Name: Flat Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3080040525156679747 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4464354052749239616} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8117968045240430172} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 47, y: 16.41} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &7690655211411837336 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4464354052749239616} + m_CullTransparentMesh: 1 +--- !u!114 &2364948491564333022 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4464354052749239616} + 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: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: (Db4) + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 78e7291cdeccdfc4fa61249845605144, type: 2} + m_sharedMaterial: {fileID: 5250768452915780979, guid: 78e7291cdeccdfc4fa61249845605144, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4292730333 + m_fontColor: {r: 0.8679245, g: 0.8679245, b: 0.8679245, 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: 20 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 3 + m_fontSizeMax: 14 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + 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_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 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!1 &5263626353470047177 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8117968045240430172} + - component: {fileID: 7498406572278276061} + m_Layer: 5 + m_Name: Note Label Container + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8117968045240430172 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5263626353470047177} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 985107624212317837} + - {fileID: 3080040525156679747} + m_Father: {fileID: 6158244586633658522} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 47, y: 40} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &7498406572278276061 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5263626353470047177} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 3 + m_Spacing: -3 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1 &6158244585101124322 GameObject: m_ObjectHideFlags: 0 @@ -247,6 +449,7 @@ MonoBehaviour: slider: {fileID: 6158244586633658523} inputField: {fileID: 6158244586579295859} noteLabel: {fileID: 7386330486652876290} + flatLabel: {fileID: 2364948491564333022} --- !u!1 &6158244585406534007 GameObject: m_ObjectHideFlags: 0 @@ -623,6 +826,35 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e365c37b20b7e15458fab7eef4b17449, 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: 6158244586092265564} OnLeftClick: m_PersistentCalls: m_Calls: @@ -1098,7 +1330,7 @@ RectTransform: - {fileID: 6158244585994109202} - {fileID: 6158244585657951267} - {fileID: 6158244585562834553} - - {fileID: 985107624212317837} + - {fileID: 8117968045240430172} m_Father: {fileID: 6158244585233792465} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1201,6 +1433,35 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e365c37b20b7e15458fab7eef4b17449, 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: 0} OnLeftClick: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceColorCycle.shader b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceColorCycle.shader new file mode 100644 index 000000000..72fd6e666 --- /dev/null +++ b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceColorCycle.shader @@ -0,0 +1,99 @@ +Shader "Sprites/AceStarCycle" +{ + Properties + { + [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} + _GradientMap ("Color Map", 2D) = "white" {} + _Color ("Tint", Color) = (1,1,1,1) + _Speed ("Color Rotate Speed", Float) = 1 + [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 + } + + SubShader + { + Tags + { + "Queue"="Transparent" + "IgnoreProjector"="True" + "RenderType"="Transparent" + "PreviewType"="Plane" + "CanUseSpriteAtlas"="True" + } + + Cull Off + Lighting Off + ZWrite Off + Blend One OneMinusSrcAlpha + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile _ PIXELSNAP_ON + #include "UnityCG.cginc" + + struct appdata_t + { + float4 vertex : POSITION; + float4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + struct v2f + { + float4 vertex : SV_POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + fixed4 _Color; + + v2f vert(appdata_t IN) + { + v2f OUT; + OUT.vertex = UnityObjectToClipPos(IN.vertex); + OUT.texcoord = IN.texcoord; + OUT.color = IN.color * _Color; + #ifdef PIXELSNAP_ON + OUT.vertex = UnityPixelSnap (OUT.vertex); + #endif + + return OUT; + } + + sampler2D _MainTex; + sampler2D _AlphaTex; + sampler2D _GradientMap; + float _Speed; + float _AlphaSplitEnabled; + + fixed4 SampleSpriteTexture (float2 uv) + { + fixed4 color = tex2D (_MainTex, uv); + + #if UNITY_TEXTURE_ALPHASPLIT_ALLOWED + if (_AlphaSplitEnabled) + color.a = tex2D (_AlphaTex, uv).r; + #endif //UNITY_TEXTURE_ALPHASPLIT_ALLOWED + + return color; + } + + fixed4 frag(v2f IN) : SV_Target + { + fixed4 c = SampleSpriteTexture (IN.texcoord); + + float grayscale = (IN.color.r + IN.color.g + IN.color.b) / 3; + float grayscaleScrolled = (grayscale + ((_Speed / 4) * _Time.y)) % 1; + fixed4 g = tex2D (_GradientMap, grayscaleScrolled); + + c = fixed4(g.r, g.g, g.b, c.a); + c.rgb *= c.a * IN.color.a; + c.a *= IN.color.a; + return c; + } + ENDCG + } + } +} diff --git a/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceColorCycle.shader.meta b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceColorCycle.shader.meta new file mode 100644 index 000000000..92ad5bcda --- /dev/null +++ b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceColorCycle.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 49c9ed0b23138ae43854107346543307 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceStarParticle.mat b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceStarParticle.mat new file mode 100644 index 000000000..9157ec8eb --- /dev/null +++ b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceStarParticle.mat @@ -0,0 +1,120 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: AceStarParticle + m_Shader: {fileID: 4800000, guid: 49c9ed0b23138ae43854107346543307, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BackTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DownTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FrontTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GradientMap: + m_Texture: {fileID: 2800000, guid: 4aa512ca12c0f0645830e3a8aa1745fc, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LeftTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RightTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UpTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - PixelSnap: 0 + - _BumpScale: 1 + - _ColorMask: 15 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _Speed: 10 + - _Speed1: 0 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _UVSec: 0 + - _UseUIAlphaClip: 0 + - _ZWrite: 1 + m_Colors: + - _AddColor: {r: 0.5188679, g: 0.5188679, b: 0.5188679, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _OutlineColor: {r: 1, g: 1, b: 1, a: 0} + m_BuildTextureStacks: [] diff --git a/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceStarParticle.mat.meta b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceStarParticle.mat.meta new file mode 100644 index 000000000..41d88078a --- /dev/null +++ b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/AceStarParticle.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5558d895164867f439186d62dec658fa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/StarParticle.mat b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/StarParticle.mat index 059aebbca..6fdd0cc28 100644 --- a/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/StarParticle.mat +++ b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/StarParticle.mat @@ -2,14 +2,15 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 6 + serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: StarParticle m_Shader: {fileID: 4800000, guid: af9746bafb4f8e942b6957f0b2a2ac59, type: 3} - m_ShaderKeywords: + m_ValidKeywords: [] + m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -39,6 +40,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _GradientMap: + m_Texture: {fileID: 2800000, guid: b31d4f673c4dc0b498c0325fbece6d29, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _MainTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -55,6 +60,7 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - PixelSnap: 0 - _BumpScale: 1 diff --git a/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/acecolors.png b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/acecolors.png new file mode 100644 index 000000000..20c842336 Binary files /dev/null and b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/acecolors.png differ diff --git a/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/acecolors.png.meta b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/acecolors.png.meta new file mode 100644 index 000000000..6c3ecbd26 --- /dev/null +++ b/Assets/Resources/Sprites/UI/Common/GameOverlays/StarAndAccuracy/acecolors.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 4aa512ca12c0f0645830e3a8aa1745fc +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Conductor.cs b/Assets/Scripts/Conductor.cs index e61e60dfe..1ab571ab8 100644 --- a/Assets/Scripts/Conductor.cs +++ b/Assets/Scripts/Conductor.cs @@ -96,9 +96,7 @@ namespace HeavenStudio private float timelineVolume = 1f; private float minigameVolume = 1f; - const bool doPitchResync = true; - - public void SetTimelinePitch(float pitch, bool resync = false) + public void SetTimelinePitch(float pitch) { if (isPaused || deferTimeKeeping) return; if (pitch != 0 && pitch != timelinePitch) @@ -111,17 +109,17 @@ namespace HeavenStudio if (musicSource != null && musicSource.clip != null) { musicSource.pitch = SongPitch; - if (doPitchResync && isPlaying && resync && !deferTimeKeeping) + if (isPlaying && !(isPaused || deferTimeKeeping)) { time = MapTimeToPitchChanges(absTime + absTimeAdjust); songPos = startPos + time; songPosBeat = GetBeatFromSongPos(songPos); - SeekMusicToTime(songPos, firstBeatOffset); + songPositionInBeatsAsDouble = GetSwungBeat(songPosBeat); } } } - public void SetMinigamePitch(float pitch, bool resync = false) + public void SetMinigamePitch(float pitch) { if (isPaused || deferTimeKeeping || !isPlaying) return; if (pitch != 0 && pitch != minigamePitch) @@ -134,12 +132,12 @@ namespace HeavenStudio if (musicSource != null && musicSource.clip != null) { musicSource.pitch = SongPitch; - if (doPitchResync && isPlaying && resync && !deferTimeKeeping) + if (isPlaying && !(isPaused || deferTimeKeeping)) { time = MapTimeToPitchChanges(absTime + absTimeAdjust); songPos = startPos + time; songPosBeat = GetBeatFromSongPos(songPos); - SeekMusicToTime(songPos, firstBeatOffset); + songPositionInBeatsAsDouble = GetSwungBeat(songPosBeat); } } } @@ -171,7 +169,7 @@ namespace HeavenStudio songPosBeat = GetBeatFromSongPos(time); - gameManager.SetCurrentEventToClosest(beat); + gameManager.SetCurrentEventToClosest(beat, true); } public void PlaySetup(double beat) @@ -234,7 +232,6 @@ namespace HeavenStudio _metronomeTally = 0; startTime = DateTime.Now; - absTime = 0; absTimeAdjust = 0; deferTimeKeeping = musicSource.clip != null; @@ -253,7 +250,6 @@ namespace HeavenStudio deferTimeKeeping = false; // Debug.Log($"dsptime: {dsp}, deferred timekeeping for {DateTime.Now - startTime} seconds (delta dsp {dsp - dspStart})"); startTime = DateTime.Now; - absTime = 0; absTimeAdjust = 0; dspStart = dsp; } diff --git a/Assets/Scripts/EventCaller.cs b/Assets/Scripts/EventCaller.cs index 29e67d5b4..42cecc80e 100644 --- a/Assets/Scripts/EventCaller.cs +++ b/Assets/Scripts/EventCaller.cs @@ -118,24 +118,22 @@ namespace HeavenStudio public static List GetAllInGameManagerList(string gameName, string[] include) { - List temp1 = instance.gameManager.Beatmap.Entities.FindAll(c => c.datamodel.Split('/')[0] == gameName); - List temp2 = new List(); - foreach (string s in include) + Predicate match = c => { - temp2.AddRange(temp1.FindAll(c => c.datamodel.Split('/')[1].Equals(s))); - } - return temp2; + string[] details = c.datamodel.Split('/'); + return details[0] == gameName && include.Contains(details[1]); + }; + return instance.gameManager.Beatmap.Entities.FindAll(match); } public static List GetAllInGameManagerListExclude(string gameName, string[] exclude) { - List temp1 = instance.gameManager.Beatmap.Entities.FindAll(c => c.datamodel.Split('/')[0] == gameName); - List temp2 = new List(); - foreach (string s in exclude) + Predicate match = c => { - temp2.AddRange(temp1.FindAll(c => !c.datamodel.Split('/')[1].Equals(s))); - } - return temp2; + string[] details = c.datamodel.Split('/'); + return details[0] == gameName && !exclude.Contains(details[1]); + }; + return instance.gameManager.Beatmap.Entities.FindAll(match); } public static List FXOnlyGames() diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index a5a7b8bf3..e630566e3 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -22,7 +22,6 @@ namespace HeavenStudio [Header("Lists")] [NonSerialized] public RiqBeatmap Beatmap = new(); - private Dictionary cachedGamePrefabs = new(); [NonSerialized] public ObjectPool SoundObjects; [Header("Components")] @@ -372,7 +371,7 @@ namespace HeavenStudio List entitiesAtSameBeat = ListPool.Get(); Minigames.Minigame inf; - //seek ahead to preload games that have assetbundles + // seek ahead to preload games that have assetbundles if (currentPreSwitch < allGameSwitches.Count && currentPreSwitch >= 0) { if (start + seekTime >= allGameSwitches[currentPreSwitch].beat) @@ -723,7 +722,7 @@ namespace HeavenStudio conductor.SetVolume(Beatmap.VolumeChanges[0]["volume"]); conductor.firstBeatOffset = Beatmap.data.offset; conductor.PlaySetup(beat); - SetCurrentEventToClosest(beat); + SetCurrentEventToClosest(beat, true); Debug.Log("Playing at " + beat); KillAllSounds(); @@ -845,7 +844,7 @@ namespace HeavenStudio WaitUntil yieldBeatmap = new WaitUntil(() => Beatmap != null && BeatmapEntities() > 0); WaitUntil yieldAudio = new WaitUntil(() => AudioLoadDone || (ChartLoadError && !GlobalGameManager.IsShowingDialog)); WaitUntil yieldGame = null; - List gamesToPreload = SeekAheadAndPreload(beat, 4f); + List gamesToPreload = SetCurrentEventToClosest(beat, true); Debug.Log($"Preloading {gamesToPreload.Count} games"); if (gamesToPreload.Count > 0) { @@ -974,9 +973,10 @@ namespace HeavenStudio return 0; } - public void SetCurrentEventToClosest(double beat, bool canPreload = false) + public List SetCurrentEventToClosest(double beat, bool canPreload = false) { SortEventsList(); + List preload = new(); onBeatChanged?.Invoke(beat); if (Beatmap.Entities.Count > 0) { @@ -984,15 +984,13 @@ namespace HeavenStudio currentPreEvent = GetIndexAfter(eventBeats, beat); currentPreSequence = GetIndexAfter(eventBeats, beat); - var gameSwitchs = Beatmap.Entities.FindAll(c => c.datamodel.Split("/")[1] == "switchGame"); - string newGame = Beatmap.Entities[Math.Min(currentEvent, eventBeats.Count - 1)].datamodel.Split(0); - if (gameSwitchs.Count > 0) + if (allGameSwitches.Count > 0) { - int index = GetIndexBefore(gameSwitchs.Select(c => c.beat).ToList(), beat); + int index = GetIndexBefore(allGameSwitches.Select(c => c.beat).ToList(), beat); currentPreSwitch = index; - var closestGameSwitch = gameSwitchs[index]; + var closestGameSwitch = allGameSwitches[index]; if (closestGameSwitch.beat <= beat) { newGame = closestGameSwitch.datamodel.Split(2); @@ -1007,7 +1005,7 @@ namespace HeavenStudio { if (index - 1 >= 0) { - newGame = gameSwitchs[index - 1].datamodel.Split(2); + newGame = allGameSwitches[index - 1].datamodel.Split(2); } else { @@ -1015,13 +1013,17 @@ namespace HeavenStudio } } } - // newGame = gameSwitchs[gameSwitchs.IndexOf(gameSwitchs.Find(c => c.beat == MathUtils.GetClosestInList(gameSwitchs.Select(c => c.beat).ToList(), beat)))].datamodel.Split(2); } if (!GetGameInfo(newGame).fxOnly) { if (canPreload) { + Minigames.Minigame inf = GetGameInfo(newGame); + if (inf != null) + { + preload.Add(inf); + } StartCoroutine(WaitAndSetGame(newGame)); } else @@ -1091,7 +1093,8 @@ namespace HeavenStudio } onSectionChange?.Invoke(currentSection, lastSection); - SeekAheadAndPreload(beat); + preload.AddRange(SeekAheadAndPreload(beat)); + return preload; } #endregion @@ -1124,7 +1127,7 @@ namespace HeavenStudio } } - while (beat + 0.25 > Math.Max(conductor.songPositionInBeatsAsDouble, 0)) + while (conductor.GetUnSwungBeat(beat + 0.25) > Math.Max(conductor.unswungSongPositionInBeatsAsDouble, 0)) { if (!conductor.isPlaying) { @@ -1165,13 +1168,18 @@ namespace HeavenStudio public void DestroyGame() { - cachedGamePrefabs.Clear(); SoundByte.UnloadAudioClips(); SetGame("noGame"); } + string currentGameRequest = null; private IEnumerator WaitAndSetGame(string game, bool useMinigameColor = true) { + if (game == currentGameRequest) + { + yield break; + } + currentGameRequest = game; var inf = GetGameInfo(game); if (inf != null && inf.usesAssetBundle) { @@ -1179,13 +1187,15 @@ namespace HeavenStudio { // Debug.Log($"ASYNC loading assetbundles for game {game}"); inf.LoadAssetsAsync().Forget(); + yield return new WaitUntil(() => inf.AssetsLoaded); } - yield return new WaitUntil(() => inf.AssetsLoaded); SetGame(game, useMinigameColor); + currentGameRequest = null; } else { SetGame(game, useMinigameColor); + currentGameRequest = null; } } @@ -1200,10 +1210,14 @@ namespace HeavenStudio public GameObject GetGame(string name) { - var gameInfo = GetGameInfo(name); + if (name is null or "" or "noGame") + { + return Resources.Load($"Games/noGame"); + } + + Minigames.Minigame gameInfo = GetGameInfo(name); if (gameInfo != null) { - GameObject prefab; if (gameInfo.inferred) { return Resources.Load($"Games/noGame"); @@ -1226,6 +1240,8 @@ namespace HeavenStudio return Resources.Load($"Games/noGame"); } } + + GameObject prefab; if (gameInfo.usesAssetBundle) { //game is packed in an assetbundle, load from that instead @@ -1251,6 +1267,7 @@ namespace HeavenStudio } } } + // games with no assetbundle (usually indev games) prefab = Resources.Load($"Games/{name}"); if (prefab != null) { diff --git a/Assets/Scripts/Games/AirRally/AirRally.cs b/Assets/Scripts/Games/AirRally/AirRally.cs index 8c4aa6091..275fe4ed0 100644 --- a/Assets/Scripts/Games/AirRally/AirRally.cs +++ b/Assets/Scripts/Games/AirRally/AirRally.cs @@ -173,7 +173,7 @@ namespace HeavenStudio.Games.Loaders resizable = true, parameters = new List() { - new Param("cps", new EntityTypes.Integer(0, 200, 0), "Snowflakes Amount", "Set how many snowflakes should be spawned per second."), + new Param("cps", new EntityTypes.Integer(0, 200, 0), "Snowflakes Count", "Set how many snowflakes should be spawned per second."), new Param("speed", new EntityTypes.Float(-10, 10, 1), "Start Speed", "Change fow fast the snowflakes are moving at the start of the event."), new Param("endSpeed", new EntityTypes.Float(-10, 10, 1), "End Speed", "Change how fast the snowflakes are moving at the end of the event."), new Param("ease", EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.") diff --git a/Assets/Scripts/Games/BlueBear/BlueBear.cs b/Assets/Scripts/Games/BlueBear/BlueBear.cs index 7a544072a..290cc05a8 100644 --- a/Assets/Scripts/Games/BlueBear/BlueBear.cs +++ b/Assets/Scripts/Games/BlueBear/BlueBear.cs @@ -84,7 +84,7 @@ namespace HeavenStudio.Games.Loaders { new Param("right", new EntityTypes.Integer(0, 500, 15), "Right Crumb", "Set how many treats Beary needs to eat for the right crumb to appear."), new Param("left", new EntityTypes.Integer(0, 500, 30), "Left Crumb", "Set how many treats Beary needs to eat for the left crumb to appear."), - new Param("reset", false, "Reset Treats Eaten", "Toggle if the current amount of treats eaten (and crumbs) should be reset.") + new Param("reset", false, "Reset Treats Eaten", "Toggle if the current number of treats eaten (and crumbs) should be reset.") } } }, diff --git a/Assets/Scripts/Games/BoardMeeting/BMExecutive.cs b/Assets/Scripts/Games/BoardMeeting/BMExecutive.cs index 6e4577760..1fad560cf 100644 --- a/Assets/Scripts/Games/BoardMeeting/BMExecutive.cs +++ b/Assets/Scripts/Games/BoardMeeting/BMExecutive.cs @@ -26,7 +26,7 @@ namespace HeavenStudio.Games.Scripts_BoardMeeting { if (rollLoop != null) { - rollLoop.Stop(); + rollLoop.KillLoop(); } } diff --git a/Assets/Scripts/Games/BonOdori/BonOdori.cs b/Assets/Scripts/Games/BonOdori/BonOdori.cs index 38de92bc8..2053aa810 100644 --- a/Assets/Scripts/Games/BonOdori/BonOdori.cs +++ b/Assets/Scripts/Games/BonOdori/BonOdori.cs @@ -48,11 +48,11 @@ namespace HeavenStudio.Games.Loaders new((x, _) => (int)x == 1, new string[] { "variationPa"}), new((x, _) => (int)x == 2, new string[] { "variationPa_n"}), }), - new Param("variationPan", BonOdori.variationPan.PanC, "Pan Type", "Set the variation of the voice line."), - new Param("variationPa", BonOdori.variationPa.PaG, "Pa Type", "Set the variation of the voice line."), - new Param("variationPa_n", BonOdori.variationPa_n.Pa_nA , "Pa-n Type", "Set the variation of the voice line."), + new Param("variationPan", new EntityTypes.NoteSampleDropdown(BonOdori.variationPan.PanC, BonOdori.GetSample, "semitone"), "Pan Type", "Set the variation of the voice line."), + new Param("variationPa", new EntityTypes.NoteSampleDropdown(BonOdori.variationPa.PaG, BonOdori.GetSample, "semitone"), "Pa Type", "Set the variation of the voice line."), + new Param("variationPa_n", new EntityTypes.NoteSampleDropdown(BonOdori.variationPa_n.Pa_nA, BonOdori.GetSample, "semitone") , "Pa-n Type", "Set the variation of the voice line."), new Param("clapType", BonOdori.typeClap.SideClap, "Clap Type", "Set the type of clap."), - new Param("semitone", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Semitone", "Set the number of semitones up or down this note should be pitched."), + new Param("semitone", new EntityTypes.Note(offsetToC: false), "Semitone", "Set the number of semitones up or down this note should be pitched."), }, }, @@ -71,10 +71,10 @@ namespace HeavenStudio.Games.Loaders new((x, _) => (int)x == 1, new string[] { "variationDo"}), new((x, _) => (int)x == 2, new string[] { "variationDo_n"}), }), - new Param("variationDon", BonOdori.variationDon.DonA, "Don Type", "Set the variation of the voice line."), - new Param("variationDo", BonOdori.variationDo.DoC, "Do Type", "Set the variation of the voice line."), - new Param("variationDo_n", BonOdori.variationDo_n.Do_nA, "Do-n Type", "Set the variation of the voice line."), - new Param("semitone", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Semitone", "Set the number of semitones up or down this note should be pitched."), + new Param("variationDon", new EntityTypes.NoteSampleDropdown(BonOdori.variationDon.DonA, BonOdori.GetSample, "semitone"), "Don Type", "Set the variation of the voice line."), + new Param("variationDo", new EntityTypes.NoteSampleDropdown(BonOdori.variationDo.DoC, BonOdori.GetSample, "semitone"), "Do Type", "Set the variation of the voice line."), + new Param("variationDo_n", new EntityTypes.NoteSampleDropdown(BonOdori.variationDo_n.Do_nA, BonOdori.GetSample, "semitone"), "Do-n Type", "Set the variation of the voice line."), + new Param("semitone", new EntityTypes.Note(offsetToC: false), "Semitone", "Set the number of semitones up or down this note should be pitched."), }, }, @@ -151,7 +151,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 1f, parameters = new List() { - new Param("toggle", true, "Darken Background", "Darkens the background"), + new Param("toggle", true, "Darken Background", "Darkens the background."), } }, }, @@ -251,6 +251,29 @@ namespace HeavenStudio.Games DoG = 1 } + public static readonly Dictionary NoteSamples = new() + { + { variationPan.PanC, new("bonOdori/pan1", 3, 4) }, + { variationPan.PanE, new("bonOdori/pan2", 7, 4) }, + { variationPan.PanA, new("bonOdori/pan3", 0, 4) }, + { variationPa_n.Pa_nA, new("bonOdori/pa_n1", 0, 4) }, + { variationPa_n.Pa_nC, new("bonOdori/pa_n2", 3, 4) }, + { variationPa.PaG, new("bonOdori/pa1", 7, 4) }, + { variationDon.DonA, new("bonOdori/don1", 0, 4) }, + { variationDon.DonD, new("bonOdori/don2", 5, 4) }, + { variationDon.DonC, new("bonOdori/don3", 3, 4) }, + { variationDon.DonG, new("bonOdori/don4", 10, 4) }, + { variationDo_n.Do_nA, new("bonOdori/do_n1", 0, 4) }, + { variationDo_n.Do_nG, new("bonOdori/do_n2", 7, 4) }, + { variationDo.DoC, new("bonOdori/do1", 3, 4) }, + { variationDo.DoG, new("bonOdori/do2", 7, 4) } + }; + + public static NoteSample GetSample(object sampleEnum) + { + return NoteSamples[sampleEnum]; + } + public static BonOdori instance { get; set; } public void Awake() diff --git a/Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs b/Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs index 4ce680f64..fc48e2228 100644 --- a/Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs +++ b/Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs @@ -26,12 +26,12 @@ namespace HeavenStudio.Games.Loaders { new Param.CollapseParam((x, _) => !(bool)x, new string[] { "note1", "note2", "note3", "note4", "note5", "note6"}) }), - new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 3, 4, "builtToScaleDS/PianoPreview"), "1st note", "Set the number of semitones up or down this note should be pitched."), - new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 3, 4, "builtToScaleDS/PianoPreview"), "2nd note", "Set the number of semitones up or down this note should be pitched."), - new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 3, 4, "builtToScaleDS/PianoPreview"), "3rd note", "Set the number of semitones up or down this note should be pitched."), - new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 3, 4, "builtToScaleDS/PianoPreview"), "4th note", "Set the number of semitones up or down this note should be pitched."), - new Param("note5", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 3, 4, "builtToScaleDS/PianoPreview"), "5th note", "Set the number of semitones up or down this note should be pitched. This note plays together with the 6th note."), - new Param("note6", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 12, 3, 4, "builtToScaleDS/PianoPreview"), "6th note", "Set the number of semitones up or down this note should be pitched. This note plays together with the 5th note."), + new Param("note1", new EntityTypes.Note(0, 3, 4, "builtToScaleDS/Piano"), "1st note", "Set the number of semitones up or down this note should be pitched."), + new Param("note2", new EntityTypes.Note(2, 3, 4, "builtToScaleDS/Piano"), "2nd note", "Set the number of semitones up or down this note should be pitched."), + new Param("note3", new EntityTypes.Note(4, 3, 4, "builtToScaleDS/Piano"), "3rd note", "Set the number of semitones up or down this note should be pitched."), + new Param("note4", new EntityTypes.Note(5, 3, 4, "builtToScaleDS/Piano"), "4th note", "Set the number of semitones up or down this note should be pitched."), + new Param("note5", new EntityTypes.Note(7, 3, 4, "builtToScaleDS/Piano"), "5th note", "Set the number of semitones up or down this note should be pitched. This note plays together with the 6th note."), + new Param("note6", new EntityTypes.Note(12, 3, 4, "builtToScaleDS/Piano"), "6th note", "Set the number of semitones up or down this note should be pitched. This note plays together with the 5th note."), } }, new GameAction("play piano", "Play Note") @@ -40,7 +40,7 @@ namespace HeavenStudio.Games.Loaders resizable = true, parameters = new List() { - new Param("type", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 3, 4, "builtToScaleDS/PianoPreview"), "Semitones", "Set the number of semitones up or down this note should be pitched.") + new Param("type", new EntityTypes.Note(0, 3, 4, "builtToScaleDS/Piano"), "Semitones", "Set the number of semitones up or down this note should be pitched.") }, }, new GameAction("color", "Color Palette") diff --git a/Assets/Scripts/Games/BuiltToScaleRvl/BuiltToScaleRvl.cs b/Assets/Scripts/Games/BuiltToScaleRvl/BuiltToScaleRvl.cs index 91c786c8d..4f1ca8e17 100644 --- a/Assets/Scripts/Games/BuiltToScaleRvl/BuiltToScaleRvl.cs +++ b/Assets/Scripts/Games/BuiltToScaleRvl/BuiltToScaleRvl.cs @@ -43,7 +43,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 1f, parameters = new List() { - new Param("id", new EntityTypes.Integer(1, 4, 1), "Rod ID", "Set the ID of the rod to out."), + new Param("id", new EntityTypes.Integer(1, 4, 1), "Rod ID", "Set the ID of the rod to bounce out the side."), }, }, new GameAction("custom spawn", "Custom Spawn Rod") @@ -53,7 +53,7 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("direction", BuiltToScaleRvl.Direction.Left, "Direction", "Set the direction in which the rod will come out."), - new Param("target", BuiltToScaleRvl.TargetBlock.First, "Target", "Set the target in which the rod will bounce."), + new Param("target", BuiltToScaleRvl.TargetBlock.First, "Target", "Set the target where the rod will bounce first."), new Param("id", new EntityTypes.Integer(1, 4, 1), "Rod ID", "Set the ID of the rod to spawn. Rods with the same ID cannot spawn at the same time."), }, }, @@ -62,7 +62,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 1f, parameters = new List() { - new Param("target", BuiltToScaleRvl.Target.First, "Target", "Set the target in which the rod will bounce."), + new Param("target", BuiltToScaleRvl.Target.First, "Target", "Set the target that the rod will bounce to."), new Param("id", new EntityTypes.Integer(1, 4, 1), "Rod ID", "Set the ID of the rod to bounce."), }, }, diff --git a/Assets/Scripts/Games/Cannery/Cannery.cs b/Assets/Scripts/Games/Cannery/Cannery.cs index 35b210753..0953df7c7 100644 --- a/Assets/Scripts/Games/Cannery/Cannery.cs +++ b/Assets/Scripts/Games/Cannery/Cannery.cs @@ -25,7 +25,7 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("toggle", true, "Bop", "Toggle if the alarm should bop for the duration of this event."), - new Param("auto", false, "Bop (Auto)", "Toggle if Dog Ninja should automatically bop until another Bop event is reached."), + new Param("auto", false, "Bop (Auto)", "Toggle if the alarm should automatically bop until another Bop event is reached."), } }, new GameAction("can", "Can") diff --git a/Assets/Scripts/Games/CatchOfTheDay/CatchOfTheDay.cs b/Assets/Scripts/Games/CatchOfTheDay/CatchOfTheDay.cs index e46aca7a6..c325147bf 100644 --- a/Assets/Scripts/Games/CatchOfTheDay/CatchOfTheDay.cs +++ b/Assets/Scripts/Games/CatchOfTheDay/CatchOfTheDay.cs @@ -33,10 +33,10 @@ namespace HeavenStudio.Games.Loaders }), new Param("colorTop", new Color(0.7098039f, 0.8705882f, 0.8705882f), "Top Color", "The color for the top part of the background."), new Param("colorBottom", new Color(0.4666667f, 0.7372549f, 0.8196079f), "Bottom Color", "The color for the bottom part of the background."), - new Param("sceneDelay", new EntityTypes.Float(0f, 32f, 2f), "Scene Change Delay", "Amount of beats to wait before changing to the next scene."), + new Param("sceneDelay", new EntityTypes.Float(0f, 32f, 2f), "Scene Change Delay", "The number of beats to wait before changing to the next scene."), new Param("fgManta", false, "Foreground Stingray", "Spawn a stingray in the foreground of the scene."), new Param("bgManta", false, "Background Stingray", "Spawn a stingray in the background of the scene."), - new Param("schoolFish", false, "School of Fish", "Spawn a school of fish to as a distraction.", new List() + new Param("schoolFish", false, "School of Fish", "Spawn a school of fish as a distraction.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "fishDensity" }) }), @@ -58,10 +58,10 @@ namespace HeavenStudio.Games.Loaders }), new Param("colorTop", new Color(0.7098039f, 0.8705882f, 0.8705882f), "Top Color", "The color for the top part of the background."), new Param("colorBottom", new Color(0.4666667f, 0.7372549f, 0.8196079f), "Bottom Color", "The color for the bottom part of the background."), - new Param("sceneDelay", new EntityTypes.Float(0f, 32f, 2f), "Scene Change Delay", "Amount of beats to wait before changing to the next scene."), + new Param("sceneDelay", new EntityTypes.Float(0f, 32f, 2f), "Scene Change Delay", "Number of beats to wait before changing to the next scene."), new Param("fgManta", false, "Foreground Stingray", "Spawn a stingray in the foreground of the scene."), new Param("bgManta", false, "Background Stingray", "Spawn a stingray in the background of the scene."), - new Param("schoolFish", false, "School of Fish", "Spawn a school of fish to as a distraction.", new List() + new Param("schoolFish", false, "School of Fish", "Spawn a school of fish as a distraction.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "fishDensity" }) }), @@ -84,10 +84,10 @@ namespace HeavenStudio.Games.Loaders }), new Param("colorTop", new Color(0.7098039f, 0.8705882f, 0.8705882f), "Top Color", "The color for the top part of the background."), new Param("colorBottom", new Color(0.4666667f, 0.7372549f, 0.8196079f), "Bottom Color", "The color for the bottom part of the background."), - new Param("sceneDelay", new EntityTypes.Float(0f, 32f, 2f), "Scene Change Delay", "Amount of beats to wait before changing to the next scene."), + new Param("sceneDelay", new EntityTypes.Float(0f, 32f, 2f), "Scene Change Delay", "Number of beats to wait before changing to the next scene."), new Param("fgManta", false, "Foreground Stingray", "Spawn a stingray in the foreground of the scene."), new Param("bgManta", false, "Background Stingray", "Spawn a stingray in the background of the scene."), - new Param("schoolFish", false, "School of Fish", "Spawn a school of fish to as a distraction.", new List() + new Param("schoolFish", false, "School of Fish", "Spawn a school of fish as a distraction.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "fishDensity" }) }), @@ -109,16 +109,16 @@ namespace HeavenStudio.Games.Loaders }), new Param("startMoveX", new EntityTypes.Float(-20f, 20f, 0f), "Start X", "Set the X position from which to move."), new Param("startMoveY", new EntityTypes.Float(-20f, 20f, 0f), "Start Y", "Set the Y position from which to move."), - new Param("endMoveX", new EntityTypes.Float(-20f, 20f, 0f), "End X", "Set the X position to which to move."), - new Param("endMoveY", new EntityTypes.Float(-20f, 20f, 0f), "End Y", "Set the Y position to which to move."), + new Param("endMoveX", new EntityTypes.Float(-20f, 20f, 0f), "End X", "Set the X position to move to."), + new Param("endMoveY", new EntityTypes.Float(-20f, 20f, 0f), "End Y", "Set the Y position to move to."), new Param("doRotate", false, "Rotate", "Select this option if you want to rotate Ann.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "endRotDegrees" } ), new Param.CollapseParam((x, e) => (bool)x && (Util.EasingFunction.Ease)e["ease"] != Util.EasingFunction.Ease.Instant, new string[] { "startRotDegrees" }), new Param.CollapseParam((_, e) => (bool)e["doMove"] || (bool)e["doRotate"] || (bool)e["doScale"], new string[] { "ease" }) }), - new Param("startRotDegrees", new EntityTypes.Float(-360f, 360f, 0f), "Start Rotation", "Set the amount of degrees at which to begin rotating."), - new Param("endRotDegrees", new EntityTypes.Float(-360f, 360f, 0f), "End Rotation", "Set the amount of degrees at which to finish rotating."), + new Param("startRotDegrees", new EntityTypes.Float(-360f, 360f, 0f), "Start Rotation", "Set the number of degrees at which to begin rotating."), + new Param("endRotDegrees", new EntityTypes.Float(-360f, 360f, 0f), "End Rotation", "Set the number of degrees at which to finish rotating."), new Param("doScale", false, "Scale", "Select this option if you want to change Ann's scale.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "endScaleX", "endScaleY" } ), diff --git a/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs b/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs index dc94f0013..8439ee350 100644 --- a/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs +++ b/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs @@ -848,7 +848,7 @@ namespace HeavenStudio.Games Conductor.instance.FadeMinigameVolume(0, 0, 1); drumTempVolume = 1; - if (isWhirringPlaying) { whirring.Stop(); isWhirringPlaying = false; } + if (isWhirringPlaying) { whirring.KillLoop(); isWhirringPlaying = false; } } //make sure music volume resetting can be remembered between blastoffs diff --git a/Assets/Scripts/Games/CropStomp/CropStomp.cs b/Assets/Scripts/Games/CropStomp/CropStomp.cs index 08bc77baa..7a982fbce 100644 --- a/Assets/Scripts/Games/CropStomp/CropStomp.cs +++ b/Assets/Scripts/Games/CropStomp/CropStomp.cs @@ -43,7 +43,7 @@ namespace HeavenStudio.Games.Loaders { parameters = new List() { - new Param("mute", true, "Toggle if Stomp Farmer should stopp humming.") + new Param("mute", true, "Toggle if Stomp Farmer should stop humming.") } }, new GameAction("plantCollect", "Set Veggie Collection Thresholds") @@ -55,12 +55,12 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("threshold", new EntityTypes.Integer(1, 80, 8), "Threshold", "Set how many veggies it takes for a new plant to appear in the collection bag."), - new Param("limit", new EntityTypes.Integer(1, 1000, 80), "Limit", "Set the limit for the amount of plants to be collected and count towards the threshold."), - new Param("force", false, "Set Amount Of Collected Plants", "Toggle if this event should automatically set the collected plants to a certain number.", new List() + new Param("limit", new EntityTypes.Integer(1, 1000, 80), "Limit", "Set the limit for the number of plants to be collected and count towards the threshold."), + new Param("force", false, "Set Number Of Collected Plants", "Toggle if this event should automatically set the collected plants to a certain number.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "forceAmount" }) }), - new Param("forceAmount", new EntityTypes.Integer(0, 1000, 0), "Set Amount", "Set the amount of plants to be collected automatically.") + new Param("forceAmount", new EntityTypes.Integer(0, 1000, 0), "Set Number", "Set the number of plants to be collected automatically.") } } }, diff --git a/Assets/Scripts/Games/DoubleDate/DoubleDate.cs b/Assets/Scripts/Games/DoubleDate/DoubleDate.cs index 7ea8d4257..9778a1bd0 100644 --- a/Assets/Scripts/Games/DoubleDate/DoubleDate.cs +++ b/Assets/Scripts/Games/DoubleDate/DoubleDate.cs @@ -31,7 +31,7 @@ namespace HeavenStudio.Games.Loaders new("b", false, "Weasels Jump", "Toggle if the weasels should jump upon successfully hitting the cue.") } }, - new GameAction("basket", "Basket Ball") + new GameAction("basket", "Basketball") { preFunction = delegate { var e = eventCaller.currentEntity; DoubleDate.QueueBasketBall(e.beat, e["b"]); }, preFunctionLength = 1f, diff --git a/Assets/Scripts/Games/FanClub/FanClub.cs b/Assets/Scripts/Games/FanClub/FanClub.cs index 8ea1eb00f..71f57d597 100644 --- a/Assets/Scripts/Games/FanClub/FanClub.cs +++ b/Assets/Scripts/Games/FanClub/FanClub.cs @@ -61,7 +61,7 @@ namespace HeavenStudio.Games.Loaders inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.WarnBigReady(e.beat, e["toggle"]); }, preFunction = delegate { var e = eventCaller.currentEntity; FanClub.BigReadySound(e.beat, e["toggle"]); } }, - new GameAction("play idol animation", "Idol Coreography") + new GameAction("play idol animation", "Idol Choreography") { function = delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnim(e.beat, e.length, e["type"], e["who"]); }, resizable = true, diff --git a/Assets/Scripts/Games/Fillbots/Fillbots.cs b/Assets/Scripts/Games/Fillbots/Fillbots.cs index b84575fa6..70ee5fe14 100644 --- a/Assets/Scripts/Games/Fillbots/Fillbots.cs +++ b/Assets/Scripts/Games/Fillbots/Fillbots.cs @@ -16,7 +16,7 @@ namespace HeavenStudio.Games.Loaders new Param("practice", false, "Count-In"), new Param("alt", false, "Alternate OK"), new Param("type", Scripts_Fillbots.EndAnim.Both, "Success Reaction", "Set the reaction of the Robot."), - new Param("stop", false, "Stop Conveyer", "Toggle if the conveyer should be stopped when finished."), + new Param("stop", false, "Stop Conveyor", "Toggle if the conveyor should be stopped when finished."), new Param("color", false, "Custom Color", "Toggle if the robot color should be changed.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "colorFuel", "colorLampOff", "colorLampOn" }), @@ -145,7 +145,7 @@ namespace HeavenStudio.Games.Loaders new Param("colorLampOn", new Color(1f, 1f, 0.42f), "On Lamp Color", "Set the color of the on lamp."), new Param("colorImpact", new Color(1f, 0.59f, 0.01f), "Impact Color", "Set the color of the impact."), new Param("colorFiller", Color.white, "Filler Color", "Set the color of the filler."), - new Param("colorConveyer", Color.white, "Conveyer Color", "Set the color of the conveyer."), + new Param("colorConveyer", Color.white, "Conveyor Color", "Set the color of the conveyor."), } }, }, diff --git a/Assets/Scripts/Games/Fireworks/Fireworks.cs b/Assets/Scripts/Games/Fireworks/Fireworks.cs index 862149bd0..7b70bdca2 100644 --- a/Assets/Scripts/Games/Fireworks/Fireworks.cs +++ b/Assets/Scripts/Games/Fireworks/Fireworks.cs @@ -32,7 +32,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 2f, parameters = new List() { - new Param("whereToSpawn", Fireworks.WhereToSpawn.Middle, "Side", "Choose the side this firework should spawn on."), + new Param("whereToSpawn", Fireworks.WhereToSpawn.Middle, "Side", "Choose the side this sparkler should spawn on."), new Param("explosionType", Fireworks.ExplosionType.MixedCircular, "Pattern", "Choose the pattern that this sparkler should explode into."), new Param("applause", false, "Applause", "Toggle if applause should play if you successfully hit this cue."), new Param("offSet", new EntityTypes.Float(0, 4, 0), "Vertical Offset", "Choose the vertical offset for this sparkler."), diff --git a/Assets/Scripts/Games/FirstContact/FirstContact.cs b/Assets/Scripts/Games/FirstContact/FirstContact.cs index 48251ed39..a2d1898cd 100644 --- a/Assets/Scripts/Games/FirstContact/FirstContact.cs +++ b/Assets/Scripts/Games/FirstContact/FirstContact.cs @@ -35,7 +35,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 0.5f, parameters = new List() { - new Param("spaceNum", new EntityTypes.Integer(0, 12, 0), "Amount Of Spaces", "Choose the amount of spaces to add before the icon."), + new Param("spaceNum", new EntityTypes.Integer(0, 12, 0), "Number Of Spaces", "Choose the number of spaces to add before the icon."), new Param("dotdotdot", false, "Ellipses", "Toggle if the symbol should have \"...\" before it."), new Param("newline", false, "New line", "Toggle if this text starts a new line."), new Param("dialogue", "", "Translation", "Set the text that this syllable will translate to. Spaces will not be automatically added.") diff --git a/Assets/Scripts/Games/FreezeFrame/FreezeFrame.cs b/Assets/Scripts/Games/FreezeFrame/FreezeFrame.cs index 489947a46..22a126a85 100644 --- a/Assets/Scripts/Games/FreezeFrame/FreezeFrame.cs +++ b/Assets/Scripts/Games/FreezeFrame/FreezeFrame.cs @@ -134,7 +134,7 @@ namespace HeavenStudio.Games.Loaders resizable = true, parameters = new List() { - new Param("enter", true, "Enter", "Choose the sign should enter or exit."), + new Param("enter", true, "Enter", "Choose whether the sign should enter or exit."), new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action."), } }, @@ -176,16 +176,16 @@ namespace HeavenStudio.Games.Loaders }), new Param("startMoveX", new EntityTypes.Float(-20f, 20f, 0f), "Start X", "Set the X position from which to move."), new Param("startMoveY", new EntityTypes.Float(-20f, 20f, 0f), "Start Y", "Set the Y position from which to move."), - new Param("endMoveX", new EntityTypes.Float(-20f, 20f, 0f), "End X", "Set the X position to which to move."), - new Param("endMoveY", new EntityTypes.Float(-20f, 20f, 0f), "End Y", "Set the Y position to which to move."), + new Param("endMoveX", new EntityTypes.Float(-20f, 20f, 0f), "End X", "Set the X position to move to."), + new Param("endMoveY", new EntityTypes.Float(-20f, 20f, 0f), "End Y", "Set the Y position to move to."), new Param("doRotate", false, "Rotate", "Select this option if you want to rotate T.J.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "endRotDegrees" } ), new Param.CollapseParam((x, e) => (bool)x && (Util.EasingFunction.Ease)e["ease"] != Util.EasingFunction.Ease.Instant, new string[] { "startRotDegrees" }), new Param.CollapseParam((_, e) => (bool)e["doMove"] || (bool)e["doRotate"] || (bool)e["doScale"], new string[] { "ease" }) }), - new Param("startRotDegrees", new EntityTypes.Float(-360f, 360f, 0f), "Start Rotation", "Set the amount of degrees at which to begin rotating."), - new Param("endRotDegrees", new EntityTypes.Float(-360f, 360f, 0f), "End Rotation", "Set the amount of degrees at which to finish rotating."), + new Param("startRotDegrees", new EntityTypes.Float(-360f, 360f, 0f), "Start Rotation", "Set the number of degrees at which to begin rotating."), + new Param("endRotDegrees", new EntityTypes.Float(-360f, 360f, 0f), "End Rotation", "Set the number of degrees at which to finish rotating."), new Param("doScale", false, "Scale", "Select this option if you want to change T.J.'s scale.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "endScaleX", "endScaleY" } ), diff --git a/Assets/Scripts/Games/GleeClub/ChorusKid.cs b/Assets/Scripts/Games/GleeClub/ChorusKid.cs index 3b8e374e0..f79c0c74b 100644 --- a/Assets/Scripts/Games/GleeClub/ChorusKid.cs +++ b/Assets/Scripts/Games/GleeClub/ChorusKid.cs @@ -74,7 +74,7 @@ namespace HeavenStudio.Games.Scripts_GleeClub anim.SetBool("Mega", true); anim.Play("OpenMouth", 0, 0); shouldMegaClose = true; - if (currentSound != null) currentSound.Stop(); + if (currentSound != null) currentSound.KillLoop(); SoundByte.PlayOneShotGame("gleeClub/LoudWailStart"); currentSound = SoundByte.PlayOneShotGame("gleeClub/LoudWailLoop", -1, currentPitch, 1f, true); BeatAction.New(game, new List() @@ -95,7 +95,7 @@ namespace HeavenStudio.Games.Scripts_GleeClub anim.SetBool("Mega", false); shouldMegaClose = false; anim.Play("OpenMouth", 0, 0); - if (currentSound != null) currentSound.Stop(); + if (currentSound != null) currentSound.KillLoop(); currentSound = SoundByte.PlayOneShotGame("gleeClub/WailLoop", -1, currentPitch, 1f, true); } @@ -104,7 +104,8 @@ namespace HeavenStudio.Games.Scripts_GleeClub if (!singing || disappeared) return; singing = false; anim.Play(mega ? "MegaCloseMouth" : "CloseMouth", 0, 0); - if (currentSound != null) currentSound.Stop(); + if (currentSound != null) currentSound.KillLoop(); + currentSound = null; if (playSound) SoundByte.PlayOneShotGame("gleeClub/StopWail"); } } diff --git a/Assets/Scripts/Games/GleeClub/GleeClub.cs b/Assets/Scripts/Games/GleeClub/GleeClub.cs index 7b2e213aa..567e4acd8 100644 --- a/Assets/Scripts/Games/GleeClub/GleeClub.cs +++ b/Assets/Scripts/Games/GleeClub/GleeClub.cs @@ -26,17 +26,17 @@ namespace HeavenStudio.Games.Loaders resizable = true, parameters = new List() { - new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -5, 4, 5, "gleeClub/WailPreview"), "Semitones", "Set the number of semitones up or down this note should be pitched."), - new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 4, 5, "gleeClub/WailPreview"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."), - new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 4, 5, "gleeClub/WailPreview"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -5, 4, 5, "gleeClub/WailLoop"), "Semitones", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 4, 5, "gleeClub/WailLoop"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 4, 5, "gleeClub/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."), new Param("close", GleeClub.MouthOpenClose.Both, "Close/Open Mouth", "Choose if the chorus kids should close or open their mouth."), new Param("repeat", false, "Repeating", "Toggle if the left and middle chorus kid should repeat this singing cue.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "semiTonesLeft2", "semiTonesLeft3", "semiTonesMiddle2" }) }), - new Param("semiTonesLeft2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Repeat Left First)", "Set the number of semitones up or down this note should be pitched."), - new Param("semiTonesLeft3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Repeat Left Last)", "Set the number of semitones up or down this note should be pitched."), - new Param("semiTonesMiddle2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Repeat Middle)", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTonesLeft2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Repeat Left First)", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTonesLeft3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Repeat Left Last)", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTonesMiddle2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Repeat Middle)", "Set the number of semitones up or down this note should be pitched."), } }, new GameAction("baton", "Baton") @@ -50,9 +50,9 @@ namespace HeavenStudio.Games.Loaders defaultLength = 4f, parameters = new List() { - new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 4, 5, "gleeClub/WailPreview"), "Semitones", "Set the number of semitones up or down this note should be pitched."), - new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 4, 5, "gleeClub/WailPreview"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."), - new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 10, 4, 5, "gleeClub/WailPreview"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 4, 5, "gleeClub/WailLoop"), "Semitones", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 4, 5, "gleeClub/WailLoop"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 10, 4, 5, "gleeClub/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."), new Param("pitch", new EntityTypes.Float(0f, 5f, 1f), "Conductor Voice Pitch", "Choose the pitch of the conductor's voice. 1 is normal pitch.") } }, @@ -62,9 +62,9 @@ namespace HeavenStudio.Games.Loaders defaultLength = 0.5f, parameters = new List() { - new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones", "Set the number of semitones up or down this note should be pitched."), - new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."), - new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."), + new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."), } }, new GameAction("presence", "Toggle Chorus Kids") diff --git a/Assets/Scripts/Games/LaunchParty/LaunchParty.cs b/Assets/Scripts/Games/LaunchParty/LaunchParty.cs index 59c8e88ce..5c5829496 100644 --- a/Assets/Scripts/Games/LaunchParty/LaunchParty.cs +++ b/Assets/Scripts/Games/LaunchParty/LaunchParty.cs @@ -20,10 +20,10 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("offset", new EntityTypes.Float(-1, 2, -1), "Spawn Offset", "Set when the rocket should rise up."), - new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 0,4, "launchParty/rocket_note"), "1st Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 0,4, "launchParty/rocket_note"), "2nd Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 0,4, "launchParty/rocket_note"), "3rd Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0,4, "launchParty/rocket_note"), "4th Note", "Set the number of semitones up or down this note should be pitched.") + new Param("note1", new EntityTypes.Note(2, 0, 4, "launchParty/rocket_note"), "1st Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note2", new EntityTypes.Note(4, 0, 4, "launchParty/rocket_note"), "2nd Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note3", new EntityTypes.Note(5, 0, 4, "launchParty/rocket_note"), "3rd Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note4", new EntityTypes.Note(7, 0, 4, "launchParty/rocket_note"), "4th Note", "Set the number of semitones up or down this note should be pitched.") } }, new GameAction("partyCracker", "Party-Popper") @@ -33,12 +33,12 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("offset", new EntityTypes.Float(-1, 1, -1), "Spawn Offset", "Set when the rocket should rise up."), - new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 0, 4, "launchParty/popper_note"), "1st Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 0, 4, "launchParty/popper_note"), "2nd Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0, 4, "launchParty/popper_note"), "3rd Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 9, 0, 4, "launchParty/popper_note"), "4th Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note5", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 11, 0, 4, "launchParty/popper_note"), "5th Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note6", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 12, 0, 4, "launchParty/popper_note"), "6th Note", "Set the number of semitones up or down this note should be pitched.") + new Param("note1", new EntityTypes.Note(4, 0, 4, "launchParty/popper_note"), "1st Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note2", new EntityTypes.Note(5, 0, 4, "launchParty/popper_note"), "2nd Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note3", new EntityTypes.Note(7, 0, 4, "launchParty/popper_note"), "3rd Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note4", new EntityTypes.Note(9, 0, 4, "launchParty/popper_note"), "4th Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note5", new EntityTypes.Note(11, 0, 4, "launchParty/popper_note"), "5th Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note6", new EntityTypes.Note(12, 0, 4, "launchParty/popper_note"), "6th Note", "Set the number of semitones up or down this note should be pitched.") } }, new GameAction("bell", "Bell") @@ -49,15 +49,15 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("offset", new EntityTypes.Float(-1, 1, -1), "Spawn Offset", "Set when the rocket should rise up."), - new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/bell_note"), "1st Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 0, 4, "launchParty/bell_short"), "2nd Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 0, 4, "launchParty/bell_short"), "3rd Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 0, 4, "launchParty/bell_short"), "4th Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note5", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0, 4, "launchParty/bell_short"), "5th Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note6", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 9, 0, 4, "launchParty/bell_short"), "6th Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note7", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 11, 0, 4, "launchParty/bell_short"), "7th Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note8", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 12, 0, 4, "launchParty/bell_short"), "8th Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note9", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/bell_blast"), "9th Note (Launch)", "Set the number of semitones up or down this note should be pitched."), + new Param("note1", new EntityTypes.Note(0, 0, 4, "launchParty/bell_note"), "1st Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note2", new EntityTypes.Note(2, 0, 4, "launchParty/bell_short"), "2nd Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note3", new EntityTypes.Note(4, 0, 4, "launchParty/bell_short"), "3rd Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note4", new EntityTypes.Note(5, 0, 4, "launchParty/bell_short"), "4th Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note5", new EntityTypes.Note(7, 0, 4, "launchParty/bell_short"), "5th Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note6", new EntityTypes.Note(9, 0, 4, "launchParty/bell_short"), "6th Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note7", new EntityTypes.Note(11, 0, 4, "launchParty/bell_short"), "7th Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note8", new EntityTypes.Note(12, 0, 4, "launchParty/bell_short"), "8th Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note9", new EntityTypes.Note(0, 0, 4, "launchParty/bell_blast"), "9th Note (Launch)", "Set the number of semitones up or down this note should be pitched."), } }, new GameAction("bowlingPin", "Bowling Pin") @@ -68,21 +68,21 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("offset", new EntityTypes.Float(-1, 1, -1), "Spawn Offset", "Set when the rocket should rise up."), - new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 0, 4, "launchParty/pin"), "1st Note", "Set the number of semitones up or down this note should be pitched."), - new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "2nd Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "3rd Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "4th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note5", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "5th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note6", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "6th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note7", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "7th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note8", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "8th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note9", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "9th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note10", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "10th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note11", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "11th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note12", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "12th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note13", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "13th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note14", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0, 4, "launchParty/flute"), "14th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), - new Param("note15", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0, 4, "launchParty/pin"), "15th Note", "The number of semitones up or down this note should be pitched") + new Param("note1", new EntityTypes.Note(5, 0, 4, "launchParty/pin"), "1st Note", "Set the number of semitones up or down this note should be pitched."), + new Param("note2", new EntityTypes.Note(-1, 0, 4, "launchParty/flute"), "2nd Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note3", new EntityTypes.Note(0, 0, 4, "launchParty/flute"), "3rd Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note4", new EntityTypes.Note(-1, 0, 4, "launchParty/flute"), "4th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note5", new EntityTypes.Note(0, 0, 4, "launchParty/flute"), "5th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note6", new EntityTypes.Note(-1, 0, 4, "launchParty/flute"), "6th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note7", new EntityTypes.Note(0, 0, 4, "launchParty/flute"), "7th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note8", new EntityTypes.Note(-1, 0, 4, "launchParty/flute"), "8th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note9", new EntityTypes.Note(0, 0, 4, "launchParty/flute"), "9th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note10", new EntityTypes.Note(-1, 0, 4, "launchParty/flute"), "10th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note11", new EntityTypes.Note(0, 0, 4, "launchParty/flute"), "11th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note12", new EntityTypes.Note(-1, 0, 4, "launchParty/flute"), "12th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note13", new EntityTypes.Note(0, 0, 4, "launchParty/flute"), "13th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note14", new EntityTypes.Note(7, 0, 4, "launchParty/flute"), "14th Note (Flute)", "Set the number of semitones up or down this note should be pitched."), + new Param("note15", new EntityTypes.Note(7, 0, 4, "launchParty/pin"), "15th Note", "The number of semitones up or down this note should be pitched") } }, new GameAction("posMove", "Change Launch Pad Position") diff --git a/Assets/Scripts/Games/MannequinFactory/MannequinFactory.cs b/Assets/Scripts/Games/MannequinFactory/MannequinFactory.cs index 9b9c85557..70d9f8585 100644 --- a/Assets/Scripts/Games/MannequinFactory/MannequinFactory.cs +++ b/Assets/Scripts/Games/MannequinFactory/MannequinFactory.cs @@ -64,7 +64,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 0.5f, parameters = new List() { - new Param("text", "Mannequin Factory", "Text", "The text to be displayed on the sign"), + new Param("text", "Mannequin Factory", "Text", "The text to be displayed on the sign."), } }, new GameAction("bgColor", "Change Background Color") @@ -79,7 +79,7 @@ namespace HeavenStudio.Games.Loaders { new Param("colorStart", new Color(0.97f, 0.94f, 0.51f, 1f), "Start Color", "The color to start fading from."), new Param("colorEnd", new Color(0.97f, 0.94f, 0.51f, 1f), "End Color", "The color to end the fade."), - new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "The ease to use for color fade", new() { + new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "The ease to use for color fade.", new() { new Param.CollapseParam((x, _) => (int)x != (int)Util.EasingFunction.Ease.Instant, new[] { "colorStart" }), }), }, diff --git a/Assets/Scripts/Games/Manzai/Manzai.cs b/Assets/Scripts/Games/Manzai/Manzai.cs index 708eb6571..ec04fe346 100644 --- a/Assets/Scripts/Games/Manzai/Manzai.cs +++ b/Assets/Scripts/Games/Manzai/Manzai.cs @@ -36,9 +36,9 @@ namespace HeavenStudio.Games.Loaders resizable = true, parameters = new List() { - new Param("who", Manzai.WhoBops.Both, "Who Bops?", "Which bird bops"), - new Param("bop", true, "Enable Bopping", "Whether to bop to the beat or not"), - new Param("auto", false, "Automatic?", "Whether to bop to the beat or not automatically"), + new Param("who", Manzai.WhoBops.Both, "Who Bops?", "Which bird bops."), + new Param("bop", true, "Enable Bopping", "Whether to bop to the beat or not."), + new Param("auto", false, "Automatic?", "Whether to bop to the beat or not automatically."), } }, new GameAction("pun", "Pun") @@ -106,9 +106,9 @@ namespace HeavenStudio.Games.Loaders resizable = true, parameters = new List() { - new Param("goToSide", Manzai.WhichSide.Outside, "Go to Which Side?", "Which side of the stage the birds will move to?"), + new Param("goToSide", Manzai.WhichSide.Outside, "Go to Which Side?", "Which side of the stage will the birds will move to?"), new Param("ease", EasingFunction.Ease.EaseOutQuad, "Ease", "Which ease should the movement have?"), - new Param("animation", true, "Play Animation?", "Whether the birds will use the slide animation"), + new Param("animation", true, "Play Animation?", "Whether the birds will use the slide animation."), }, }, new GameAction("lights", "Toggle Lights") @@ -120,7 +120,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 0.5f, parameters = new List() { - new Param("lightsEnabled", false, "Spotlights", "Whether the spotlights will be turned on"), + new Param("lightsEnabled", false, "Spotlights", "Whether the spotlights will be turned on."), }, }, new GameAction("crowd", "Crowd Animations") @@ -134,7 +134,7 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("animation", Manzai.CrowdAnimationList.Bop, "Animation", "What animation the crowd will play."), - new Param("loop", new EntityTypes.Integer(1, 16, 4), "Loop Interval (x4)", "How many quarter-beats the animation will wait before looping"), + new Param("loop", new EntityTypes.Integer(1, 16, 4), "Loop Interval (x4)", "How many quarter-beats the animation will wait before looping."), }, }}, new List() { "rvl", "normal" }, @@ -572,7 +572,7 @@ namespace HeavenStudio.Games if (crowdSound != null) { - crowdSound.Stop(); + crowdSound.KillLoop(); } } @@ -588,7 +588,7 @@ namespace HeavenStudio.Games { if (crowdSound != null) { - crowdSound.Stop(); + crowdSound.KillLoop(); } crowdSound = SoundByte.PlayOneShotGame("manzai/disappointed"); @@ -774,7 +774,7 @@ namespace HeavenStudio.Games if (crowdSound != null) { - crowdSound.Stop(); + crowdSound.KillLoop(); } } @@ -782,7 +782,7 @@ namespace HeavenStudio.Games { if (crowdSound != null) { - crowdSound.Stop(); + crowdSound.KillLoop(); } if (!missedWithWrongButton) diff --git a/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs b/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs index e3fed6f29..9f1a56aeb 100644 --- a/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs +++ b/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs @@ -146,7 +146,7 @@ namespace HeavenStudio.Games.Loaders new Param("colorPipes1", new Color(0.41f, 0.54f, 0.34f), "Pipe Outline Color", "Set the color of the pipes' outline."), new Param("colorPipes2", new Color(0.43f, 0.8f, 0.45f), "Pipe Shading Color", "Set the color of the pipes' shading."), new Param("colorPipes3", new Color(0.48f, 0.89f, 0.54f), "Pipe Fill Color", "Set the color of the pipes."), - new Param("colorConveyor1", new Color(0.157f, 0.25f, 0.3f), "Conveyor Fill Color", "Set the color of the conveyer belt."), + new Param("colorConveyor1", new Color(0.157f, 0.25f, 0.3f), "Conveyor Fill Color", "Set the color of the conveyor belt."), new Param("colorConveyor2", new Color(0.55f, 0.57f, 0.04f), "Conveyor Trim Color", "Set the conveyor's trim color."), } }, diff --git a/Assets/Scripts/Games/MeatGrinder/MeatGrinder.cs b/Assets/Scripts/Games/MeatGrinder/MeatGrinder.cs index 7cb7e9c32..d7dde564c 100644 --- a/Assets/Scripts/Games/MeatGrinder/MeatGrinder.cs +++ b/Assets/Scripts/Games/MeatGrinder/MeatGrinder.cs @@ -13,14 +13,14 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { List reactionParams = new() { - new Param("tackReaction", MeatGrinder.TackExpressions.None, "Tack Reaction", "If this is hit, what expression should tack do?", new List() { + new Param("tackReaction", MeatGrinder.TackExpressions.None, "Tack Reaction", "If this is hit, what expression should Tack do?", new List() { new((x, y) => (int)x != (int)MeatGrinder.TackExpressions.None, new string[] { "tackReactionBeats" }), }), - new Param("tackReactionBeats", new EntityTypes.Float(0.5f, 10, 1), "Tack React After", "The amount of beats to wait until tack reacts"), - new Param("bossReaction", MeatGrinder.BossExpressions.None, "Boss Reaction", "If this is hit, what expression should boss do?", new List() { + new Param("tackReactionBeats", new EntityTypes.Float(0.5f, 10, 1), "Tack React After", "The number of beats to wait until Tack reacts"), + new Param("bossReaction", MeatGrinder.BossExpressions.None, "Boss Reaction", "If this is hit, what expression should Boss do?", new List() { new((x, y) => (int)x != (int)MeatGrinder.BossExpressions.None, new string[] { "bossReactionBeats" }), }), - new Param("bossReactionBeats", new EntityTypes.Float(0, 10, 0), "Boss React After", "The amount of beats to wait until boss reacts"), + new Param("bossReactionBeats", new EntityTypes.Float(0, 10, 0), "Boss React After", "The number of beats to wait until Boss reacts"), }; return new Minigame("meatGrinder", "Meat Grinder", "501d18", false, false, new List() diff --git a/Assets/Scripts/Games/MonkeyWatch/MonkeyWatch.cs b/Assets/Scripts/Games/MonkeyWatch/MonkeyWatch.cs index 5c3151fc9..b5a7b70cc 100644 --- a/Assets/Scripts/Games/MonkeyWatch/MonkeyWatch.cs +++ b/Assets/Scripts/Games/MonkeyWatch/MonkeyWatch.cs @@ -37,7 +37,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 2f, parameters = new List() { - new Param("min", new EntityTypes.Integer(0, 59, 0), "Set Starting Second", "A second is equivalent to one monkey.") + new Param("min", new EntityTypes.Integer(0, 59, 0), "Starting Second", "A second is equivalent to one monkey.") } }, new GameAction("off", "Pink Monkeys") @@ -99,7 +99,7 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("instant", false, "Instant"), - new Param("timeMode", MonkeyWatch.TimeMode.RealTime, "Time Mode", "Set the clock to system time or a certain time"), + new Param("timeMode", MonkeyWatch.TimeMode.RealTime, "Time Mode", "Set the clock to system time or a specific time."), new Param("hour", new EntityTypes.Integer(0, 12, 3), "Hour"), new Param("minute", new EntityTypes.Integer(0, 59, 0), "Minute") } @@ -115,7 +115,7 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("instant", false, "Instant"), - new Param("timeMode", MonkeyWatch.TimeMode.RealTime, "Time Mode", "Set the clock to system time or a certain time"), + new Param("timeMode", MonkeyWatch.TimeMode.RealTime, "Time Mode", "Set the clock to system time or a specific time."), new Param("hour", new EntityTypes.Integer(0, 12, 3), "Hour"), new Param("minute", new EntityTypes.Integer(0, 59, 0), "Minute") } diff --git a/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs b/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs index f2ed813a8..1f14665fb 100644 --- a/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs +++ b/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs @@ -10,7 +10,8 @@ namespace HeavenStudio.Games.Loaders using static Minigames; public static class AgbUpbeatLoader { - public static Minigame AddGame(EventCaller eventCaller) { + public static Minigame AddGame(EventCaller eventCaller) + { RiqEntity BackgroundUpdater(string datamodel, RiqEntity e) { if (datamodel == "mrUpbeat/changeBG" && e.dynamicData.ContainsKey("toggle") && !e.dynamicData.ContainsKey("ease")) @@ -96,7 +97,7 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("letter", "", "Letter To Appear", "Set the letter to appear on the blip."), - new Param("shouldGrow", true, "Grow Antenna", "Toggle if Mr. Upbeat's antennashould grow on every blip"), + new Param("shouldGrow", true, "Grow Antenna", "Toggle if Mr. Upbeat's antenna should grow on every blip"), new Param("resetBlip", false, "Reset Antenna", "Toggle if Mr. Upbeat's antenna should reset"), new Param("shouldBlip", true, "Should Blip", "Toggle if Mr. Upbeat's antenna should blip every offbeat."), new Param("blipLength", new EntityTypes.Integer(0, 4, 4), "Text Blip Requirement", "Set how many blips it will take for the text to appear on Mr. Upbeat’s antenna."), @@ -133,9 +134,9 @@ namespace HeavenStudio.Games.Loaders resizable = true, }, }, - new List() {"agb", "keep"}, + new List() { "agb", "keep" }, "agboffbeat", "en", - new List() {}, + new List() { }, chronologicalSortKey: 101 ); } @@ -197,7 +198,8 @@ namespace HeavenStudio.Games { List prevEntities = GameManager.instance.Beatmap.Entities.FindAll(c => c.beat <= beat && c.datamodel.Split(0) == "mrUpbeat"); - if (beat >= startBlippingBeat) { + if (beat >= startBlippingBeat) + { double tempBeat = ((beat % 1 == 0.5) ? Mathf.Floor((float)beat) : Mathf.Round((float)beat)) + (startBlippingBeat % 1); BeatAction.New(instance, new List() { new BeatAction.Action(tempBeat, delegate { man.RecursiveBlipping(tempBeat); }) @@ -209,17 +211,22 @@ namespace HeavenStudio.Games var bgColorEntity = prevEntities.FindLast(x => x.datamodel.Split(1) == "changeBG" && x.beat <= beat); var upbeatColorEntity = prevEntities.FindLast(x => x.datamodel.Split(1) == "upbeatColors" && x.beat <= beat); - if (bgColorEntity != null) { + if (bgColorEntity != null) + { bg.color = bgColorEntity["end"]; } - - if (upbeatColorEntity != null) { + + if (upbeatColorEntity != null) + { blipMaterial.SetColor("_ColorBravo", upbeatColorEntity["blipColor"]); Color shadowColor = upbeatColorEntity["shadowColor"]; - if (upbeatColorEntity["setShadow"]) foreach (var shadow in shadowSr) { - shadow.color = new Color(shadowColor.r, shadowColor.g, shadowColor.b, 1); - } - } else { + if (upbeatColorEntity["setShadow"]) foreach (var shadow in shadowSr) + { + shadow.color = new Color(shadowColor.r, shadowColor.g, shadowColor.b, 1); + } + } + else + { blipMaterial.SetColor("_ColorBravo", new Color(0, 1f, 0)); } } @@ -227,32 +234,38 @@ namespace HeavenStudio.Games public void Update() { bg.color = bgColorEase.GetColor(); - if (conductor.isPlaying && !conductor.isPaused) { - var songPos = conductor.songPositionInBeatsAsDouble; + if (conductor.isPlaying && !conductor.isPaused) + { + double songPos = conductor.songPositionInBeatsAsDouble; - if (songPos >= startSteppingBeat - 2) { + if (songPos >= startSteppingBeat - 2) + { man.canStep = true; } - if (songPos >= startSteppingBeat) { + if (songPos >= startSteppingBeat) + { RecursiveStepping(startSteppingBeat); startSteppingBeat = double.MaxValue; } - if (songPos >= startBlippingBeat) { + if (songPos >= startBlippingBeat) + { man.RecursiveBlipping(startBlippingBeat); startBlippingBeat = double.MaxValue; } + } + } - if (songPos > metronomeBeat + 1) - { - metronomeAnim.Play("MetronomeGo" + currentMetronomeDir, -1, 1); - metronomeAnim.speed = 0; - } - else if (songPos >= metronomeBeat) - { - metronomeAnim.DoScaledAnimation("MetronomeGo" + currentMetronomeDir, metronomeBeat, 1, ignoreSwing: false); - } + void LateUpdate() + { + if (conductor.isPlaying && !conductor.isPaused && metronomeBeat != double.MaxValue) + { + double songPos = conductor.songPositionInBeatsAsDouble; + currentMetronomeDir = songPos >= metronomeBeat && songPos <= metronomeBeat + 1 + ? (stepIterate % 2 == 0) ? "Right" : "Left" + : (stepIterate % 2 == 1) ? "Right" : "Left"; + metronomeAnim.DoScaledAnimation("MetronomeGo" + currentMetronomeDir, metronomeBeat, 1, clamp: true, ignoreSwing: false); } } @@ -282,7 +295,8 @@ namespace HeavenStudio.Games public static void PrePrepare(double beat, float length, bool mrDownbeat) { bool isGame = GameManager.instance.currentGame == "mrUpbeat"; - if (!mrDownbeat) { + if (!mrDownbeat) + { beat = Mathf.Floor((float)beat) + 0.5; length = Mathf.Round(length); } @@ -299,12 +313,12 @@ namespace HeavenStudio.Games private void RecursiveStepping(double beat) { - if (stopStepping) { + if (stopStepping) + { stopStepping = false; return; } - currentMetronomeDir = (stepIterate % 2 == 1) ? "Right" : "Left"; - SoundByte.PlayOneShotGame($"mrUpbeat/metronome{currentMetronomeDir}"); + SoundByte.PlayOneShotGame($"mrUpbeat/metronome{((stepIterate % 2 == 1) ? "Right" : "Left")}"); metronomeBeat = beat; ScheduleStep(beat); BeatAction.New(this, new List() { @@ -319,9 +333,9 @@ namespace HeavenStudio.Games for (int i = 0; i < length; i++) { ScheduleStep(beat + i); - actions.Add(new BeatAction.Action(beat + i, delegate { - currentMetronomeDir = (stepIterate % 2 == 1) ? "Right" : "Left"; - SoundByte.PlayOneShotGame($"mrUpbeat/metronome{currentMetronomeDir}"); + actions.Add(new BeatAction.Action(beat + i, delegate + { + SoundByte.PlayOneShotGame($"mrUpbeat/metronome{((stepIterate % 2 == 1) ? "Right" : "Left")}"); metronomeBeat = beat + i; stepIterate++; })); @@ -335,7 +349,8 @@ namespace HeavenStudio.Games if (gameSwitch.beat <= beat || gameSwitch.beat >= beat + length + 1) return; List inactiveBlips = new(); - for (int i = 0; i < gameSwitch.beat - beat; i++) { + for (int i = 0; i < gameSwitch.beat - beat; i++) + { inactiveBlips.Add(new MultiSound.Sound("mrUpbeat/blip", beat + i)); } @@ -362,9 +377,10 @@ namespace HeavenStudio.Games { blipMaterial.SetColor("_ColorBravo", blipColor); - if (setShadow) foreach (var shadow in shadowSr) { - shadow.color = new Color(shadowColor.r, shadowColor.g, shadowColor.b, 1); - } + if (setShadow) foreach (var shadow in shadowSr) + { + shadow.color = new Color(shadowColor.r, shadowColor.g, shadowColor.b, 1); + } } public void BlipEvents(string inputLetter, bool shouldGrow, bool resetBlip, bool shouldBlip, int blipLength) @@ -384,11 +400,12 @@ namespace HeavenStudio.Games public static void CountIn(double beat, float length, bool a) { var sound = new List(); - if (a) sound.Add(new MultiSound.Sound("mrUpbeat/a", beat - (0.5f * (length/4)))); - for (int i = 0; i < 4; i++) { + if (a) sound.Add(new MultiSound.Sound("mrUpbeat/a", beat - (0.5f * (length / 4)))); + for (int i = 0; i < 4; i++) + { sound.Add(new MultiSound.Sound("mrUpbeat/" + (i + 1), beat + (i * (length / 4)), offset: (i == 3) ? 0.05 : 0)); } - + MultiSound.Play(sound.ToArray(), forcePlay: true); } diff --git a/Assets/Scripts/Games/OctopusMachine/OctopusMachine.cs b/Assets/Scripts/Games/OctopusMachine/OctopusMachine.cs index 74832afcc..c1a6a68f4 100644 --- a/Assets/Scripts/Games/OctopusMachine/OctopusMachine.cs +++ b/Assets/Scripts/Games/OctopusMachine/OctopusMachine.cs @@ -20,8 +20,8 @@ namespace HeavenStudio.Games.Loaders OctopusMachine.instance.Bop(e.length, e["whichBop"], e["singleBop"], e["keepBop"]); }, parameters = new List() { - new Param("singleBop", true, "Bop", "Toggle if the octopodes should bop for the duration of this event. Since this event is not stretchable, they will only bop once."), - new Param("keepBop", false, "Bop (Auto)", "Toggle if the octopodes should automatically bop until another Bop event is reached."), + new Param("singleBop", true, "Bop", "Toggle if the Octo-Pops should bop for the duration of this event. Since this event is not stretchable, they will only bop once."), + new Param("keepBop", false, "Bop (Auto)", "Toggle if the Octo-Pops should automatically bop until another Bop event is reached."), new Param("whichBop", OctopusMachine.Bops.Bop, "Which Bop", "Set the type of bop."), }, }, @@ -42,11 +42,11 @@ namespace HeavenStudio.Games.Loaders }, resizable = true, parameters = new List() { - new Param("shouldPrep", true, "Prepare", "Toggle if the octopodes should automatically prepare for this cue.", new List() + new Param("shouldPrep", true, "Prepare", "Toggle if the Octo-Pops should automatically prepare for this cue.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "prepBeats" }) }), - new Param("prepBeats", new EntityTypes.Float(0, 4, 1), "Prepare Beats", "Set how many beats before the cue the octopodes should prepare."), + new Param("prepBeats", new EntityTypes.Float(0, 4, 1), "Prepare Beats", "Set how many beats before the cue the Octo-Pops should prepare."), }, preFunctionLength = 4f, preFunction = delegate { @@ -81,7 +81,7 @@ namespace HeavenStudio.Games.Loaders }, parameters = new List() { new Param("forceBop", true, "Force Bop", "Toggle if a bop should be forced to play, even if an animation is already playing."), - new Param("autoBop", true, "Hit/Miss Bop", "Toggle if the octopodes should bop depending on if you hit or missed the cues."), + new Param("autoBop", true, "Hit/Miss Bop", "Toggle if the Octo-Pops should bop depending on if you hit or missed the cues."), new Param("autoText", true, "Display Text", "Toggle if text should display depending on if you hit or missed the cues.", new List() { new Param.CollapseParam((x, _) => (bool)x, new string[] { "hitText", "missText" }) @@ -135,8 +135,8 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("color1", new Color(1f, 0.87f, 0.24f), "Start BG Color", "Set the color at the start of the event."), new Param("color2", new Color(1f, 0.87f, 0.24f), "End BG Color", "Set the color at the end of the event."), - new Param("octoColor", new Color(0.97f, 0.235f, 0.54f), "Octopodes' Color", "Set the octopodes' colors."), - new Param("squeezedColor", new Color(1f, 0f, 0f), "Squeezed Color", "Set the octopodes' colors when they're squeezed."), + new Param("octoColor", new Color(0.97f, 0.235f, 0.54f), "Octo-Pops' Color", "Set the Octo-Pops' colors."), + new Param("squeezedColor", new Color(1f, 0f, 0f), "Squeezed Color", "Set the Octo-Pops' colors when they're squeezed."), new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action."), }, resizable = true, diff --git a/Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs b/Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs index c4763d2b4..fece6aab6 100644 --- a/Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs +++ b/Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs @@ -24,8 +24,8 @@ namespace HeavenStudio.Games.Loaders resizable = true, parameters = new List() { - new Param("bop", true, "Bop", "Toggle if the paddlers should bop for the duration of this event."), - new Param("bopAuto", false, "Bop (Auto)", "Toggle if the paddlers should automatically bop until another Bop event is reached.") + new Param("bop", true, "Bop", "Toggle if the hand should bop for the duration of this event."), + new Param("bopAuto", false, "Bop (Auto)", "Toggle if the hand should automatically bop until another Bop event is reached.") } }, new GameAction("re", "Re (レ)") @@ -64,7 +64,7 @@ namespace HeavenStudio.Games.Loaders e["korean"] ? (int)PowerCalligraphy.CharacterType.face_kr : (int)PowerCalligraphy.CharacterType.face); }, parameters = new List() { - new Param("korean", false, "Korean Version", "Change the character to Korean version. (つ3ニハ○○ムし)"), + new Param("korean", false, "Korean Version", "Change the character to the Korean version. (つ3ニハ○○ムし)"), }, defaultLength = 12f, }, diff --git a/Assets/Scripts/Games/RhythmTweezers/LongHair.cs b/Assets/Scripts/Games/RhythmTweezers/LongHair.cs index e6b627f7d..40b5875f5 100644 --- a/Assets/Scripts/Games/RhythmTweezers/LongHair.cs +++ b/Assets/Scripts/Games/RhythmTweezers/LongHair.cs @@ -66,7 +66,7 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers tweezers.hitOnFrame++; if (pullSound != null) - pullSound.Stop(); + pullSound.KillLoop(); pluckState = -1; } @@ -78,7 +78,7 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers tweezers.anim.Play("Tweezers_Idle", 0, 0); if (pullSound != null) - pullSound.Stop(); + pullSound.KillLoop(); pluckState = -1; game.ScoreMiss(); diff --git a/Assets/Scripts/Games/Rockers/Rockers.cs b/Assets/Scripts/Games/Rockers/Rockers.cs index 67a954e28..96b2265e2 100644 --- a/Assets/Scripts/Games/Rockers/Rockers.cs +++ b/Assets/Scripts/Games/Rockers/Rockers.cs @@ -35,25 +35,25 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("respond", true, "Respond", "Toggle if this guitar riff will have to be responded to by Soshi (the player)."), - new Param("1JJ", new EntityTypes.Integer(-1, 24, 0), "E2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("2JJ", new EntityTypes.Integer(-1, 24, 0), "A2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("3JJ", new EntityTypes.Integer(-1, 24, 0), "D3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("4JJ", new EntityTypes.Integer(-1, 24, 0), "G3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("5JJ", new EntityTypes.Integer(-1, 24, 0), "B3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("6JJ", new EntityTypes.Integer(-1, 24, 0), "E4 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("sampleJJ", Rockers.PremadeSamples.None, "Premade Sample (JJ)", "Set if this riff should use a premade sample."), - new Param("pitchSampleJJ", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("1JJ", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "E2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("2JJ", new EntityTypes.Note(-1, 24, 0, 0, 2, offsetToC: false), "A2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("3JJ", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("4JJ", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("5JJ", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "B3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("6JJ", new EntityTypes.Note(-1, 24, 0, 7, 4, offsetToC: false), "E4 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("sampleJJ", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleJJ"), "Premade Sample (JJ)", "Set if this riff should use a premade sample."), + new Param("pitchSampleJJ", new EntityTypes.Note(offsetToC: false), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."), new Param("gcJJ", false, "Glee Club Guitar (JJ)", "Toggle if JJ should use the same guitar as in the Glee Club guitar lessons in DS."), - new Param("1S", new EntityTypes.Integer(-1, 24, 0), "E2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("2S", new EntityTypes.Integer(-1, 24, 0), "A2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("3S", new EntityTypes.Integer(-1, 24, 0), "D3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("4S", new EntityTypes.Integer(-1, 24, 0), "G3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("5S", new EntityTypes.Integer(-1, 24, 0), "B3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("6S", new EntityTypes.Integer(-1, 24, 0), "E4 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("sampleS", Rockers.PremadeSamples.None, "Premade Sample (Soshi)", "Set if this riff should use a premade sample."), - new Param("pitchSampleS", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("1S", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "E2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("2S", new EntityTypes.Note(-1, 24, 0, 0, 2, offsetToC: false), "A2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("3S", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("4S", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("5S", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "B3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("6S", new EntityTypes.Note(-1, 24, 0, 7, 4, offsetToC: false), "E4 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("sampleS", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleS"), "Premade Sample (Soshi)", "Set if this riff should use a premade sample."), + new Param("pitchSampleS", new EntityTypes.Note(offsetToC: false), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."), new Param("gcS", false, "Glee Club Guitar (Soshi)", "Toggle if Soshi should use the same guitar as in the Glee Club guitar lessons in DS.") - }, + } }, new GameAction("bend", "Bend") { @@ -125,22 +125,22 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("moveCamera", true, "Move Camera", "Toggle if the camera should move to the middle."), - new Param("JJ1", Rockers.PremadeSamples.ChordG5, "Premade Sample 1 (JJ)", "Set the sample to use for the 1st riff."), - new Param("pJJ1", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."), - new Param("JJ2", Rockers.PremadeSamples.ChordG5, "Premade Sample 2 (JJ)", "Set the sample to use for the 2nd riff."), - new Param("pJJ2", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."), - new Param("JJ3", Rockers.PremadeSamples.ChordG5, "Premade Sample 3 (JJ)", "Set the sample to use for the 3rd riff."), - new Param("pJJ3", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."), - new Param("JJ4", Rockers.PremadeSamples.ChordA, "Premade Sample 4 (JJ)", "Set the sample to use for the final riff."), - new Param("pJJ4", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 4 (JJ)", "Set how many semitones the premade sample should be pitched up."), - new Param("S1", Rockers.PremadeSamples.ChordG, "Premade Sample 1 (Soshi)", "Set the sample to use for the 1st riff."), - new Param("pS1", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."), - new Param("S2", Rockers.PremadeSamples.ChordG, "Premade Sample 2 (Soshi)", "Set the sample to use for the 2nd riff."), - new Param("pS2", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."), - new Param("S3", Rockers.PremadeSamples.ChordG, "Premade Sample 3 (Soshi)", "Set the sample to use for the 3rd riff."), - new Param("pS3", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."), - new Param("S4", Rockers.PremadeSamples.ChordA, "Premade Sample 4 (Soshi)", "Set the sample to use for the final riff."), - new Param("pS4", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 4 (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("JJ1", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG5, Rockers.GetSample, "pJJ1"), "Premade Sample 1 (JJ)", "Set the sample to use for the 1st riff."), + new Param("pJJ1", new EntityTypes.Note(offsetToC: false), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("JJ2", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG5, Rockers.GetSample, "pJJ2"), "Premade Sample 2 (JJ)", "Set the sample to use for the 2nd riff."), + new Param("pJJ2", new EntityTypes.Note(offsetToC: false), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("JJ3", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG5, Rockers.GetSample, "pJJ3"), "Premade Sample 3 (JJ)", "Set the sample to use for the 3rd riff."), + new Param("pJJ3", new EntityTypes.Note(offsetToC: false), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("JJ4", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordA, Rockers.GetSample, "pJJ4"), "Premade Sample 4 (JJ)", "Set the sample to use for the final riff."), + new Param("pJJ4", new EntityTypes.Note(offsetToC: false), "Sample Semitones 4 (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("S1", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG, Rockers.GetSample, "pS1"), "Premade Sample 1 (Soshi)", "Set the sample to use for the 1st riff."), + new Param("pS1", new EntityTypes.Note(offsetToC: false), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("S2", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG, Rockers.GetSample, "pS2"), "Premade Sample 2 (Soshi)", "Set the sample to use for the 2nd riff."), + new Param("pS2", new EntityTypes.Note(offsetToC: false), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("S3", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG, Rockers.GetSample, "pS3"), "Premade Sample 3 (Soshi)", "Set the sample to use for the 3rd riff."), + new Param("pS3", new EntityTypes.Note(offsetToC: false), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("S4", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordA, Rockers.GetSample, "pS4"), "Premade Sample 4 (Soshi)", "Set the sample to use for the final riff."), + new Param("pS4", new EntityTypes.Note(offsetToC: false), "Sample Semitones 4 (Soshi)", "Set how many semitones the premade sample should be pitched up."), } }, new GameAction("lastOne", "Last One!") @@ -171,18 +171,18 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("moveCamera", true, "Move Camera", "Toggle if the camera should move to the middle."), - new Param("JJ1", Rockers.PremadeSamples.ChordAsus4, "Premade Sample 1 (JJ)", "Set the sample to use for the 1st riff."), - new Param("pJJ1", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."), - new Param("JJ2", Rockers.PremadeSamples.ChordAsus4, "Premade Sample 2 (JJ)", "Set the sample to use for the 2nd riff."), - new Param("pJJ2", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."), - new Param("JJ3", Rockers.PremadeSamples.ChordAsus4, "Premade Sample 3 (JJ)", "Set the sample to use for the final riff."), - new Param("pJJ3", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."), - new Param("S1", Rockers.PremadeSamples.ChordDmaj9, "Premade Sample 1 (Soshi)", "Set the sample to use for the 1st riff."), - new Param("pS1", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."), - new Param("S2", Rockers.PremadeSamples.ChordDmaj9, "Premade Sample 2 (Soshi)", "Set the sample to use for the 2nd riff."), - new Param("pS2", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."), - new Param("S3", Rockers.PremadeSamples.ChordDmaj9, "Premade Sample 3 (Soshi)", "Set the sample to use for the final riff."), - new Param("pS3", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("JJ1", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordAsus4, Rockers.GetSample, "pJJ1"), "Premade Sample 1 (JJ)", "Set the sample to use for the 1st riff."), + new Param("pJJ1", new EntityTypes.Note(offsetToC: false), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("JJ2", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordAsus4, Rockers.GetSample, "pJJ2"), "Premade Sample 2 (JJ)", "Set the sample to use for the 2nd riff."), + new Param("pJJ2", new EntityTypes.Note(offsetToC: false), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("JJ3", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordAsus4, Rockers.GetSample, "pJJ3"), "Premade Sample 3 (JJ)", "Set the sample to use for the final riff."), + new Param("pJJ3", new EntityTypes.Note(offsetToC: false), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("S1", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordDmaj9, Rockers.GetSample, "pS1"), "Premade Sample 1 (Soshi)", "Set the sample to use for the 1st riff."), + new Param("pS1", new EntityTypes.Note(offsetToC: false), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("S2", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordDmaj9, Rockers.GetSample, "pS2"), "Premade Sample 2 (Soshi)", "Set the sample to use for the 2nd riff."), + new Param("pS2", new EntityTypes.Note(offsetToC: false), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("S3", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordDmaj9, Rockers.GetSample, "pS3"), "Premade Sample 3 (Soshi)", "Set the sample to use for the final riff."), + new Param("pS3", new EntityTypes.Note(offsetToC: false), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."), } }, new GameAction("count", "Count") @@ -240,23 +240,23 @@ namespace HeavenStudio.Games.Loaders resizable = true, parameters = new List() { - new Param("1JJ", new EntityTypes.Integer(-1, 24, 0), "E2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("2JJ", new EntityTypes.Integer(-1, 24, 0), "A2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("3JJ", new EntityTypes.Integer(-1, 24, 0), "D3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("4JJ", new EntityTypes.Integer(-1, 24, 0), "G3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("5JJ", new EntityTypes.Integer(-1, 24, 0), "B3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("6JJ", new EntityTypes.Integer(-1, 24, 0), "E4 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("sampleJJ", Rockers.PremadeSamples.None, "Premade Sample (JJ)", "Set if this riff should use a premade sample."), - new Param("pitchSampleJJ", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("1JJ", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "E2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("2JJ", new EntityTypes.Note(-1, 24, 0, 0, 2, offsetToC: false), "A2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("3JJ", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("4JJ", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("5JJ", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "B3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("6JJ", new EntityTypes.Note(-1, 24, 0, 7, 4, offsetToC: false), "E4 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("sampleJJ", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleJJ"), "Premade Sample (JJ)", "Set if this riff should use a premade sample."), + new Param("pitchSampleJJ", new EntityTypes.Note(offsetToC: false), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."), new Param("gcJJ", false, "Glee Club Guitar (JJ)", "Toggle if JJ should use the same guitar as in the Glee Club guitar lessons in DS."), - new Param("1S", new EntityTypes.Integer(-1, 24, 0), "E2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("2S", new EntityTypes.Integer(-1, 24, 0), "A2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("3S", new EntityTypes.Integer(-1, 24, 0), "D3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("4S", new EntityTypes.Integer(-1, 24, 0), "G3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("5S", new EntityTypes.Integer(-1, 24, 0), "B3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("6S", new EntityTypes.Integer(-1, 24, 0), "E4 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("sampleS", Rockers.PremadeSamples.None, "Premade Sample (Soshi)", "Set if this riff should use a premade sample."), - new Param("pitchSampleS", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("1S", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "E2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("2S", new EntityTypes.Note(-1, 24, 0, 0, 2, offsetToC: false), "A2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("3S", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("4S", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("5S", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "B3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("6S", new EntityTypes.Note(-1, 24, 0, 7, 4, offsetToC: false), "E4 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("sampleS", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleS"), "Premade Sample (Soshi)", "Set if this riff should use a premade sample."), + new Param("pitchSampleS", new EntityTypes.Note(offsetToC: false), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."), new Param("gcS", false, "Glee Club Guitar (Soshi)", "Toggle if Soshi should use the same guitar as in the Glee Club guitar lessons in DS.") } }, @@ -265,23 +265,23 @@ namespace HeavenStudio.Games.Loaders resizable = true, parameters = new List() { - new Param("1JJ", new EntityTypes.Integer(-1, 24, 0), "E2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("2JJ", new EntityTypes.Integer(-1, 24, 0), "A2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("3JJ", new EntityTypes.Integer(-1, 24, 0), "D3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("4JJ", new EntityTypes.Integer(-1, 24, 0), "G3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("5JJ", new EntityTypes.Integer(-1, 24, 0), "B3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("6JJ", new EntityTypes.Integer(-1, 24, 0), "E4 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("sampleJJ", Rockers.PremadeSamples.None, "Premade Sample (JJ)", "Set if this riff should use a premade sample."), - new Param("pitchSampleJJ", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."), + new Param("1JJ", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "E2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("2JJ", new EntityTypes.Note(-1, 24, 0, 0, 2, offsetToC: false), "A2 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("3JJ", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("4JJ", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("5JJ", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "B3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("6JJ", new EntityTypes.Note(-1, 24, 0, 7, 4, offsetToC: false), "E4 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("sampleJJ", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleJJ"), "Premade Sample (JJ)", "Set if this riff should use a premade sample."), + new Param("pitchSampleJJ", new EntityTypes.Note(offsetToC: false), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."), new Param("gcJJ", false, "Glee Club Guitar (JJ)", "Toggle if JJ should use the same guitar as in the Glee Club guitar lessons in DS."), - new Param("1S", new EntityTypes.Integer(-1, 24, 0), "E2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("2S", new EntityTypes.Integer(-1, 24, 0), "A2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("3S", new EntityTypes.Integer(-1, 24, 0), "D3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("4S", new EntityTypes.Integer(-1, 24, 0), "G3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("5S", new EntityTypes.Integer(-1, 24, 0), "B3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("6S", new EntityTypes.Integer(-1, 24, 0), "E4 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), - new Param("sampleS", Rockers.PremadeSamples.None, "Premade Sample (Soshi)", "Set if this riff should use a premade sample."), - new Param("pitchSampleS", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."), + new Param("1S", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "E2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("2S", new EntityTypes.Note(-1, 24, 0, 0, 2, offsetToC: false), "A2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("3S", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("4S", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("5S", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "B3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("6S", new EntityTypes.Note(-1, 24, 0, 7, 4, offsetToC: false), "E4 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."), + new Param("sampleS", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleS"), "Premade Sample (Soshi)", "Set if this riff should use a premade sample."), + new Param("pitchSampleS", new EntityTypes.Note(offsetToC: false), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."), new Param("gcS", false, "Glee Club Guitar (Soshi)", "Toggle if Soshi should use the same guitar as in the Glee Club guitar lessons in DS.") } }, @@ -341,6 +341,58 @@ namespace HeavenStudio.Games DoremiNoteA2, DoremiNoteE2 } + + public static readonly Dictionary NoteSamples = new() + { + { PremadeSamples.None, new NoteSample() }, + { PremadeSamples.BendG5, new("rockers/BendG5", 10, 5) }, + { PremadeSamples.BendC6, new("rockers/BendC6", 3, 6) }, + { PremadeSamples.ChordA, new("rockers/rocker/rockerChordA", 0, 4) }, + { PremadeSamples.ChordAsus4, new("rockers/rocker/rockerChordAsus4", 0, 4) }, + { PremadeSamples.ChordBm, new("rockers/rocker/rockerChordBm", 2, 4) }, + { PremadeSamples.ChordCSharpm7, new("rockers/rocker/rockerChordC#m7", 4, 4) }, + { PremadeSamples.ChordDmaj7, new("rockers/rocker/rockerChordDmaj7", 5, 4) }, + { PremadeSamples.ChordDmaj9, new("rockers/rocker/rockerChordDmaj9", 5, 4) }, + { PremadeSamples.ChordFSharp5, new("rockers/rocker/rockerChordF#5", 9, 4) }, + { PremadeSamples.ChordG, new("rockers/rocker/rockerChordG", 10, 4) }, + { PremadeSamples.ChordG5, new("rockers/rocker/rockerChordG5", 10, 4) }, + { PremadeSamples.ChordGdim7, new("rockers/rocker/rockerChordGdim7", 10, 4) }, + { PremadeSamples.ChordGm, new("rockers/rocker/rockerChordGm", 10, 4) }, + { PremadeSamples.NoteASharp4, new("rockers/rocker/rockerNoteA#4", 1, 4) }, + { PremadeSamples.NoteA5, new("rockers/rocker/rockerNoteA5", 0, 5) }, + { PremadeSamples.PracticeChordD, new("rockers/rocker/rockerPracticeChordD", 5, 4) }, + { PremadeSamples.Remix6ChordA, new("rockers/rocker/rockerRemix6ChordA", 0, 4) }, + { PremadeSamples.Remix10ChordD, new("rockers/rocker/rockerRemix10ChordD", 5, 4) }, + { PremadeSamples.Remix10ChordFSharpm, new("rockers/rocker/rockerRemix10ChordF#m", 9, 4) }, + { PremadeSamples.DoremiChordA7, new("rockers/doremi/doremiChordA7", 0, 4) }, + { PremadeSamples.DoremiChordAm7, new("rockers/doremi/doremiChordAm7", 0, 4) }, + { PremadeSamples.DoremiChordC, new("rockers/doremi/doremiChordC", 3, 4) }, + { PremadeSamples.DoremiChordC7, new("rockers/doremi/doremiChordC7", 3, 4) }, + { PremadeSamples.DoremiChordCadd9, new("rockers/doremi/doremiChordCadd9", 3, 4) }, + { PremadeSamples.DoremiChordDm, new("rockers/doremi/doremiChordDm", 5, 4) }, + { PremadeSamples.DoremiChordDm7, new("rockers/doremi/doremiChordDm7", 5, 4) }, + { PremadeSamples.DoremiChordEm, new("rockers/doremi/doremiChordEm", 7, 4) }, + { PremadeSamples.DoremiChordF, new("rockers/doremi/doremiChordF", 8, 4) }, + { PremadeSamples.DoremiChordFadd9, new("rockers/doremi/doremiChordFadd9", 8, 4) }, + { PremadeSamples.DoremiChordFm, new("rockers/doremi/doremiChordFm", 8, 4) }, + { PremadeSamples.DoremiChordG, new("rockers/doremi/doremiChordG", 10, 4) }, + { PremadeSamples.DoremiChordG7, new("rockers/doremi/doremiChordG7", 10, 4) }, + { PremadeSamples.DoremiChordGm, new("rockers/doremi/doremiChordGm", 10, 4) }, + { PremadeSamples.DoremiChordGsus4, new("rockers/doremi/doremiChordGsus4", 10, 4) }, + { PremadeSamples.DoremiNoteA2, new("rockers/doremi/doremiNoteA2", 0, 2) }, + { PremadeSamples.DoremiNoteE2, new("rockers/doremi/doremiNoteE2", 7, 2) }, + }; + + public static NoteSample GetSample(object sampleEnum) + { + return NoteSamples[sampleEnum]; + } + + public static NoteSample GetSample(int sampleIndex) + { + return NoteSamples[(PremadeSamples)sampleIndex]; + } + public enum WhoMutes { JJ, @@ -700,7 +752,7 @@ namespace HeavenStudio.Games }), new BeatAction.Action(beat + 3, delegate { - JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[0], JJPitches[0]); + JJ.StrumStrings(false, new int[6], GetSample(JJSamples[0]), JJPitches[0]); }), new BeatAction.Action(beat + 3.5f, delegate { @@ -708,7 +760,7 @@ namespace HeavenStudio.Games }), new BeatAction.Action(beat + 4.5f, delegate { - JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[1], JJPitches[1]); + JJ.StrumStrings(false, new int[6], GetSample(JJSamples[1]), JJPitches[1]); }), new BeatAction.Action(beat + 5f, delegate { @@ -716,7 +768,7 @@ namespace HeavenStudio.Games }), new BeatAction.Action(beat + 6, delegate { - JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[2], JJPitches[2]); + JJ.StrumStrings(false, new int[6], GetSample(JJSamples[2]), JJPitches[2]); }), new BeatAction.Action(beat + 6.5f, delegate { @@ -724,15 +776,15 @@ namespace HeavenStudio.Games }), }); RockersInput riffComp = Instantiate(rockerInputRef, transform); - riffComp.Init(false, new int[6], beat, 3, (PremadeSamples)SoshiSamples[0], SoshiPitches[0]); + riffComp.Init(false, new int[6], beat, 3, GetSample(SoshiSamples[0]), SoshiPitches[0]); ScheduleInput(beat, 3.5f, InputAction_TriggerDown, JustMute, MuteMiss, Empty); RockersInput riffComp2 = Instantiate(rockerInputRef, transform); - riffComp2.Init(false, new int[6], beat, 4.5f, (PremadeSamples)SoshiSamples[1], SoshiPitches[1]); + riffComp2.Init(false, new int[6], beat, 4.5f, GetSample(SoshiSamples[1]), SoshiPitches[1]); ScheduleInput(beat, 5f, InputAction_TriggerDown, JustMute, MuteMiss, Empty); RockersInput riffComp3 = Instantiate(rockerInputRef, transform); - riffComp3.Init(false, new int[6], beat, 6, (PremadeSamples)SoshiSamples[2], SoshiPitches[2]); + riffComp3.Init(false, new int[6], beat, 6, GetSample(SoshiSamples[2]), SoshiPitches[2]); ScheduleInput(beat, 6.5f, InputAction_TriggerDown, JustMute, MuteMiss, Empty); } @@ -755,7 +807,7 @@ namespace HeavenStudio.Games }), new BeatAction.Action(beat + 3, delegate { - JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[0], JJPitches[0]); + JJ.StrumStrings(false, new int[6], GetSample(JJSamples[0]), JJPitches[0]); }), new BeatAction.Action(beat + 4, delegate { @@ -763,7 +815,7 @@ namespace HeavenStudio.Games }), new BeatAction.Action(beat + 4.5f, delegate { - JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[1], JJPitches[1]); + JJ.StrumStrings(false, new int[6], GetSample(JJSamples[1]), JJPitches[1]); }), new BeatAction.Action(beat + 5.5f, delegate { @@ -771,7 +823,7 @@ namespace HeavenStudio.Games }), new BeatAction.Action(beat + 6, delegate { - JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[2], JJPitches[2]); + JJ.StrumStrings(false, new int[6], GetSample(JJSamples[2]), JJPitches[2]); }), new BeatAction.Action(beat + 6.5, delegate { @@ -779,7 +831,7 @@ namespace HeavenStudio.Games }), new BeatAction.Action(beat + 7, delegate { - JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[3], JJPitches[3], false, true); + JJ.StrumStrings(false, new int[6], GetSample(JJSamples[3]), JJPitches[3], false, true); }), new BeatAction.Action(beat + 10, delegate { @@ -787,19 +839,19 @@ namespace HeavenStudio.Games }), }); RockersInput riffComp = Instantiate(rockerInputRef, transform); - riffComp.Init(false, new int[6], beat, 3, (PremadeSamples)SoshiSamples[0], SoshiPitches[0]); + riffComp.Init(false, new int[6], beat, 3, GetSample(SoshiSamples[0]), SoshiPitches[0]); ScheduleAutoplayInput(beat, 4, InputAction_BasicPress, JustMute, MuteMiss, Empty); RockersInput riffComp2 = Instantiate(rockerInputRef, transform); - riffComp2.Init(false, new int[6], beat, 4.5f, (PremadeSamples)SoshiSamples[1], SoshiPitches[1]); + riffComp2.Init(false, new int[6], beat, 4.5f, GetSample(SoshiSamples[1]), SoshiPitches[1]); ScheduleAutoplayInput(beat, 5.5f, InputAction_BasicPress, JustMute, MuteMiss, Empty); RockersInput riffComp3 = Instantiate(rockerInputRef, transform); - riffComp3.Init(false, new int[6], beat, 6, (PremadeSamples)SoshiSamples[2], SoshiPitches[2]); + riffComp3.Init(false, new int[6], beat, 6, GetSample(SoshiSamples[2]), SoshiPitches[2]); ScheduleInput(beat, 6.5f, InputAction_BasicPress, JustMute, MuteMiss, Empty); RockersInput riffComp4 = Instantiate(rockerInputRef, transform); - riffComp4.Init(false, new int[6], beat, 7, (PremadeSamples)SoshiSamples[3], SoshiPitches[3], true); + riffComp4.Init(false, new int[6], beat, 7, GetSample(SoshiSamples[3]), SoshiPitches[3], true); ScheduleAutoplayInput(beat, 10, InputAction_BasicPress, JustMute, MuteMiss, Empty); } @@ -845,12 +897,12 @@ namespace HeavenStudio.Games e["4JJ"], e["5JJ"], e["6JJ"], - }, (PremadeSamples)e["sampleJJ"], e["pitchSampleJJ"]); + }, GetSample(e["sampleJJ"]), e["pitchSampleJJ"]); })); actions.Add(new BeatAction.Action(e.beat + e.length, delegate { JJ.Mute(); })); RockersInput riffComp = Instantiate(rockerInputRef, transform); riffComp.Init(e["gcS"], new int[6] { e["1S"], e["2S"], e["3S"], e["4S"], e["5S"], e["6S"] }, beat, e.beat - beat, - (PremadeSamples)e["sampleS"], e["pitchSampleS"]); + GetSample(e["sampleS"]), e["pitchSampleS"]); if (e.length <= 0.5f) ScheduleInput(beat, e.beat - beat + e.length, InputAction_BasicPress, JustMute, MuteMiss, Empty); else ScheduleAutoplayInput(beat, e.beat - beat + e.length, InputAction_BasicPress, JustMute, MuteMiss, Empty); } @@ -866,12 +918,12 @@ namespace HeavenStudio.Games e["4JJ"], e["5JJ"], e["6JJ"], - }, (PremadeSamples)e["sampleJJ"], e["pitchSampleJJ"], false, true); + }, GetSample(e["sampleJJ"]), e["pitchSampleJJ"], false, true); })); actions.Add(new BeatAction.Action(e.beat + e.length, delegate { JJ.Mute(); })); RockersInput riffComp = Instantiate(rockerInputRef, transform); riffComp.Init(e["gcS"], new int[6] { e["1S"], e["2S"], e["3S"], e["4S"], e["5S"], e["6S"] }, beat, e.beat - beat, - (PremadeSamples)e["sampleS"], e["pitchSampleS"], true); + GetSample(e["sampleS"]), e["pitchSampleS"], true); if (e.length <= 0.5f) ScheduleInput(beat, e.beat - beat + e.length, InputAction_BasicPress, JustMute, MuteMiss, Empty); else ScheduleAutoplayInput(beat, e.beat - beat + e.length, InputAction_BasicPress, JustMute, MuteMiss, Empty); break; @@ -976,7 +1028,7 @@ namespace HeavenStudio.Games public void Riff(double beat, float length, int[] pitches, bool gleeClubJJ, int sampleJJ, int sampleTonesJJ, bool noRespond) { - JJ.StrumStrings(gleeClubJJ, pitches, (PremadeSamples)sampleJJ, sampleTonesJJ, noRespond); + JJ.StrumStrings(gleeClubJJ, pitches, GetSample(sampleJJ), sampleTonesJJ, noRespond); BeatAction.New(instance, new List() { new BeatAction.Action(beat + length, delegate { JJ.Mute(); }) @@ -1086,7 +1138,7 @@ namespace HeavenStudio.Games RockersInput riffComp = Instantiate(rockerInputRef, transform); riffComp.Init(crEvent["gcS"], new int[6] { crEvent["1S"], crEvent["2S"], crEvent["3S"], crEvent["4S"], crEvent["5S"], crEvent["6S"] }, beat, relativeBeat, - (PremadeSamples)crEvent["sampleS"], crEvent["pitchSampleS"]); + GetSample(crEvent["sampleS"]), crEvent["pitchSampleS"]); if (crEvent.length > 0.5f) ScheduleAutoplayInput(beat, relativeBeat + crEvent.length, InputAction_BasicPress, JustMute, MuteMiss, Empty); else ScheduleInput(beat, relativeBeat + crEvent.length, InputAction_BasicPress, JustMute, MuteMiss, Empty); } diff --git a/Assets/Scripts/Games/Rockers/RockersInput.cs b/Assets/Scripts/Games/Rockers/RockersInput.cs index 4ee865687..42548aaf3 100644 --- a/Assets/Scripts/Games/Rockers/RockersInput.cs +++ b/Assets/Scripts/Games/Rockers/RockersInput.cs @@ -11,14 +11,14 @@ namespace HeavenStudio.Games.Scripts_Rockers private bool gleeClub; - private Rockers.PremadeSamples sample; + private NoteSample sample; private int sampleTones; private bool jump; private Rockers game; - public void Init(bool gleeClub, int[] pitches, double beat, double length, Rockers.PremadeSamples sample, int sampleTones, bool jump = false) + public void Init(bool gleeClub, int[] pitches, double beat, double length, NoteSample sample, int sampleTones, bool jump = false) { game = Rockers.instance; this.gleeClub = gleeClub; diff --git a/Assets/Scripts/Games/Rockers/RockersRocker.cs b/Assets/Scripts/Games/Rockers/RockersRocker.cs index c8eabf693..e9a6f14f3 100644 --- a/Assets/Scripts/Games/Rockers/RockersRocker.cs +++ b/Assets/Scripts/Games/Rockers/RockersRocker.cs @@ -46,13 +46,17 @@ namespace HeavenStudio.Games.Scripts_Rockers { if (sound != null) { - sound.KillLoop(0); + sound.KillLoop(); } } + if (chordSound != null) { - chordSound.KillLoop(0); + chordSound.KillLoop(); + chordSound = null; } + + stringSounds = new Sound[6]; } public void PrepareTogether(bool forceMute = false) @@ -100,7 +104,7 @@ namespace HeavenStudio.Games.Scripts_Rockers } private bool lastGleeClub = false; - private Rockers.PremadeSamples lastSample; + private NoteSample lastSample; private int lastSampleTones; public void StrumStringsLast(bool disableStrumEffect = false, bool jump = false, bool barely = false) @@ -108,7 +112,7 @@ namespace HeavenStudio.Games.Scripts_Rockers StrumStrings(lastGleeClub, lastPitches, lastSample, lastSampleTones, disableStrumEffect, jump, barely); } - public void StrumStrings(bool gleeClub, int[] pitches, Rockers.PremadeSamples sample, int sampleTones, bool disableStrumEffect = false, bool jump = false, bool barely = false) + public void StrumStrings(bool gleeClub, int[] pitches, NoteSample sample, int sampleTones, bool disableStrumEffect = false, bool jump = false, bool barely = false) { if (strumming) return; lastGleeClub = gleeClub; @@ -117,7 +121,7 @@ namespace HeavenStudio.Games.Scripts_Rockers muted = false; strumming = true; StopSounds(); - if (sample == Rockers.PremadeSamples.None) + if (sample.sample == null) { lastPitches = pitches; for (int i = 0; i < pitches.Length; i++) @@ -133,48 +137,7 @@ namespace HeavenStudio.Games.Scripts_Rockers else { float pitch = SoundByte.GetPitchFromSemiTones(sampleTones, true); - string soundName = sample switch - { - Rockers.PremadeSamples.None => "", - Rockers.PremadeSamples.BendG5 => "rockers/BendG5", - Rockers.PremadeSamples.BendC6 => "rockers/BendC6", - Rockers.PremadeSamples.ChordA => "rockers/rocker/rockerChordA", - Rockers.PremadeSamples.ChordAsus4 => "rockers/rocker/rockerChordAsus4", - Rockers.PremadeSamples.ChordBm => "rockers/rocker/rockerChordBm", - Rockers.PremadeSamples.ChordCSharpm7 => "rockers/rocker/rockerChordC#m7", - Rockers.PremadeSamples.ChordDmaj7 => "rockers/rocker/rockerChordDmaj7", - Rockers.PremadeSamples.ChordDmaj9 => "rockers/rocker/rockerChordDmaj9", - Rockers.PremadeSamples.ChordFSharp5 => "rockers/rocker/rockerChordF#5", - Rockers.PremadeSamples.ChordG => "rockers/rocker/rockerChordG", - Rockers.PremadeSamples.ChordG5 => "rockers/rocker/rockerChordG5", - Rockers.PremadeSamples.ChordGdim7 => "rockers/rocker/rockerChordGdim7", - Rockers.PremadeSamples.ChordGm => "rockers/rocker/rockerChordGm", - Rockers.PremadeSamples.NoteASharp4 => "rockers/rocker/rockerNoteA#4", - Rockers.PremadeSamples.NoteA5 => "rockers/rocker/rockerNoteA5", - Rockers.PremadeSamples.PracticeChordD => "rockers/rocker/rockerPracticeChordD", - Rockers.PremadeSamples.Remix6ChordA => "rockers/rocker/rockerRemix6ChordA", - Rockers.PremadeSamples.Remix10ChordD => "rockers/rocker/rockerRemix10ChordD", - Rockers.PremadeSamples.Remix10ChordFSharpm => "rockers/rocker/rockerRemix10ChordF#m", - Rockers.PremadeSamples.DoremiChordA7 => "rockers/doremi/doremiChordA7", - Rockers.PremadeSamples.DoremiChordAm7 => "rockers/doremi/doremiChordAm7", - Rockers.PremadeSamples.DoremiChordC => "rockers/doremi/doremiChordC", - Rockers.PremadeSamples.DoremiChordC7 => "rockers/doremi/doremiChordC7", - Rockers.PremadeSamples.DoremiChordCadd9 => "rockers/doremi/doremiChordCadd9", - Rockers.PremadeSamples.DoremiChordDm => "rockers/doremi/doremiChordDm", - Rockers.PremadeSamples.DoremiChordDm7 => "rockers/doremi/doremiChordDm7", - Rockers.PremadeSamples.DoremiChordEm => "rockers/doremi/doremiChordEm", - Rockers.PremadeSamples.DoremiChordF => "rockers/doremi/doremiChordF", - Rockers.PremadeSamples.DoremiChordFadd9 => "rockers/doremi/doremiChordFadd9", - Rockers.PremadeSamples.DoremiChordFm => "rockers/doremi/doremiChordFm", - Rockers.PremadeSamples.DoremiChordG => "rockers/doremi/doremiChordG", - Rockers.PremadeSamples.DoremiChordG7 => "rockers/doremi/doremiChordG7", - Rockers.PremadeSamples.DoremiChordGm => "rockers/doremi/doremiChordGm", - Rockers.PremadeSamples.DoremiChordGsus4 => "rockers/doremi/doremiChordGsus4", - Rockers.PremadeSamples.DoremiNoteA2 => "rockers/doremi/doremiNoteA2", - Rockers.PremadeSamples.DoremiNoteE2 => "rockers/doremi/doremiNoteE2", - _ => throw new System.NotImplementedException(), - }; - chordSound = SoundByte.PlayOneShotGame(soundName, -1, pitch, 1, true); + chordSound = SoundByte.PlayOneShotGame(sample.sample, -1, pitch, 1, true); } if (together) @@ -301,7 +264,7 @@ namespace HeavenStudio.Games.Scripts_Rockers private float GetBentPitch(float pitch, int bend) { - float unscaledPitch = chordSound.pitch / Conductor.instance.musicSource.pitch; + float unscaledPitch = pitch / Conductor.instance.musicSource.pitch; float bendPitch = SoundByte.GetPitchFromSemiTones(bend, false); return (unscaledPitch * bendPitch) * Conductor.instance.musicSource.pitch; diff --git a/Assets/Scripts/Games/SamuraiSliceNtr/SamuraiSliceNtr.cs b/Assets/Scripts/Games/SamuraiSliceNtr/SamuraiSliceNtr.cs index d26123db7..ade33be6f 100644 --- a/Assets/Scripts/Games/SamuraiSliceNtr/SamuraiSliceNtr.cs +++ b/Assets/Scripts/Games/SamuraiSliceNtr/SamuraiSliceNtr.cs @@ -37,7 +37,7 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("2b2t", false, "Voxel Melon", "Toggle if the melon should be reskinned as a melon from a certain game."), - new Param("valA", new EntityTypes.Integer(0, 30, 1), "Money", "Set the amount of coins the melon spills out when sliced."), + new Param("valA", new EntityTypes.Integer(0, 30, 1), "Money", "Set the number of coins the melon spills out when sliced."), } }, new GameAction("fish", "Fish") @@ -49,7 +49,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 7, parameters = new List() { - new Param("valA", new EntityTypes.Integer(0, 30, 1), "Money", "Set the amount of coins the fish spills out when sliced."), + new Param("valA", new EntityTypes.Integer(0, 30, 1), "Money", "Set the number of coins the fish spills out when sliced."), } }, new GameAction("demon", "Demon") @@ -61,7 +61,7 @@ namespace HeavenStudio.Games.Loaders defaultLength = 7, parameters = new List() { - new Param("valA", new EntityTypes.Integer(0, 30, 1), "Money", "Set the amount of coins the demon spills out when sliced."), + new Param("valA", new EntityTypes.Integer(0, 30, 1), "Money", "Set the number of coins the demon spills out when sliced."), } }, new GameAction("particle effects", "Particle Effects") @@ -90,7 +90,7 @@ namespace HeavenStudio.Games.Loaders parameters = new List() { new Param("type", SamuraiSliceNtr.ObjectType.Melon, "Object", "The object to spawn"), - new Param("valA", new EntityTypes.Integer(0, 30, 1), "Money", "The amount of coins the melon spills out when sliced"), + new Param("valA", new EntityTypes.Integer(0, 30, 1), "Money", "The number of coins the melon spills out when sliced"), }, hidden = true }, diff --git a/Assets/Scripts/Games/SeeSaw/SeeSaw.cs b/Assets/Scripts/Games/SeeSaw/SeeSaw.cs index 4a95dfc73..62e2a7892 100644 --- a/Assets/Scripts/Games/SeeSaw/SeeSaw.cs +++ b/Assets/Scripts/Games/SeeSaw/SeeSaw.cs @@ -109,7 +109,7 @@ namespace HeavenStudio.Games.Loaders new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.") } }, - new GameAction("recolor", "Color Pallete") + new GameAction("recolor", "Color Palette") { function = delegate { var e = eventCaller.currentEntity; SeeSaw.ChangeMappingColor(e["fill"], e["outline"]); }, defaultLength = 0.5f, @@ -239,7 +239,7 @@ namespace HeavenStudio.Games { evt.Disable(); } - if (_landSoundEnd != null) _landSoundEnd.Stop(); + if (_landSoundEnd != null) _landSoundEnd.KillLoop(); } private void PersistColors(double beat) diff --git a/Assets/Scripts/Games/SlotMonster/SlotMonster.cs b/Assets/Scripts/Games/SlotMonster/SlotMonster.cs index 313bbb98f..d5909ead5 100644 --- a/Assets/Scripts/Games/SlotMonster/SlotMonster.cs +++ b/Assets/Scripts/Games/SlotMonster/SlotMonster.cs @@ -219,7 +219,7 @@ namespace HeavenStudio.Games string hitSfx = "slotMonster/stop_" + (isLast && isHit && !isMiss ? "hit" : (currentButton + 1)); SoundByte.PlayOneShotGame(hitSfx, forcePlay: true); if (isLast) { - if (rollingSound != null) rollingSound.Stop(); + if (rollingSound != null) rollingSound.KillLoop(); inputsActive = false; if (isHit && !isMiss) { smAnim.DoScaledAnimationAsync("Win", 0.5f); @@ -235,7 +235,7 @@ namespace HeavenStudio.Games public void StartInterval(RiqEntity si, bool autoPass, int eyeSprite, double gameSwitchBeat) { - if (rollingSound != null) rollingSound.Stop(); + if (rollingSound != null) rollingSound.KillLoop(); List slotActions = gameEntities.FindAll(e => e.datamodel == "slotMonster/slot" && e.beat >= si.beat && e.beat < si.beat + si.length); if (slotActions.Count <= 0) return; @@ -322,7 +322,7 @@ namespace HeavenStudio.Games private void ButtonEndMiss(PlayerActionEvent caller) { Debug.Log("miss i guess"); - if (rollingSound != null) rollingSound.Stop(); + if (rollingSound != null) rollingSound.KillLoop(); inputsActive = false; smAnim.DoScaledAnimationAsync("Lose", 0.5f); foreach (var anim in eyeAnims) { diff --git a/Assets/Scripts/Games/SneakySpirits/SneakySpirits.cs b/Assets/Scripts/Games/SneakySpirits/SneakySpirits.cs index c2154d84e..dd1338710 100644 --- a/Assets/Scripts/Games/SneakySpirits/SneakySpirits.cs +++ b/Assets/Scripts/Games/SneakySpirits/SneakySpirits.cs @@ -102,7 +102,7 @@ namespace HeavenStudio.Games } if (Conductor.instance.isPlaying) { - Conductor.instance.SetMinigamePitch(1f, true); + Conductor.instance.SetMinigamePitch(1f); } } diff --git a/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs b/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs index d4f965b4e..4340ba9e0 100644 --- a/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs +++ b/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs @@ -46,7 +46,7 @@ namespace HeavenStudio.Games.Loaders }), - new Param("amount", new EntityTypes.Integer(2, 30, 5), "Amount", "Set the amount of space kickers."), + new Param("amount", new EntityTypes.Integer(2, 30, 5), "Number", "Set the number of space kickers."), new Param("x", new EntityTypes.Float(-30, 30, 2f), "X Distance", "Set how much distance there should be between the space kickers on the x axis."), new Param("y", new EntityTypes.Float(-30, 30, -0.5f), "Y Distance", "Set how much distance there should be between the space kickers on the x axis."), new Param("z", new EntityTypes.Float(-30, 30, 1.25f), "Z Distance", "Set how much distance there should be between the space kickers on the x axis."), diff --git a/Assets/Scripts/Games/TapTroupe/TapTroupe.cs b/Assets/Scripts/Games/TapTroupe/TapTroupe.cs index 07b9e54f2..ce218e4ac 100644 --- a/Assets/Scripts/Games/TapTroupe/TapTroupe.cs +++ b/Assets/Scripts/Games/TapTroupe/TapTroupe.cs @@ -64,7 +64,7 @@ namespace HeavenStudio.Games.Loaders new Param("toggle", true, "Darkness", "Toggle if the scene should be dark and the spotlights should appear."), new Param("leftMost", false, "Leftmost Spotlight", "Toggle if the leftmost spotlight should be turned on or off."), new Param("middleLeft", false, "Middle-Left Spotlight", "Toggle if the middle-left spotlight should be turned on or off."), - new Param("middleRight", false, "Middle-Light Spotlight", "Toggle if the middle-right spotlight should be turned on or off."), + new Param("middleRight", false, "Middle-Right Spotlight", "Toggle if the middle-right spotlight should be turned on or off."), new Param("player", true, "Player Spotlight", "Toggle if the player's spotlight should be turned on or off."), } }, diff --git a/Assets/Scripts/Games/Tunnel/Tunnel.cs b/Assets/Scripts/Games/Tunnel/Tunnel.cs index da652457b..5090f7423 100644 --- a/Assets/Scripts/Games/Tunnel/Tunnel.cs +++ b/Assets/Scripts/Games/Tunnel/Tunnel.cs @@ -139,9 +139,9 @@ namespace HeavenStudio.Games tunnelLightMaterial.SetColor("_Color", Color.white); tunnelLightMaterial.SetColor("_AddColor", Color.black); - tunnelSoundRight?.Stop(); - tunnelSoundMiddle?.Stop(); - tunnelSoundLeft?.Stop(); + tunnelSoundRight?.KillLoop(); + tunnelSoundMiddle?.KillLoop(); + tunnelSoundLeft?.KillLoop(); } } @@ -291,9 +291,9 @@ namespace HeavenStudio.Games this.fadeDuration = fadeDuration; conductor.FadeMinigameVolume(beat, fadeDuration, volume); - tunnelSoundRight?.Stop(); - tunnelSoundMiddle?.Stop(); - tunnelSoundLeft?.Stop(); + tunnelSoundRight?.KillLoop(); + tunnelSoundMiddle?.KillLoop(); + tunnelSoundLeft?.KillLoop(); tunnelSoundRight = SoundByte.PlayOneShotGame("tunnel/tunnelRight", beat, looping: true); tunnelSoundMiddle = SoundByte.PlayOneShotGame("tunnel/tunnelMiddle", beat + (6 / 48f), looping: true); diff --git a/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs b/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs index 3058a2da1..b9bb0b960 100644 --- a/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs +++ b/Assets/Scripts/LevelEditor/EventSelector/EventParameterManager.cs @@ -32,6 +32,8 @@ namespace HeavenStudio.Editor public bool active; private int childCountAtStart; + + public Dictionary currentProperties = new(); public bool canDisable = true; @@ -47,6 +49,7 @@ namespace HeavenStudio.Editor { typeof(Float), FloatP }, { typeof(Note), NoteP }, { typeof(Dropdown), DropdownP }, + { typeof(NoteSampleDropdown), DropdownP }, { typeof(Button), ButtonP }, { typeof(Color), ColorP }, { typeof(bool), BooleanP }, @@ -111,25 +114,30 @@ namespace HeavenStudio.Editor DestroyParams(); - Dictionary ePrefabs = new(); - for (int i = 0; i < action.parameters.Count; i++) { var p = action.parameters[i]; - ePrefabs.Add(p.propertyName, AddParam(p.propertyName, p.parameter, p.caption, p.tooltip)); + currentProperties.Add(p.propertyName, AddParam(p.propertyName, p.parameter, p.caption, p.tooltip)); } foreach (var p in action.parameters) { if (p.collapseParams == null || p.collapseParams.Count == 0) continue; - EventPropertyPrefab input = ePrefabs[p.propertyName].GetComponent(); + EventPropertyPrefab input = currentProperties[p.propertyName]; foreach (var c in p.collapseParams) { - List collapseables = c.collapseables.Select(x => ePrefabs[x]).ToList(); + List collapseables = c.collapseables.Select(x => currentProperties[x].gameObject).ToList(); input.propertyCollapses.Add(new EventPropertyPrefab.PropertyCollapse(collapseables, c.CollapseOn, entity)); } input.SetCollapses(p.parameter); } + + foreach (var p in action.parameters) + { + EventPropertyPrefab prop = currentProperties[p.propertyName]; + + prop.PostLoadProperties(p.parameter); + } active = true; } @@ -139,7 +147,7 @@ namespace HeavenStudio.Editor } } - private GameObject AddParam(string propertyName, object type, string caption, string tooltip = "") + private EventPropertyPrefab AddParam(string propertyName, object type, string caption, string tooltip = "") { Type typeType = type.GetType(); GameObject propertyPrefab = DropdownP; // enum check is hardcoded because enums are awesome (lying) @@ -163,7 +171,7 @@ namespace HeavenStudio.Editor EventPropertyPrefab property = input.GetComponent(); property.SetProperties(propertyName, type, caption); - return input; + return property; } private void DestroyParams() @@ -174,6 +182,8 @@ namespace HeavenStudio.Editor { Destroy(transform.GetChild(i).gameObject); } + + currentProperties.Clear(); } } } \ No newline at end of file diff --git a/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs b/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs index e4e8292a0..f8407f45c 100644 --- a/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs +++ b/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs @@ -28,6 +28,7 @@ namespace HeavenStudio.Editor this.caption.text = _captionText = caption; } public virtual void SetCollapses(object type) { } + public virtual void PostLoadProperties(object type) { } public void UpdateCollapse(object type) { diff --git a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/DropdownPropertyPrefab.cs b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/DropdownPropertyPrefab.cs index ae5b68f5c..d9bdd954b 100644 --- a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/DropdownPropertyPrefab.cs +++ b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/DropdownPropertyPrefab.cs @@ -20,13 +20,19 @@ namespace HeavenStudio.Editor public Scrollbar scrollbar; public int[] values; - private int _defaultValue; - + private int defaultValue; + private int lastValue = -1; + private Array enumValues; + private object type; + private bool openedDropdown = false; - + private bool setup = false; + public override void SetProperties(string propertyName, object type, string caption) { base.SetProperties(propertyName, type, caption); + + this.type = type; int selected = 0; @@ -34,13 +40,14 @@ namespace HeavenStudio.Editor { case EntityTypes.Dropdown dropdownEntity: // entity[propertyName].ChangeValues(dropdownEntity.Values); - _defaultValue = dropdownEntity.defaultValue; + defaultValue = dropdownEntity.defaultValue; EntityTypes.DropdownObj dropdownObj = entity[propertyName]; int size = dropdownObj.Values.Count; values = new int[size]; - for (int i = 0; i < size; i++) { + for (int i = 0; i < size; i++) + { values[i] = i; } @@ -53,32 +60,51 @@ namespace HeavenStudio.Editor dropdown.ClearOptions(); dropdown.AddOptions(newValues); dropdown.enabled = newValues.Count > 0; - dropdownObj.value = _defaultValue; + dropdownObj.value = defaultValue; }); break; case Enum enumEntity: Type enumType = enumEntity.GetType(); - _defaultValue = (int)type; - values = Enum.GetValues(enumType).Cast().ToArray(); + defaultValue = (int)type; + enumValues = Enum.GetValues(enumType); + values = enumValues.Cast().ToArray(); selected = Array.FindIndex(values, val => val == (int)entity[propertyName]); dropdown.AddOptions(Enum.GetNames(enumType).ToList()); dropdown.onValueChanged.AddListener(val => entity[propertyName] = values[val]); break; - default: - break; + case EntityTypes.NoteSampleDropdown noteDropdown: + Type noteEnumType = noteDropdown.defaultValue.GetType(); + enumValues = Enum.GetValues(noteEnumType); + values = enumValues.Cast().ToArray(); + selected = Array.FindIndex(values, val => val == (int)entity[propertyName]); + defaultValue = selected; + lastValue = selected; + + dropdown.AddOptions(Enum.GetNames(noteEnumType).ToList()); + dropdown.onValueChanged.AddListener(val => + { + entity[propertyName] = values[val]; + UpdateNoteProperty(noteDropdown, enumValues.GetValue(values[val])); + + lastValue = values[val]; + }); + break; + default: break; } + dropdown.value = selected; dropdown.enabled = dropdown.options.Count > 0; - dropdown.onValueChanged.AddListener(newValue => { - this.caption.text = (newValue != _defaultValue) ? (_captionText + "*") : _captionText; + dropdown.onValueChanged.AddListener(newValue => + { + this.caption.text = (newValue != defaultValue) ? (_captionText + "*") : _captionText; }); } public void ResetValue() { - dropdown.value = _defaultValue; + dropdown.value = defaultValue; } public override void SetCollapses(object type) @@ -105,5 +131,44 @@ namespace HeavenStudio.Editor openedDropdown = false; } } + + #region Note Sample Dropdown + private void OnEnable() { // Used for when the dropdown is uncollapsed + if (setup && type is EntityTypes.NoteSampleDropdown sampleDropdown) + { + UpdateNoteProperty(sampleDropdown, enumValues.GetValue(values[entity[propertyName]]), true); + } + } + + public override void PostLoadProperties(object type) + { + base.PostLoadProperties(type); + + setup = true; + + if (type is EntityTypes.NoteSampleDropdown sampleDropdown && gameObject.activeSelf) + { + UpdateNoteProperty(sampleDropdown, enumValues.GetValue(values[entity[propertyName]])); + } + } + + private void UpdateNoteProperty(EntityTypes.NoteSampleDropdown noteDropdown, object newSampleEnum, bool forceSwitchCheck = false) + { + EventParameterManager.instance.currentProperties.TryGetValue(noteDropdown.semisProp, out var property); + + if (!property) return; + + NotePropertyPrefab noteProperty = (NotePropertyPrefab)property; + NoteSample sample = noteDropdown.getNoteSample(newSampleEnum); + + bool switched = false; + if ((int)newSampleEnum != lastValue || forceSwitchCheck) { + // Keep the semitones value if the note is the same, otherwise reset it + if(sample.note != noteProperty.note.sampleNote) parameterManager.entity[noteDropdown.semisProp] = 0; + switched = true; + } + noteProperty.SetNote(new EntityTypes.Note(0, sample.note, sample.octave, sample.sample, offsetToC: false), switched); + } + #endregion } } \ No newline at end of file diff --git a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs index 1fe9c63e4..cc49aabd5 100644 --- a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs +++ b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs @@ -10,30 +10,17 @@ using UnityEngine; public class NotePropertyPrefab : NumberPropertyPrefab { - public TMP_Text noteLabel; - + public TMP_Text noteLabel, flatLabel; + private Sound previewAudioSource; - private EntityTypes.Note note; private int offsetFromC; + public EntityTypes.Note note; public override void SetProperties(string propertyName, object type, string caption) { base.SetProperties(propertyName, type, caption); - note = (EntityTypes.Note)type; - - slider.minValue = note.min; - slider.maxValue = note.max; - - slider.wholeNumbers = true; - - offsetFromC = 3 - note.sampleNote; - - slider.value = Convert.ToSingle(parameterManager.entity[propertyName]) - offsetFromC; - _defaultValue = slider.value; - - inputField.text = slider.value.ToString(); - noteLabel.text = GetNoteText(note, (int)slider.value + offsetFromC); + SetNote((EntityTypes.Note)type); slider.onValueChanged.AddListener( _ => @@ -50,7 +37,7 @@ public class NotePropertyPrefab : NumberPropertyPrefab this.caption.text = _captionText; } - noteLabel.text = GetNoteText(note, trueSemitones); + UpdateNoteText(trueSemitones); PlayPreview(note, trueSemitones); } @@ -64,9 +51,10 @@ public class NotePropertyPrefab : NumberPropertyPrefab inputField.onEndEdit.AddListener( _ => { - int trueSemitones = (int)slider.value + offsetFromC; - slider.value = Convert.ToSingle(inputField.text); + + int trueSemitones = (int)slider.value + offsetFromC; + parameterManager.entity[propertyName] = trueSemitones; Editor.instance.editingInputField = false; if (slider.value != _defaultValue) @@ -78,12 +66,43 @@ public class NotePropertyPrefab : NumberPropertyPrefab this.caption.text = _captionText; } - noteLabel.text = GetNoteText(note, trueSemitones); + UpdateNoteText(trueSemitones); PlayPreview(note, trueSemitones); } ); } + + public void SetNote(EntityTypes.Note note, bool playPreview = false) + { + this.note = note; + + slider.minValue = note.min; + slider.maxValue = note.max; + + slider.wholeNumbers = true; + + offsetFromC = 0; + if(note.offsetToC) + offsetFromC = 3 - note.sampleNote; + + int lastValue = (int)slider.value; + slider.value = Convert.ToSingle(parameterManager.entity[propertyName]) - offsetFromC; + _defaultValue = slider.value; + + inputField.text = slider.value.ToString(); + UpdateNoteText((int)slider.value + offsetFromC); + + if((int)slider.value == lastValue && playPreview) + PlayPreview(note, (int)slider.value + offsetFromC); + } + + private void UpdateNoteText(int semiTones) + { + GetNoteText(note, semiTones, out var sharp, out var flat); + noteLabel.text = sharp; + flatLabel.text = flat; + } public void OnSelectSliderHandle() { @@ -92,21 +111,24 @@ public class NotePropertyPrefab : NumberPropertyPrefab private void PlayPreview(EntityTypes.Note note, int currentSemitones) { - if (note.sampleName.Equals("") || !PersistentDataManager.gameSettings.previewNoteSounds) return; + if (note.sampleName == null || !PersistentDataManager.gameSettings.previewNoteSounds) return; if (previewAudioSource != null) { - previewAudioSource.Stop(true); + previewAudioSource.KillLoop(); previewAudioSource = null; } float pitch = SoundByte.GetPitchFromSemiTones(currentSemitones, true); + if(pitch == 1f) pitch = 1.0001f; // man writes worst workaround ever, banned from Heaven Studio source code previewAudioSource = SoundByte.PlayOneShotGame(note.sampleName, pitch: pitch, volume: 0.75f, forcePlay: true, ignoreConductorPause: true); + previewAudioSource.KillLoop(.5f); } private static readonly string[] notes = { "A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#" }; + private static readonly string[] notesFlat = { "A", "Bb", "B", "C", "Db", "D", "Eb", "E", "F", "Gb", "G", "Ab" }; - private static string GetNoteText(EntityTypes.Note note, int currentSemitones) + private static string GetNoteText(EntityTypes.Note note, int currentSemitones, out string sharp, out string flat) { int noteIndex = (note.sampleNote + currentSemitones) % 12; if (noteIndex < 0) @@ -121,7 +143,9 @@ public class NotePropertyPrefab : NumberPropertyPrefab { octave--; } - - return notes[noteIndex] + octave; + + sharp = notes[noteIndex] + octave; + flat = notesFlat[noteIndex] + octave; + return sharp; } } diff --git a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NumberPropertyPrefab.cs b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NumberPropertyPrefab.cs index b2a82b4f6..a80476bfc 100644 --- a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NumberPropertyPrefab.cs +++ b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NumberPropertyPrefab.cs @@ -158,28 +158,6 @@ namespace HeavenStudio.Editor ); } } - - private static readonly string[] notes = { - "A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#" - }; - - private static string GetNoteText(EntityTypes.Note note, int newSemitones) - { - int noteIndex = (note.sampleNote + newSemitones) % 12; - if (noteIndex < 0) { - noteIndex += 12; - } - - int octaveOffset = (note.sampleNote + newSemitones) / 12; - int octave = note.sampleOctave + octaveOffset; - - if ((note.sampleNote + newSemitones) % 12 < 0) - { - octave--; - } - - return notes[noteIndex] + octave; - } private void Update() { diff --git a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs index 16ba4d081..2b4039ceb 100644 --- a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs +++ b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs @@ -893,6 +893,7 @@ namespace HeavenStudio.Editor.Track EntityTypes.Float floatVal => floatVal.val, EntityTypes.Button buttonVal => buttonVal.defaultLabel, EntityTypes.Dropdown ddVal => new EntityTypes.DropdownObj(ddVal), + EntityTypes.NoteSampleDropdown noteDDVal => (int)noteDDVal.defaultValue, _ => ep[i].parameter, }; diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index d355037f1..55c359190 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -278,6 +278,10 @@ namespace HeavenStudio JArray values = e[param.propertyName]["Values"]; e.dynamicData[param.propertyName] = new EntityTypes.DropdownObj((int)value, values.Select(x => (string)x).ToList()); } + else if (type == typeof(EntityTypes.NoteSampleDropdown)) + { + e.dynamicData[param.propertyName] = (int)e[param.propertyName]; + } else if (type == typeof(EntityTypes.Resource)) e.dynamicData[param.propertyName] = (EntityTypes.Resource)e[param.propertyName]; else if (type.IsEnum) @@ -391,8 +395,10 @@ namespace HeavenStudio public bool usesAssetBundle => wantAssetBundle is not null or ""; public bool hasLocales => supportedLocales.Count > 0; - public bool AssetsLoaded => ((hasLocales && localeLoaded && currentLoadedLocale == defaultLocale) || (!hasLocales)) && commonLoaded && loadComplete; + public bool AssetsLoaded => ((hasLocales && localeLoaded && currentLoadedLocale == defaultLocale) || (!hasLocales)) && commonLoaded && (!loadingPrefab) && loadComplete; public bool AlreadyLoading => alreadyLoading; + public bool LoadingPrefab => loadingPrefab; + public bool SequencesPreloaded => soundSequences != null; public string LoadableName => inferred ? "noGame" : name; public GameObject LoadedPrefab => loadedPrefab; @@ -406,6 +412,7 @@ namespace HeavenStudio private bool localePreloaded = false; private GameObject loadedPrefab = null; + bool loadingPrefab = false; bool loadComplete = false; private SoundSequence.SequenceKeyValue[] soundSequences = null; @@ -506,6 +513,7 @@ namespace HeavenStudio if (alreadyLoading || AssetsLoaded || !usesAssetBundle) return; loadComplete = false; alreadyLoading = true; + loadingPrefab = true; await UniTask.WhenAll(LoadCommonAssetBundleAsync(), LoadLocalizedAssetBundleAsync()); await UniTask.WhenAll(LoadGamePrefabAsync(), LoadCommonAudioClips(), LoadLocalizedAudioClips()); SoundByte.PreloadGameAudioClips(this); @@ -581,6 +589,7 @@ namespace HeavenStudio soundSequences = minigame.SoundSequences; } loadedPrefab = prefab; + loadingPrefab = false; } public GameObject LoadGamePrefab() @@ -632,6 +641,7 @@ namespace HeavenStudio } SoundByte.UnloadAudioClips(name); loadComplete = false; + loadingPrefab = false; } } @@ -748,7 +758,7 @@ namespace HeavenStudio function: delegate { var e = eventCaller.currentEntity; GameManager.instance.SwitchGame(eventCaller.currentSwitchGame, eventCaller.currentEntity.beat, e["toggle"]); }, parameters: new List() { - new Param("toggle", true, "Black Flash", "Toggle if there should be a blck flash before the game is switched. You should only disable this if you know what you're doing.") + new Param("toggle", true, "Black Flash", "Toggle if there should be a black flash before the game is switched. You should only disable this if you know what you're doing.") }, inactiveFunction: delegate { var e = eventCaller.currentEntity; GameManager.instance.SwitchGame(eventCaller.currentSwitchGame, eventCaller.currentEntity.beat, e["toggle"]); } ), @@ -1038,7 +1048,7 @@ namespace HeavenStudio }), } }, - new GameAction("cabb", "Chromatic Abberation") + new GameAction("cabb", "Chromatic Aberration") { resizable = true, parameters = new() @@ -1271,10 +1281,10 @@ namespace HeavenStudio resizable = true, parameters = new() { - new("xStart", new EntityTypes.Float(1, 100, 1), "Start Horizontal Tiles", "Set the amount of horizontal tiles at the start of the event."), - new("xEnd", new EntityTypes.Float(1, 100, 1), "End Horizontal Tiles", "Set the amount of horizontal tiles at the end of the event."), - new("yStart", new EntityTypes.Float(1, 100, 1), "Start Vertical Tiles", "Set the amount of vertical tiles at the start of the event."), - new("yEnd", new EntityTypes.Float(1, 100, 1), "End Vertical Tiles", "Set the amount of vertical tiles at the end of the event."), + new("xStart", new EntityTypes.Float(1, 100, 1), "Start Horizontal Tiles", "Set the number of horizontal tiles at the start of the event."), + new("xEnd", new EntityTypes.Float(1, 100, 1), "End Horizontal Tiles", "Set the number of horizontal tiles at the end of the event."), + new("yStart", new EntityTypes.Float(1, 100, 1), "Start Vertical Tiles", "Set the number of vertical tiles at the start of the event."), + new("yEnd", new EntityTypes.Float(1, 100, 1), "End Vertical Tiles", "Set the number of vertical tiles at the end of the event."), new("axis", StaticCamera.ViewAxis.All, "Axis", "Set if only a specific axis should be modified."), new("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.", new() { diff --git a/Assets/Scripts/NoteSample.cs b/Assets/Scripts/NoteSample.cs new file mode 100644 index 000000000..a30bd55a0 --- /dev/null +++ b/Assets/Scripts/NoteSample.cs @@ -0,0 +1,13 @@ +public struct NoteSample +{ + public int note; + public int octave; + public string sample; + + public NoteSample(string sample, int note, int octave) + { + this.note = note; + this.octave = octave; + this.sample = sample; + } +} diff --git a/Assets/Scripts/NoteSample.cs.meta b/Assets/Scripts/NoteSample.cs.meta new file mode 100644 index 000000000..506c25bc0 --- /dev/null +++ b/Assets/Scripts/NoteSample.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f1a532c54bb4407bbc90c5d8f5f83eff +timeCreated: 1712160367 \ No newline at end of file diff --git a/Assets/Scripts/UI/Overlays/TimingAccuracyDisplay.cs b/Assets/Scripts/UI/Overlays/TimingAccuracyDisplay.cs index 98f27f7fb..473415231 100644 --- a/Assets/Scripts/UI/Overlays/TimingAccuracyDisplay.cs +++ b/Assets/Scripts/UI/Overlays/TimingAccuracyDisplay.cs @@ -155,6 +155,8 @@ namespace HeavenStudio.Common { case Rating.OK: it = OK; + // makes the explosion smaller with less accurate inputs + it.transform.localScale = Vector3.one * (1f - (frac / 2f)); break; case Rating.Just: it = Just; diff --git a/Assets/Scripts/Util/EntityTypes.cs b/Assets/Scripts/Util/EntityTypes.cs index b51045c36..b5fd9ae98 100644 --- a/Assets/Scripts/Util/EntityTypes.cs +++ b/Assets/Scripts/Util/EntityTypes.cs @@ -33,8 +33,21 @@ namespace HeavenStudio public int sampleNote; public int sampleOctave; public string sampleName; + public bool offsetToC; + + public Note(int val = 0, int sampleNote = 0, int sampleOctave = 4, string sampleName = null, bool offsetToC = true) + { + min = -maxSemitones; + max = maxSemitones; + + this.val = val; + this.sampleNote = sampleNote; + this.sampleOctave = sampleOctave; + this.sampleName = sampleName; + this.offsetToC = offsetToC; + } - public Note(int min, int max, int val = 0, int sampleNote = 0, int sampleOctave = 0, string sampleName = "") + public Note(int min, int max, int val = 0, int sampleNote = 0, int sampleOctave = 4, string sampleName = null, bool offsetToC = true) { this.min = min; this.val = val; @@ -42,6 +55,7 @@ namespace HeavenStudio this.sampleNote = sampleNote; this.sampleOctave = sampleOctave; this.sampleName = sampleName; + this.offsetToC = offsetToC; } } @@ -107,7 +121,21 @@ namespace HeavenStudio this.values = values.ToList(); } } - + + public struct NoteSampleDropdown + { + public object defaultValue; + public Func getNoteSample; + public string semisProp; + + public NoteSampleDropdown(object defaultValue, Func getNoteSample, string semisProp) + { + this.defaultValue = defaultValue; + this.getNoteSample = getNoteSample; + this.semisProp = semisProp; + } + } + public class DropdownObj { public void SetValues(List values) diff --git a/Assets/Scripts/Util/MultiSound.cs b/Assets/Scripts/Util/MultiSound.cs index d79143dbf..2a3bc430f 100644 --- a/Assets/Scripts/Util/MultiSound.cs +++ b/Assets/Scripts/Util/MultiSound.cs @@ -111,7 +111,7 @@ namespace HeavenStudio.Util { foreach (Util.Sound sound in playingSounds) { - sound.Stop(); + sound.KillLoop(); } if (destroy) { diff --git a/Assets/Scripts/Util/Sound.cs b/Assets/Scripts/Util/Sound.cs index 791732999..46b0a191e 100644 --- a/Assets/Scripts/Util/Sound.cs +++ b/Assets/Scripts/Util/Sound.cs @@ -40,6 +40,8 @@ namespace HeavenStudio.Util const double PREBAKE_TIME = 0.25; + private Coroutine fadeRoutine; + private void Start() { } @@ -68,6 +70,8 @@ namespace HeavenStudio.Util GameManager.instance.SoundObjects.Release(this); return; } + + CancelFadeRoutine(); audioSource = GetComponent(); cond = Conductor.instance; @@ -234,12 +238,15 @@ namespace HeavenStudio.Util audioSource.UnPause(); } - public void Stop(bool releaseToPool = false) + /// + /// Used internally to stop and reset the sound once it has been released back into the pool. + /// + /// + /// WARNING! You should use KillLoop() to stop sounds early, not this! + /// + public void Stop() { - if(releaseToPool && audioSource.isPlaying) - { - GameManager.instance.SoundObjects.Release(this); - } + CancelFadeRoutine(); available = true; played = false; @@ -318,21 +325,30 @@ namespace HeavenStudio.Util #endregion - public void KillLoop(double fadeTime) + /// + /// Fades the sound out over fadeTime, then releases it back into the pool which stops it. + /// Leave fadeTime at 0 to stop the sound instantly. + /// You should use this for stopping sounds early, not . + /// + public void KillLoop(double fadeTime = 0) { if (!gameObject.activeSelf) return; + + CancelFadeRoutine(); + if (fadeTime == 0) { GameManager.instance.SoundObjects.Release(this); return; } - StartCoroutine(FadeLoop(fadeTime)); + + fadeRoutine = StartCoroutine(FadeLoop(fadeTime)); } - double loopFadeTimer = 0f; IEnumerator FadeLoop(double fadeTime) { float startingVol = audioSource.volume; + float loopFadeTimer = 0f; while (loopFadeTimer < fadeTime) { @@ -341,7 +357,13 @@ namespace HeavenStudio.Util yield return null; } yield return null; + GameManager.instance.SoundObjects.Release(this); } + + private void CancelFadeRoutine() + { + if(fadeRoutine != null) StopCoroutine(fadeRoutine); + } } }