forked from akanyan/mu3-mods
add offgeki
This commit is contained in:
36
Extras/Offgeki/MU3.Battle/patch_GameEngine.cs
Normal file
36
Extras/Offgeki/MU3.Battle/patch_GameEngine.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using MU3.Util;
|
||||
|
||||
namespace MU3.Battle;
|
||||
|
||||
class patch_GameEngine
|
||||
{
|
||||
private Player _player;
|
||||
|
||||
private Ally[] _allies;
|
||||
|
||||
extern public void orig_createPlayer(StartCutscenePosition startCutscenePos, int charaId);
|
||||
|
||||
public void createPlayer(StartCutscenePosition startCutscenePos, int charaId)
|
||||
{
|
||||
orig_createPlayer(startCutscenePos, charaId);
|
||||
if (Singleton<Mod.State>.instance.RemovePlayerGeki && _player)
|
||||
{
|
||||
_player.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
extern public void orig_createAlly(int id, StartCutscenePosition startCutscenePos, int charaId, int allyNum);
|
||||
public void createAlly(int id, StartCutscenePosition startCutscenePos, int charaId, int allyNum)
|
||||
{
|
||||
orig_createAlly(id, startCutscenePos, charaId, allyNum);
|
||||
if (Singleton<Mod.State>.instance.RemoveAllyGekis)
|
||||
{
|
||||
foreach (var a in _allies)
|
||||
{
|
||||
if (a) {
|
||||
a.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user