done coding frogge
This commit is contained in:
parent
8e30add281
commit
8e9a2fc515
|
@ -199,6 +199,22 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
},
|
},
|
||||||
|
new GameAction("force", "Force Hop")
|
||||||
|
{
|
||||||
|
preFunction = delegate {
|
||||||
|
var e = eventCaller.currentEntity;
|
||||||
|
if (eventCaller.gameManager.minigameObj.TryGetComponent(out FrogHop instance)) {
|
||||||
|
instance.ForceHop(e.beat, e.length, e["front"], e["back"]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
parameters = new List<Param>()
|
||||||
|
{
|
||||||
|
new Param("front", true, "Front Frogs", "Make the frogs in the front sing during this event."),
|
||||||
|
new Param("back", true, "Back Frogs", "Make the frogs in the back sing during this event."),
|
||||||
|
},
|
||||||
|
resizable = true,
|
||||||
|
defaultLength = 4.0f,
|
||||||
|
},
|
||||||
new GameAction("pitching", "Enable Pitched Voices")
|
new GameAction("pitching", "Enable Pitched Voices")
|
||||||
{
|
{
|
||||||
function = delegate {
|
function = delegate {
|
||||||
|
@ -497,6 +513,29 @@ namespace HeavenStudio.Games
|
||||||
usesGlobalePitch = enabled;
|
usesGlobalePitch = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ForceHop(double beat, double length, bool front, bool back)
|
||||||
|
{
|
||||||
|
var actions = new List<BeatAction.Action>();
|
||||||
|
|
||||||
|
for (int i = 0; i < length; i++)
|
||||||
|
{
|
||||||
|
if (front)
|
||||||
|
{
|
||||||
|
actions.Add(new BeatAction.Action(beat + i, delegate { NPCHop(FrontFrogs); }));
|
||||||
|
}
|
||||||
|
if (back)
|
||||||
|
{
|
||||||
|
actions.Add(new BeatAction.Action(beat + i, delegate {
|
||||||
|
NPCHop(BackFrogs);
|
||||||
|
SoundByte.PlayOneShotGame("frogHop/SE_NTR_FROG_EN_E_BEAT");
|
||||||
|
}));
|
||||||
|
ScheduleInput(beat - 1, i + 1, InputAction_BasicPress, PlayerHopNormal, PlayerMiss, Nothing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BeatAction.New(this, actions);
|
||||||
|
}
|
||||||
|
|
||||||
public void TwoHop (double beat, bool spotlights, bool jumpinJazz, double start = 0)
|
public void TwoHop (double beat, bool spotlights, bool jumpinJazz, double start = 0)
|
||||||
{
|
{
|
||||||
CueCommon(beat, spotlights);
|
CueCommon(beat, spotlights);
|
||||||
|
|
Loading…
Reference in a new issue