Second PlayerActionEvent Pass (#206)

* fix crop stomp input scheduling bugs

* update space soccer to use PlayerActionEvent

* update spaceball to use PlayerActionEvent

make PlayerActionEvents clean themselves up on game switch

* update rhythm rally to use PlayerActionEvent

* update rhythm tweezers to use PlayerActionEvent

* update mahou tsukai to use PlayerActionEvent

* reduce logging level
This commit is contained in:
minenice55
2023-01-15 22:05:25 -05:00
committed by GitHub
parent 330c538947
commit dd0531f48f
13 changed files with 283 additions and 399 deletions

View File

@ -28,7 +28,8 @@ namespace HeavenStudio.Games.Loaders
new GameAction("toss ball", "Toss Ball")
{
function = delegate { RhythmRally.instance.Toss(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, 6f, true); },
defaultLength = 2f
defaultLength = 2f,
resizable = true
},
new GameAction("rally", "Rally")
{
@ -375,16 +376,16 @@ namespace HeavenStudio.Games
switch (rallySpeed)
{
case RallySpeed.Normal:
targetBeat = serveBeat + 2f;
targetBeat = 2f;
bounceBeat = serveBeat + 1f;
break;
case RallySpeed.Fast:
case RallySpeed.SuperFast:
targetBeat = serveBeat + 1f;
targetBeat = 1f;
bounceBeat = serveBeat + 0.5f;
break;
case RallySpeed.Slow:
targetBeat = serveBeat + 4f;
targetBeat = 4f;
bounceBeat = serveBeat + 2f;
break;
}
@ -393,7 +394,7 @@ namespace HeavenStudio.Games
MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("rhythmRally/Serve", serveBeat), new MultiSound.Sound("rhythmRally/ServeBounce", bounceBeat) });
paddlers.BounceFX(bounceBeat);
paddlers.ResetState();
ScheduleInput(serveBeat, targetBeat, InputType.STANDARD_DOWN, paddlers.Just, paddlers.Miss, paddlers.Out);
}
public void Toss(float beat, float length, float height, bool firstToss = false)
@ -401,6 +402,9 @@ namespace HeavenStudio.Games
// Hide trail while tossing to prevent weirdness while teleporting ball.
ballTrail.gameObject.SetActive(false);
if (firstToss)
height *= length/2f;
tossCurve.transform.localScale = new Vector3(1f, height, 1f);
tossBeat = beat;
tossLength = length;