Allow games to load assets from AssetBundles (#102)

* Loading improvements: prepwork for loading from assetbundles

* note for sfx

* cleaner code

* correct type

* put loaded assetbundle in the minigame data instead

also lays groundwork for future localization stuff

* add samurai slice gold, coin toss assetbundles

* very messy "already loaded" checks

* make Dj School load from assetbundle
This commit is contained in:
minenice55
2022-06-12 15:32:00 -04:00
committed by GitHub
parent cd70267243
commit 1dda4f9477
387 changed files with 1582 additions and 1463 deletions

View File

@ -13,28 +13,32 @@ namespace HeavenStudio.Games.Loaders
{
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("pajamaParty", "Pajama Party", "965076", false, false, new List<GameAction>()
{
// both same timing
new GameAction("jump (side to middle)", delegate {PajamaParty.instance.DoThreeJump(eventCaller.currentEntity.beat);}, 4f, false,
inactiveFunction: delegate {PajamaParty.WarnThreeJump(eventCaller.currentEntity.beat);}
),
new GameAction("jump (back to front)", delegate {PajamaParty.instance.DoFiveJump(eventCaller.currentEntity.beat);}, 4f, false,
inactiveFunction: delegate {PajamaParty.WarnFiveJump(eventCaller.currentEntity.beat);}
{
// both same timing
new GameAction("jump (side to middle)", delegate {PajamaParty.instance.DoThreeJump(eventCaller.currentEntity.beat);}, 4f, false,
inactiveFunction: delegate {PajamaParty.WarnThreeJump(eventCaller.currentEntity.beat);}
),
//idem
new GameAction("slumber", delegate {var e = eventCaller.currentEntity; PajamaParty.instance.DoSleepSequence(e.beat, e.toggle);}, 8f, false, parameters: new List<Param>()
{
new Param("toggle", false, "Alt. Animation", "Use an alternate animation for Mako")
},
inactiveFunction: delegate {var e = eventCaller.currentEntity; PajamaParty.WarnSleepSequence(e.beat, e.toggle);}
),
new GameAction("throw", delegate {PajamaParty.instance.DoThrowSequence(eventCaller.currentEntity.beat);}, 8f, false,
inactiveFunction: delegate {PajamaParty.WarnThrowSequence(eventCaller.currentEntity.beat);}
),
//cosmetic
// new GameAction("open / close background", delegate { }, 2f, true),
// do shit with mako's face? (talking?)
});
new GameAction("jump (back to front)", delegate {PajamaParty.instance.DoFiveJump(eventCaller.currentEntity.beat);}, 4f, false,
inactiveFunction: delegate {PajamaParty.WarnFiveJump(eventCaller.currentEntity.beat);}
),
//idem
new GameAction("slumber", delegate {var e = eventCaller.currentEntity; PajamaParty.instance.DoSleepSequence(e.beat, e.toggle);}, 8f, false, parameters: new List<Param>()
{
new Param("toggle", false, "Alt. Animation", "Use an alternate animation for Mako")
},
inactiveFunction: delegate {var e = eventCaller.currentEntity; PajamaParty.WarnSleepSequence(e.beat, e.toggle);}
),
new GameAction("throw", delegate {PajamaParty.instance.DoThrowSequence(eventCaller.currentEntity.beat);}, 8f, false,
inactiveFunction: delegate {PajamaParty.WarnThrowSequence(eventCaller.currentEntity.beat);}
),
//cosmetic
// new GameAction("open / close background", delegate { }, 2f, true),
// do shit with mako's face? (talking?)
},
new List<string>() {"ctr", "normal"},
"ctrpillow", "jp",
new List<string>() {"en", "jp", "ko"}
);
}
}
}
@ -233,8 +237,10 @@ namespace HeavenStudio.Games
new MultiSound.Sound("pajamaParty/throw1", beat),
new MultiSound.Sound("pajamaParty/throw2", beat + 0.5f),
new MultiSound.Sound("pajamaParty/throw3", beat + 1f),
//TODO: change when locales are a thing
//new MultiSound.Sound("pajamaParty/en/throw4a", beat + 1.5f), //will only play if this clip exists (aka just en)
new MultiSound.Sound("pajamaParty/throw4a", beat + 1.5f),
new MultiSound.Sound("pajamaParty/charge", beat + 2f),
}, forcePlay: force);
}