Count ins and event selector cleanup

This commit is contained in:
Braedon 2022-02-02 22:58:08 -05:00
parent 4c9cc18fde
commit 44a36ba846
43 changed files with 671 additions and 24 deletions

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ba1b73a6b90ad93448198e8397ca3172
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: ef7281386bb83124d9fe6a3e264bd660
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 9c54cb8099a017249a30a903648a3bda
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: dd53eafd3daecf045ab63e8d69cd12b2
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 33d0f8d2cab6140428c9a4493afdbdd1
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: e08d54c2c5526744594e8642556c2b59
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: d72383be80bf8e946b46851b1e181b77
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: c65bb86d77cdd59409023840cd3530f3
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 222f4e750cad35c44853c8fd665bd7f6
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 778b229fbdfc8bf479f1f45b6708fab2
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: ab9437ebcabdb4c4ba5f4d59b39e4547
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: aa886804a7b5aee46bee092e2c7a8664
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 08dc455829c2f43479be25677052279e
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 8b92da9657da8144cbd9ca7789b47439
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 72da9bff67766ae4a80243d8b541ac3c
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:

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: a439499f638d3804a8aeec8045693cf7
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:

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

View file

@ -0,0 +1,120 @@
fileFormatVersion: 2
guid: 3f9cd74c0b8240d4ca040dd8f8a83c7b
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
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: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 427 B

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c9e989b77fb9bf546a96febfb78764da guid: 727c09a0156e5024693eca5bd659fc08
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

View file

@ -0,0 +1,120 @@
fileFormatVersion: 2
guid: c9e989b77fb9bf546a96febfb78764da
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
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: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -42,7 +42,7 @@ namespace RhythmHeavenMania
List<Minigames.Minigame> minigamesInBeatmap = new List<Minigames.Minigame>(); List<Minigames.Minigame> minigamesInBeatmap = new List<Minigames.Minigame>();
for (int i = 0; i < GameManager.instance.Beatmap.entities.Count; i++) for (int i = 0; i < GameManager.instance.Beatmap.entities.Count; i++)
{ {
if (!minigamesInBeatmap.Contains(minigames.Find(c => c.name == GameManager.instance.Beatmap.entities[i].datamodel.Split('/')[0])) && GameManager.instance.Beatmap.entities[i].datamodel.Split('/')[0] != "gameManager") if (!minigamesInBeatmap.Contains(minigames.Find(c => c.name == GameManager.instance.Beatmap.entities[i].datamodel.Split('/')[0])) && !FXOnlyGames().Contains(GetMinigame(GameManager.instance.Beatmap.entities[i].datamodel.Split('/')[0])))
{ {
minigamesInBeatmap.Add(minigames.Find(c => c.name == GameManager.instance.Beatmap.entities[i].datamodel.Split('/')[0])); minigamesInBeatmap.Add(minigames.Find(c => c.name == GameManager.instance.Beatmap.entities[i].datamodel.Split('/')[0]));
} }
@ -126,5 +126,10 @@ namespace RhythmHeavenMania
{ {
return GameManager.instance.playerEntities.FindAll(c => c.datamodel.Split('/')[0] != gameName && c.beat < beat); return GameManager.instance.playerEntities.FindAll(c => c.datamodel.Split('/')[0] != gameName && c.beat < beat);
} }
public static List<Minigames.Minigame> FXOnlyGames()
{
return instance.minigames.FindAll(c => c.fxOnly == true).ToList();
}
} }
} }

View file

@ -4,7 +4,7 @@ MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
defaultReferences: [] defaultReferences: []
executionOrder: -8 executionOrder: -20
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName: assetBundleName:

View file

@ -133,13 +133,13 @@ namespace RhythmHeavenMania
if (Conductor.instance.songPositionInBeats >= entities[currentEvent] /*&& SongPosLessThanClipLength(Conductor.instance.songPositionInBeats)*/) if (Conductor.instance.songPositionInBeats >= entities[currentEvent] /*&& SongPosLessThanClipLength(Conductor.instance.songPositionInBeats)*/)
{ {
// allows for multiple events on the same beat to be executed on the same frame, so no more 1-frame delay // allows for multiple events on the same beat to be executed on the same frame, so no more 1-frame delay
var entitesAtSameBeat = Beatmap.entities.FindAll(c => c.beat == Beatmap.entities[currentEvent].beat && c.datamodel.Split('/')[0] != "gameManager"); var entitesAtSameBeat = Beatmap.entities.FindAll(c => c.beat == Beatmap.entities[currentEvent].beat && !EventCaller.FXOnlyGames().Contains(EventCaller.instance.GetMinigame(c.datamodel.Split('/')[0])));
var gameManagerEntities = Beatmap.entities.FindAll(c => c.beat == Beatmap.entities[currentEvent].beat && c.datamodel.Split('/')[0] == "gameManager"); var fxEntities = Beatmap.entities.FindAll(c => c.beat == Beatmap.entities[currentEvent].beat && EventCaller.FXOnlyGames().Contains(EventCaller.instance.GetMinigame(c.datamodel.Split('/')[0])));
// GameManager entities should ALWAYS execute before gameplay entities // FX entities should ALWAYS execute before gameplay entities
for (int i = 0; i < gameManagerEntities.Count; i++) for (int i = 0; i < fxEntities.Count; i++)
{ {
eventCaller.CallEvent(gameManagerEntities[i].datamodel); eventCaller.CallEvent(fxEntities[i].datamodel);
currentEvent++; currentEvent++;
} }
@ -258,7 +258,10 @@ namespace RhythmHeavenMania
// newGame = gameSwitchs[gameSwitchs.IndexOf(gameSwitchs.Find(c => c.beat == Mathp.GetClosestInList(gameSwitchs.Select(c => c.beat).ToList(), beat)))].datamodel.Split(2); // newGame = gameSwitchs[gameSwitchs.IndexOf(gameSwitchs.Find(c => c.beat == Mathp.GetClosestInList(gameSwitchs.Select(c => c.beat).ToList(), beat)))].datamodel.Split(2);
} }
SetGame(newGame); if (!GetGameInfo(newGame).fxOnly)
{
SetGame(newGame);
}
} }
else else
{ {
@ -351,7 +354,7 @@ namespace RhythmHeavenMania
{ {
if (name == "gameManager") if (name == "gameManager")
{ {
name = Beatmap.entities.FindAll(c => c.datamodel.Split(0) != "gameManager").ToList()[0].datamodel.Split(0); name = Beatmap.entities.FindAll(c => c.datamodel.Split(0) != "gameManager" || c.datamodel.Split(0) != "countIn").ToList()[0].datamodel.Split(0);
} }
return Resources.Load<GameObject>($"Games/{name}"); return Resources.Load<GameObject>($"Games/{name}");
} }

View file

@ -110,7 +110,7 @@ namespace RhythmHeavenMania.Editor
private void AddEvents() private void AddEvents()
{ {
if (mg.name != "gameManager") if (!EventCaller.FXOnlyGames().Contains(EventCaller.instance.GetMinigame(mg.name)))
{ {
GameObject sg = Instantiate(EventRef, eventsParent); GameObject sg = Instantiate(EventRef, eventsParent);
sg.GetComponent<TMP_Text>().text = "switchGame"; sg.GetComponent<TMP_Text>().text = "switchGame";
@ -166,11 +166,39 @@ namespace RhythmHeavenMania.Editor
if (currentEventIndex == 0) if (currentEventIndex == 0)
{ {
eventObj = Timeline.instance.AddEventObject($"gameManager/switchGame/{mg.name}", true, new Vector3(0, 0), null, true, Timeline.RandomID()); if (EventCaller.FXOnlyGames().Contains(EventCaller.instance.GetMinigame(mg.name)))
{
int index = currentEventIndex + 1;
if (currentEventIndex - 1 > mg.actions.Count)
{
index = currentEventIndex;
}
else if (currentEventIndex - 1 < 0)
{
if (mg.actions[0].actionName == "switchGame")
index = 1;
else
index = 0;
}
eventObj = Timeline.instance.AddEventObject(mg.name + "/" + mg.actions[index].actionName, true, new Vector3(0, 0), null, true, Timeline.RandomID());
}
else
eventObj = Timeline.instance.AddEventObject($"gameManager/switchGame/{mg.name}", true, new Vector3(0, 0), null, true, Timeline.RandomID());
} }
else else
{ {
eventObj = Timeline.instance.AddEventObject(mg.name + "/" + mg.actions[currentEventIndex - 1].actionName, true, new Vector3(0, 0), null, true, Timeline.RandomID()); int index = currentEventIndex - 1;
if (mg.actions[0].actionName == "switchGame")
{
index = currentEventIndex + 1;
}
else if (EventCaller.FXOnlyGames().Contains(EventCaller.instance.GetMinigame(mg.name)) && mg.actions[0].actionName != "switchGame")
{
index = currentEventIndex;
}
eventObj = Timeline.instance.AddEventObject(mg.name + "/" + mg.actions[index].actionName, true, new Vector3(0, 0), null, true, Timeline.RandomID());
} }
eventObj.isCreating = true; eventObj.isCreating = true;

View file

@ -22,14 +22,17 @@ namespace RhythmHeavenMania
public string color; public string color;
public GameObject holder; public GameObject holder;
public bool threeD; public bool threeD;
public bool fxOnly;
public List<GameAction> actions = new List<GameAction>(); public List<GameAction> actions = new List<GameAction>();
public Minigame(string name, string displayName, string color, bool threeD, List<GameAction> actions) public Minigame(string name, string displayName, string color, bool threeD, bool fxOnly, List<GameAction> actions)
{ {
this.name = name; this.name = name;
this.displayName = displayName; this.displayName = displayName;
this.color = color; this.color = color;
this.actions = actions; this.actions = actions;
this.threeD = threeD;
this.fxOnly = fxOnly;
} }
} }
@ -55,12 +58,36 @@ namespace RhythmHeavenMania
{ {
eventCaller.minigames = new List<Minigame>() eventCaller.minigames = new List<Minigame>()
{ {
new Minigame("gameManager", "Game Manager", "", false, new List<GameAction>() new Minigame("gameManager", "Game Manager", "", false, true, new List<GameAction>()
{ {
new GameAction("switchGame", delegate { GameManager.instance.SwitchGame(eventCaller.currentSwitchGame); }),
new GameAction("end", delegate { Debug.Log("end"); }), new GameAction("end", delegate { Debug.Log("end"); }),
new GameAction("switchGame", delegate { GameManager.instance.SwitchGame(eventCaller.currentSwitchGame); }) new GameAction("skill star", delegate { }, 1f, true),
}), }),
new Minigame("forkLifter", "Fork Lifter", "FFFFFF", false, new List<GameAction>() new Minigame("countIn", "Count-Ins", "", false, true, new List<GameAction>()
{
new GameAction("cowbell", delegate { Jukebox.PlayOneShot("count-ins/cowbell"); }, 1f),
new GameAction("one", delegate { Jukebox.PlayOneShot("count-ins/one1"); }, 1f),
new GameAction("one (alt)", delegate { Jukebox.PlayOneShot("count-ins/one2"); }, 1f),
new GameAction("two", delegate { Jukebox.PlayOneShot("count-ins/two1"); }, 1f),
new GameAction("two (alt)", delegate { Jukebox.PlayOneShot("count-ins/two2"); }, 1f),
new GameAction("three", delegate { Jukebox.PlayOneShot("count-ins/three1"); }, 1f),
new GameAction("three (alt)", delegate { Jukebox.PlayOneShot("count-ins/three2"); }, 1f),
new GameAction("four", delegate { Jukebox.PlayOneShot("count-ins/four1"); }, 1f),
new GameAction("four (alt)", delegate { Jukebox.PlayOneShot("count-ins/four2"); }, 1f),
new GameAction("and", delegate { Jukebox.PlayOneShot("count-ins/and"); }, 0.5f),
new GameAction("go!", delegate { Jukebox.PlayOneShot("count-ins/go1"); }, 1f),
new GameAction("go! (alt)", delegate { Jukebox.PlayOneShot("count-ins/go2"); }, 1f),
new GameAction("ready!", delegate
{
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound("count-ins/ready1", eventCaller.currentBeat),
new MultiSound.Sound("count-ins/ready2", eventCaller.currentBeat + 1f),
}, false);
}, 2f),
}),
new Minigame("forkLifter", "Fork Lifter", "FFFFFF", false, false, new List<GameAction>()
{ {
new GameAction("pea", delegate { ForkLifter.instance.Flick(eventCaller.currentBeat, 0); }, 3), new GameAction("pea", delegate { ForkLifter.instance.Flick(eventCaller.currentBeat, 0); }, 3),
new GameAction("topbun", delegate { ForkLifter.instance.Flick(eventCaller.currentBeat, 1); }, 3), new GameAction("topbun", delegate { ForkLifter.instance.Flick(eventCaller.currentBeat, 1); }, 3),
@ -70,14 +97,14 @@ namespace RhythmHeavenMania
new GameAction("gulp", delegate { ForkLifterPlayer.instance.Eat(); }), new GameAction("gulp", delegate { ForkLifterPlayer.instance.Eat(); }),
new GameAction("sigh", delegate { Jukebox.PlayOneShot("sigh"); }) new GameAction("sigh", delegate { Jukebox.PlayOneShot("sigh"); })
}), }),
new Minigame("clappyTrio", "The Clappy Trio", "29E7FF", false, new List<GameAction>() new Minigame("clappyTrio", "The Clappy Trio", "29E7FF", false, false, new List<GameAction>()
{ {
new GameAction("clap", delegate { ClappyTrio.instance.Clap(eventCaller.currentBeat, eventCaller.currentLength); }, 3, true), new GameAction("clap", delegate { ClappyTrio.instance.Clap(eventCaller.currentBeat, eventCaller.currentLength); }, 3, true),
new GameAction("bop", delegate { ClappyTrio.instance.Bop(eventCaller.currentBeat); } ), new GameAction("bop", delegate { ClappyTrio.instance.Bop(eventCaller.currentBeat); } ),
new GameAction("prepare", delegate { ClappyTrio.instance.Prepare(0); } ), new GameAction("prepare", delegate { ClappyTrio.instance.Prepare(0); } ),
new GameAction("prepare_alt", delegate { ClappyTrio.instance.Prepare(3); } ), new GameAction("prepare_alt", delegate { ClappyTrio.instance.Prepare(3); } ),
}), }),
new Minigame("spaceball", "Spaceball", "00A518", false, new List<GameAction>() new Minigame("spaceball", "Spaceball", "00A518", false, false, new List<GameAction>()
{ {
new GameAction("shoot", delegate { Spaceball.instance.Shoot(eventCaller.currentBeat, false, eventCaller.currentType); }, 2), new GameAction("shoot", delegate { Spaceball.instance.Shoot(eventCaller.currentBeat, false, eventCaller.currentType); }, 2),
new GameAction("shootHigh", delegate { Spaceball.instance.Shoot(eventCaller.currentBeat, true, eventCaller.currentType); }, 3), new GameAction("shootHigh", delegate { Spaceball.instance.Shoot(eventCaller.currentBeat, true, eventCaller.currentType); }, 3),
@ -85,7 +112,7 @@ namespace RhythmHeavenMania
new GameAction("alien", delegate { Spaceball.instance.alien.Show(eventCaller.currentBeat); } ), new GameAction("alien", delegate { Spaceball.instance.alien.Show(eventCaller.currentBeat); } ),
new GameAction("cameraZoom", delegate { }, 4, true ), new GameAction("cameraZoom", delegate { }, 4, true ),
}), }),
new Minigame("karateman", "Karate Man", "70A8D8", false, new List<GameAction>() new Minigame("karateman", "Karate Man", "70A8D8", false, false, new List<GameAction>()
{ {
new GameAction("bop", delegate { KarateMan.instance.Bop(eventCaller.currentBeat, eventCaller.currentLength); }, 0.5f, true), new GameAction("bop", delegate { KarateMan.instance.Bop(eventCaller.currentBeat, eventCaller.currentLength); }, 0.5f, true),
new GameAction("pot", delegate { KarateMan.instance.Shoot(eventCaller.currentBeat, 0); }, 2), new GameAction("pot", delegate { KarateMan.instance.Shoot(eventCaller.currentBeat, 0); }, 2),
@ -101,13 +128,13 @@ namespace RhythmHeavenMania
new GameAction("bgfxoff", delegate { KarateMan.instance.BGFXOff(); }), new GameAction("bgfxoff", delegate { KarateMan.instance.BGFXOff(); }),
new GameAction("tacobell", delegate { KarateMan.instance.Shoot(eventCaller.currentBeat, 6); }, 2), new GameAction("tacobell", delegate { KarateMan.instance.Shoot(eventCaller.currentBeat, 6); }, 2),
}), }),
new Minigame("spaceSoccer", "Space Soccer", "B888F8", false, new List<GameAction>() new Minigame("spaceSoccer", "Space Soccer", "B888F8", false, false, new List<GameAction>()
{ {
new GameAction("ball dispense", delegate { SpaceSoccer.instance.Dispense(eventCaller.currentBeat); }, 2f), new GameAction("ball dispense", delegate { SpaceSoccer.instance.Dispense(eventCaller.currentBeat); }, 2f),
new GameAction("keep-up", delegate { }, 4f, true), new GameAction("keep-up", delegate { }, 4f, true),
new GameAction("high kick-toe!", delegate { }, 3f), new GameAction("high kick-toe!", delegate { }, 3f),
}), }),
new Minigame("djSchool", "DJ School \n<color=#eb5454>[Non-Playable]</color>", "B888F8", false, new List<GameAction>() new Minigame("djSchool", "DJ School \n<color=#eb5454>[Non-Playable]</color>", "B888F8", false, false, new List<GameAction>()
{ {
new GameAction("break c'mon ooh", delegate { DJSchool.instance.BreakCmon(eventCaller.currentBeat); }, 3f), new GameAction("break c'mon ooh", delegate { DJSchool.instance.BreakCmon(eventCaller.currentBeat); }, 3f),
new GameAction("scratch-o hey", delegate { DJSchool.instance.ScratchoHey(eventCaller.currentBeat); }, 3f), new GameAction("scratch-o hey", delegate { DJSchool.instance.ScratchoHey(eventCaller.currentBeat); }, 3f),

View file

@ -9,6 +9,7 @@ namespace RhythmHeavenMania.Util
{ {
private float startBeat; private float startBeat;
private int index; private int index;
private bool game;
public List<Sound> sounds = new List<Sound>(); public List<Sound> sounds = new List<Sound>();
public class Sound public class Sound
@ -24,13 +25,14 @@ namespace RhythmHeavenMania.Util
} }
public static void Play(Sound[] snds) public static void Play(Sound[] snds, bool game = true)
{ {
List<Sound> sounds = snds.ToList(); List<Sound> sounds = snds.ToList();
GameObject gameObj = new GameObject(); GameObject gameObj = new GameObject();
MultiSound ms = gameObj.AddComponent<MultiSound>(); MultiSound ms = gameObj.AddComponent<MultiSound>();
ms.sounds = sounds; ms.sounds = sounds;
ms.startBeat = sounds[0].beat; ms.startBeat = sounds[0].beat;
ms.game = game;
gameObj.name = "MultiSound"; gameObj.name = "MultiSound";
GameManager.instance.SoundObjects.Add(gameObj); GameManager.instance.SoundObjects.Add(gameObj);
@ -44,7 +46,11 @@ namespace RhythmHeavenMania.Util
{ {
if (songPositionInBeats >= sounds[i].beat && index == i) if (songPositionInBeats >= sounds[i].beat && index == i)
{ {
Jukebox.PlayOneShotGame(sounds[i].name); if (game)
Jukebox.PlayOneShotGame(sounds[i].name);
else
Jukebox.PlayOneShot(sounds[i].name);
index++; index++;
} }
} }