From a1691bd1098ad1e118ebb265c73b877945d3b784 Mon Sep 17 00:00:00 2001 From: blank3times <105398129+blank3times@users.noreply.github.com> Date: Tue, 23 Apr 2024 07:57:22 -0700 Subject: [PATCH] Update Chameleon.cs (#891) Make countin depend on length --- Assets/Scripts/Games/Chameleon/Chameleon.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Games/Chameleon/Chameleon.cs b/Assets/Scripts/Games/Chameleon/Chameleon.cs index b6a28c5ff..0014028bc 100644 --- a/Assets/Scripts/Games/Chameleon/Chameleon.cs +++ b/Assets/Scripts/Games/Chameleon/Chameleon.cs @@ -23,7 +23,7 @@ namespace HeavenStudio.Games.Loaders preFunction = delegate { var e = eventCaller.currentEntity; Chameleon.PreSpawnFly(e.beat, e.length - 4, (int)Scripts_Chameleon.FlyType.Far); - if (e["countIn"]) Chameleon.CountIn(e.beat); + if (e["countIn"]) Chameleon.CountIn(e.beat, e.length - 4); }, defaultLength = 8f, resizable = true, @@ -37,7 +37,7 @@ namespace HeavenStudio.Games.Loaders preFunction = delegate { var e = eventCaller.currentEntity; Chameleon.PreSpawnFly(e.beat, e.length - 4, (int)Scripts_Chameleon.FlyType.Close); - if (e["countIn"]) Chameleon.CountIn(e.beat); + if (e["countIn"]) Chameleon.CountIn(e.beat, e.length - 4); }, defaultLength = 8f, resizable = true, @@ -265,12 +265,13 @@ namespace HeavenStudio.Games }); } - public static void CountIn(double beat) + public static void CountIn(double beat, double length) { + if (length < 0) length = 4; MultiSound.Play(new MultiSound.Sound[]{ - new MultiSound.Sound("count-ins/three2", beat + 4), - new MultiSound.Sound("count-ins/two2", beat + 5), - new MultiSound.Sound("count-ins/one2", beat + 6), + new MultiSound.Sound("count-ins/three2", beat + length), + new MultiSound.Sound("count-ins/two2", beat + length + 1), + new MultiSound.Sound("count-ins/one2", beat + length + 2), }, forcePlay: true, game: false); }