mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:37:37 +02:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user