mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 00:47:36 +02:00
Implemented inactive functions for all game count ins
Also made some changes to how SwitchGame(), OnGameSwitch, and the jukebox work.
This commit is contained in:
@ -10,6 +10,7 @@ namespace RhythmHeavenMania.Util
|
||||
private float startBeat;
|
||||
private int index;
|
||||
private bool game;
|
||||
private bool forcePlay;
|
||||
public List<Sound> sounds = new List<Sound>();
|
||||
|
||||
public class Sound
|
||||
@ -25,7 +26,7 @@ namespace RhythmHeavenMania.Util
|
||||
}
|
||||
|
||||
|
||||
public static MultiSound Play(Sound[] snds, bool game = true)
|
||||
public static MultiSound Play(Sound[] snds, bool game = true, bool forcePlay = false)
|
||||
{
|
||||
List<Sound> sounds = snds.ToList();
|
||||
GameObject gameObj = new GameObject();
|
||||
@ -33,6 +34,7 @@ namespace RhythmHeavenMania.Util
|
||||
ms.sounds = sounds;
|
||||
ms.startBeat = sounds[0].beat;
|
||||
ms.game = game;
|
||||
ms.forcePlay = forcePlay;
|
||||
gameObj.name = "MultiSound";
|
||||
|
||||
GameManager.instance.SoundObjects.Add(gameObj);
|
||||
@ -48,7 +50,7 @@ namespace RhythmHeavenMania.Util
|
||||
if (songPositionInBeats >= sounds[i].beat && index == i)
|
||||
{
|
||||
if (game)
|
||||
Jukebox.PlayOneShotGame(sounds[i].name);
|
||||
Jukebox.PlayOneShotGame(sounds[i].name, forcePlay:forcePlay);
|
||||
else
|
||||
Jukebox.PlayOneShot(sounds[i].name);
|
||||
|
||||
|
Reference in New Issue
Block a user