diff --git a/Assets/Resources/Prefabs/Editor/EventProperties/Note.prefab b/Assets/Resources/Prefabs/Editor/EventProperties/Note.prefab
index ef0e53368..c6799f8a1 100644
--- a/Assets/Resources/Prefabs/Editor/EventProperties/Note.prefab
+++ b/Assets/Resources/Prefabs/Editor/EventProperties/Note.prefab
@@ -198,7 +198,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 6158244585233792465}
- - component: {fileID: 6158244585233792466}
+ - component: {fileID: 5889849442551835445}
m_Layer: 5
m_Name: Note
m_TagString: Untagged
@@ -229,7 +229,7 @@ RectTransform:
m_AnchoredPosition: {x: 459.58514, y: -25}
m_SizeDelta: {x: 879.1703, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &6158244585233792466
+--- !u!114 &5889849442551835445
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -238,7 +238,7 @@ MonoBehaviour:
m_GameObject: {fileID: 6158244585233792464}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 6e9ad350a96f5644dbb1e4686a6bcaed, type: 3}
+ m_Script: {fileID: 11500000, guid: 3d8108e287994e145a3ca0b3d19e40c8, type: 3}
m_Name:
m_EditorClassIdentifier:
caption: {fileID: 6158244585406534009}
@@ -1022,7 +1022,7 @@ MonoBehaviour:
action:
m_PersistentCalls:
m_Calls:
- - m_Target: {fileID: 6158244585233792466}
+ - m_Target: {fileID: 0}
m_TargetAssemblyTypeName: HeavenStudio.Editor.NumberPropertyPrefab, Assembly-CSharp
m_MethodName: ResetValue
m_Mode: 1
@@ -1146,7 +1146,7 @@ MonoBehaviour:
action:
m_PersistentCalls:
m_Calls:
- - m_Target: {fileID: 6158244585233792466}
+ - m_Target: {fileID: 0}
m_TargetAssemblyTypeName: HeavenStudio.Editor.NumberPropertyPrefab, Assembly-CSharp
m_MethodName: ResetValue
m_Mode: 1
diff --git a/Assets/Resources/Sfx/games/gleeClub/WailPreview.wav b/Assets/Resources/Sfx/games/gleeClub/WailPreview.wav
new file mode 100644
index 000000000..04b80f00d
Binary files /dev/null and b/Assets/Resources/Sfx/games/gleeClub/WailPreview.wav differ
diff --git a/Assets/Resources/Sfx/games/gleeClub/WailPreview.wav.meta b/Assets/Resources/Sfx/games/gleeClub/WailPreview.wav.meta
new file mode 100644
index 000000000..e5056549b
--- /dev/null
+++ b/Assets/Resources/Sfx/games/gleeClub/WailPreview.wav.meta
@@ -0,0 +1,22 @@
+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/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs b/Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs
index d5e6256e5..34a0f0b5c 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), "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), "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), "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), "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), "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), "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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 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), "Semitones", "Set the number of semitones up or down this note should be pitched.")
+ new Param("type", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 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/GleeClub/GleeClub.cs b/Assets/Scripts/Games/GleeClub/GleeClub.cs
index 5d9a7324b..f9e6334d1 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), "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), "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), "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/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("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), "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), "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), "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/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 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), "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), "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), "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/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("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), "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), "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), "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/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 GameAction("presence", "Toggle Chorus Kids")
diff --git a/Assets/Scripts/Games/LaunchParty/LaunchParty.cs b/Assets/Scripts/Games/LaunchParty/LaunchParty.cs
index 59afe46ec..235cb208c 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), "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), "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), "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), "4th Note", "Set the number of semitones up or down this note should be pitched.")
+ 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 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), "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), "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), "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), "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), "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), "6th Note", "Set the number of semitones up or down this note should be pitched.")
+ 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 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), "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), "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), "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), "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), "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), "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), "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), "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), "9th Note (Launch)", "Set the number of semitones up or down this note should be pitched."),
+ 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 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), "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), "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), "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), "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), "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), "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), "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), "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), "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), "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), "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), "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), "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), "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), "15th Note", "The number of semitones up or down this note should be pitched")
+ 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 GameAction("posMove", "Change Launch Pad Position")
diff --git a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs
new file mode 100644
index 000000000..6956d54b7
--- /dev/null
+++ b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs
@@ -0,0 +1,114 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using HeavenStudio;
+using HeavenStudio.Editor;
+using HeavenStudio.Util;
+using TMPro;
+using UnityEngine;
+
+public class NotePropertyPrefab : NumberPropertyPrefab
+{
+ public TMP_Text noteLabel;
+
+ private Sound previewAudioSource;
+
+ public override void SetProperties(string propertyName, object type, string caption)
+ {
+ base.SetProperties(propertyName, type, caption);
+
+ EntityTypes.Note note = (EntityTypes.Note)type;
+
+ slider.minValue = note.min;
+ slider.maxValue = note.max;
+ _defaultValue = note.val;
+
+ slider.wholeNumbers = true;
+
+ int offsetFromC = 3 - note.sampleNote;
+
+ slider.value = Convert.ToSingle(parameterManager.entity[propertyName]) - offsetFromC;
+ inputField.text = slider.value.ToString();
+ noteLabel.text = GetNoteText(note, (int)slider.value + offsetFromC);
+
+ slider.onValueChanged.AddListener(
+ _ =>
+ {
+ int trueSemitones = (int)slider.value + offsetFromC;
+ inputField.text = slider.value.ToString();
+ parameterManager.entity[propertyName] = trueSemitones;
+ if (slider.value != _defaultValue)
+ {
+ this.caption.text = _captionText + "*";
+ }
+ else
+ {
+ this.caption.text = _captionText;
+ }
+
+ noteLabel.text = GetNoteText(note, trueSemitones);
+
+ PlayPreview(note, trueSemitones);
+ }
+ );
+
+ inputField.onSelect.AddListener(
+ _ =>
+ Editor.instance.editingInputField = true
+ );
+
+ inputField.onEndEdit.AddListener(
+ _ =>
+ {
+ int trueSemitones = (int)slider.value + offsetFromC;
+
+ slider.value = Convert.ToSingle(inputField.text);
+ parameterManager.entity[propertyName] = trueSemitones;
+ Editor.instance.editingInputField = false;
+ if (slider.value != _defaultValue)
+ {
+ this.caption.text = _captionText + "*";
+ }
+ else
+ {
+ this.caption.text = _captionText;
+ }
+
+ noteLabel.text = GetNoteText(note, trueSemitones);
+
+ PlayPreview(note, trueSemitones);
+ }
+ );
+ }
+
+ private void PlayPreview(EntityTypes.Note note, int currentSemitones)
+ {
+ if (note.sampleName.Equals("")) return;
+
+ if(previewAudioSource) previewAudioSource.Stop();
+
+ float pitch = SoundByte.GetPitchFromSemiTones(currentSemitones, true);
+ previewAudioSource = SoundByte.PlayOneShotGame(note.sampleName, pitch: pitch, volume: 0.75f, forcePlay: true, ignoreConductorPause: true);
+ }
+
+ 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 currentSemitones)
+ {
+ int noteIndex = (note.sampleNote + currentSemitones) % 12;
+ if (noteIndex < 0)
+ {
+ noteIndex += 12;
+ }
+
+ int octaveOffset = (note.sampleNote + currentSemitones) / 12;
+ int octave = note.sampleOctave + octaveOffset;
+
+ if ((note.sampleNote + currentSemitones) % 12 < 0)
+ {
+ octave--;
+ }
+
+ return notes[noteIndex] + octave;
+ }
+}
diff --git a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs.meta b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs.meta
new file mode 100644
index 000000000..f88007ab4
--- /dev/null
+++ b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NotePropertyPrefab.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3d8108e287994e145a3ca0b3d19e40c8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NumberPropertyPrefab.cs b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NumberPropertyPrefab.cs
index 719f6f47e..b2a82b4f6 100644
--- a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NumberPropertyPrefab.cs
+++ b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/NumberPropertyPrefab.cs
@@ -14,10 +14,8 @@ namespace HeavenStudio.Editor
[Space(10)]
public Slider slider;
public TMP_InputField inputField;
-
- public TMP_Text noteLabel;
-
- private float _defaultValue;
+
+ protected float _defaultValue;
public override void SetProperties(string propertyName, object type, string caption)
{
@@ -73,60 +71,6 @@ namespace HeavenStudio.Editor
);
break;
- case EntityTypes.Note note:
- slider.minValue = note.min;
- slider.maxValue = note.max;
- _defaultValue = note.val;
-
- slider.wholeNumbers = true;
-
- slider.value = Convert.ToSingle(parameterManager.entity[propertyName]);
- inputField.text = slider.value.ToString();
- noteLabel.text = GetNoteText(note, (int) slider.value);
-
- slider.onValueChanged.AddListener(
- _ =>
- {
- inputField.text = slider.value.ToString();
- parameterManager.entity[propertyName] = (int) slider.value;
- if (slider.value != _defaultValue)
- {
- this.caption.text = _captionText + "*";
- }
- else
- {
- this.caption.text = _captionText;
- }
-
- noteLabel.text = GetNoteText(note, (int) slider.value);
- }
- );
-
- inputField.onSelect.AddListener(
- _ =>
- Editor.instance.editingInputField = true
- );
-
- inputField.onEndEdit.AddListener(
- _ =>
- {
- slider.value = Convert.ToSingle(inputField.text);
- parameterManager.entity[propertyName] = (int) slider.value;
- Editor.instance.editingInputField = false;
- if (slider.value != _defaultValue)
- {
- this.caption.text = _captionText + "*";
- }
- else
- {
- this.caption.text = _captionText;
- }
-
- noteLabel.text = GetNoteText(note, (int) slider.value);
- }
- );
- break;
-
case EntityTypes.Float fl:
slider.minValue = fl.min;
slider.maxValue = fl.max;
@@ -175,6 +119,8 @@ namespace HeavenStudio.Editor
);
break;
+ case EntityTypes.Note: break;
+
default:
throw new ArgumentOutOfRangeException(
nameof(type), type, "I don't know how to make a property of this type!"
diff --git a/Assets/Scripts/Util/EntityTypes.cs b/Assets/Scripts/Util/EntityTypes.cs
index 88342169e..b51045c36 100644
--- a/Assets/Scripts/Util/EntityTypes.cs
+++ b/Assets/Scripts/Util/EntityTypes.cs
@@ -32,14 +32,16 @@ namespace HeavenStudio
public int sampleNote;
public int sampleOctave;
+ public string sampleName;
- public Note(int min, int max, int val = 0, int sampleNote = 0, int sampleOctave = 0)
+ public Note(int min, int max, int val = 0, int sampleNote = 0, int sampleOctave = 0, string sampleName = "")
{
this.min = min;
this.val = val;
this.max = max;
this.sampleNote = sampleNote;
this.sampleOctave = sampleOctave;
+ this.sampleName = sampleName;
}
}
diff --git a/Assets/Scripts/Util/Sound.cs b/Assets/Scripts/Util/Sound.cs
index 21586f46a..681c94bec 100644
--- a/Assets/Scripts/Util/Sound.cs
+++ b/Assets/Scripts/Util/Sound.cs
@@ -24,6 +24,7 @@ namespace HeavenStudio.Util
private AudioSource audioSource;
private Conductor cond;
+ public bool ignoreConductorPause = false;
private double startTime;
@@ -114,7 +115,7 @@ namespace HeavenStudio.Util
double dspTime = AudioSettings.dspTime;
if (!(available || played))
{
- if (!(cond.isPlaying || cond.isPaused))
+ if (!ignoreConductorPause && !(cond.isPlaying || cond.isPaused))
{
GameManager.instance.SoundObjects.Release(this);
return;
@@ -171,7 +172,7 @@ namespace HeavenStudio.Util
if (played)
{
- if (!(cond.isPlaying || cond.isPaused))
+ if (!ignoreConductorPause && !(cond.isPlaying || cond.isPaused))
{
GameManager.instance.SoundObjects.Release(this);
return;
@@ -182,7 +183,7 @@ namespace HeavenStudio.Util
return;
}
- if (cond.isPaused || cond.SongPitch == 0)
+ if ((!ignoreConductorPause && cond.isPaused) || cond.SongPitch == 0)
{
if (!paused)
{
@@ -246,6 +247,7 @@ namespace HeavenStudio.Util
loopEndBeat = -1;
loopDone = false;
startTime = 0;
+ ignoreConductorPause = false;
audioSource.loop = false;
audioSource.Stop();
diff --git a/Assets/Scripts/Util/SoundByte.cs b/Assets/Scripts/Util/SoundByte.cs
index 51b7981ee..5236b3a29 100644
--- a/Assets/Scripts/Util/SoundByte.cs
+++ b/Assets/Scripts/Util/SoundByte.cs
@@ -284,7 +284,7 @@ namespace HeavenStudio.Util
/// Unpitched, non-scheduled, non-looping sounds are played using a global One-Shot audio source that doesn't create a Sound object.
/// Looped sounds return their created Sound object so they can be canceled after creation.
///
- public static Sound PlayOneShot(string name, double beat = -1, float pitch = 1f, float volume = 1f, bool looping = false, string game = null, double offset = 0f)
+ public static Sound PlayOneShot(string name, double beat = -1, float pitch = 1f, float volume = 1f, bool looping = false, string game = null, double offset = 0f, bool ignoreConductorPause = false)
{
AudioClip clip = null;
string soundName = name.Split('/')[^1];
@@ -334,6 +334,7 @@ namespace HeavenStudio.Util
snd.volume = volume;
snd.looping = looping;
snd.offset = offset;
+ snd.ignoreConductorPause = ignoreConductorPause;
snd.Play();
return snd;
@@ -355,7 +356,7 @@ namespace HeavenStudio.Util
///
/// Schedules a sound to be played at a specific time in seconds.
///
- public static Sound PlayOneShotScheduled(string name, double targetTime, float pitch = 1f, float volume = 1f, bool looping = false, string game = null)
+ public static Sound PlayOneShotScheduled(string name, double targetTime, float pitch = 1f, float volume = 1f, bool looping = false, string game = null, bool ignoreConductorPause = false)
{
Sound snd = GetAvailableScheduledSound();
AudioClip clip = null;
@@ -405,6 +406,7 @@ namespace HeavenStudio.Util
snd.scheduled = true;
snd.scheduledTime = targetTime;
+ snd.ignoreConductorPause = ignoreConductorPause;
snd.Play();
return snd;
@@ -415,13 +417,13 @@ namespace HeavenStudio.Util
/// Unpitched, non-scheduled, non-looping sounds are played using a global One-Shot audio source that doesn't create a Sound object.
/// Looped sounds return their created Sound object so they can be canceled after creation.
///
- public static Sound PlayOneShotGame(string name, double beat = -1, float pitch = 1f, float volume = 1f, bool looping = false, bool forcePlay = false, double offset = 0f)
+ public static Sound PlayOneShotGame(string name, double beat = -1, float pitch = 1f, float volume = 1f, bool looping = false, bool forcePlay = false, double offset = 0f, bool ignoreConductorPause = false)
{
string gameName = name.Split('/')[0];
var inf = GameManager.instance.GetGameInfo(gameName);
if (GameManager.instance.currentGame == gameName || forcePlay)
{
- return PlayOneShot($"games/{name}", beat, pitch, volume, looping, inf.usesAssetBundle ? gameName : null, offset);
+ return PlayOneShot($"games/{name}", beat, pitch, volume, looping, inf.usesAssetBundle ? gameName : null, offset, ignoreConductorPause);
}
return null;
@@ -431,13 +433,13 @@ namespace HeavenStudio.Util
/// Schedules a sound to be played at a specific time in seconds.
/// Audio clip is fetched from minigame resources
///
- public static Sound PlayOneShotScheduledGame(string name, double targetTime, float pitch = 1f, float volume = 1f, bool looping = false, bool forcePlay = false)
+ public static Sound PlayOneShotScheduledGame(string name, double targetTime, float pitch = 1f, float volume = 1f, bool looping = false, bool forcePlay = false, bool ignoreConductorPause = false)
{
string gameName = name.Split('/')[0];
var inf = GameManager.instance.GetGameInfo(gameName);
if (GameManager.instance.currentGame == gameName || forcePlay)
{
- return PlayOneShotScheduled($"games/{name}", targetTime, pitch, volume, looping, inf.usesAssetBundle ? gameName : null);
+ return PlayOneShotScheduled($"games/{name}", targetTime, pitch, volume, looping, inf.usesAssetBundle ? gameName : null, ignoreConductorPause);
}
return null;