Games fixes/reworks patch (#501)

* ghosts are scaled now

* Lockstep fully reworked

* mr. bach has been implemented

* Space dance fixes

* oops

* Tap trial rework part 1

* tap trial rework part 2

* oopsie

* Gramps Talk Update

* Space Dance Voice Offsets

* Giraffe done! (Except miss anim)

* bg is not showing up for some reason

* bg not rendering fixed + giraffe fixed

* scrolling done

* fixed space dance and space soccer bg scrolls

* fixed rockers bugs

* adjustment

* fixed el inaccuracies

* particle fix

* changed pitch and volume of monkey tap

* miss anim

* megamix face for girl

* Proper miss anim implementation

* Added force stepping event

* miss anim fix

---------

Co-authored-by: saladplainzone <chocolate2890mail@gmail.com>
Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
This commit is contained in:
Rapandrasmus
2023-07-13 02:35:47 +02:00
committed by GitHub
parent 8a968b0a38
commit dfe144cf4b
94 changed files with 11089 additions and 2864 deletions

View File

@ -3,7 +3,6 @@ using System;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using static HeavenStudio.Games.SpaceDance;
using HeavenStudio.Common;
namespace HeavenStudio.Games.Loaders
@ -16,7 +15,8 @@ namespace HeavenStudio.Games.Loaders
{
new GameAction("turn right", "Turn Right")
{
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.DoTurnRight(e.beat, e["whoSpeaks"], e["gramps"]); },
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.DoTurnRight(e.beat, e["gramps"]); },
preFunction = delegate { var e = eventCaller.currentEntity; SpaceDance.TurnRightSfx(e.beat, e["whoSpeaks"]); },
defaultLength = 2.0f,
parameters = new List<Param>()
{
@ -26,7 +26,8 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("sit down", "Sit Down")
{
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.DoSitDown(e.beat, e["whoSpeaks"], e["gramps"]); },
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.DoSitDown(e.beat, e["gramps"]); },
preFunction = delegate { var e = eventCaller.currentEntity; SpaceDance.SitDownSfx(e.beat, e["whoSpeaks"]); },
defaultLength = 2.0f,
parameters = new List<Param>()
{
@ -36,7 +37,8 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("punch", "Punch")
{
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.DoPunch(e.beat, e["whoSpeaks"], e["gramps"]); },
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.DoPunch(e.beat, e["gramps"]); },
preFunction = delegate { var e = eventCaller.currentEntity; SpaceDance.PunchSfx(e.beat, e["whoSpeaks"]); },
defaultLength = 2.0f,
parameters = new List<Param>()
{
@ -46,7 +48,7 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("shootingStar", "Shooting Star")
{
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.UpdateShootingStar(e.beat, e.length, e["ease"]); },
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.UpdateShootingStar(e.beat, e.length, (EasingFunction.Ease)e["ease"]); },
defaultLength = 2f,
resizable = true,
parameters = new List<Param>()
@ -94,8 +96,8 @@ namespace HeavenStudio.Games.Loaders
function = delegate { var e = eventCaller.currentEntity; SpaceDance.instance.UpdateScrollSpeed(e["x"], e["y"]); },
defaultLength = 1f,
parameters = new List<Param>() {
new Param("x", new EntityTypes.Float(-5f, 5f, 0), "Horizontal", "How fast does the background move horizontally?"),
new Param("y", new EntityTypes.Float(-5f, 5f, 0), "Vertical", "How fast does the background move vertically?"),
new Param("x", new EntityTypes.Float(-10f, 10f, 0), "Horizontal", "How fast does the background move horizontally?"),
new Param("y", new EntityTypes.Float(-10f, 10f, 0), "Vertical", "How fast does the background move vertically?"),
}
},
},
@ -155,11 +157,10 @@ namespace HeavenStudio.Games
bool grampsSniffing;
[SerializeField] CanvasScroll scroll;
float scrollBeat;
float scrollOffsetX;
float scrollOffsetY;
float currentScrollLengthX;
float currentScrollLengthY;
float xScrollMultiplier = 0;
float yScrollMultiplier = 0;
[SerializeField] private float xBaseSpeed = 1;
[SerializeField] private float yBaseSpeed = 1;
public GameEvent bop = new GameEvent();
@ -177,10 +178,8 @@ namespace HeavenStudio.Games
var cond = Conductor.instance;
if (cond.isPlaying && !cond.isPaused)
{
float normalizedX = (Time.realtimeSinceStartup - scrollBeat) * currentScrollLengthX;
float normalizedY = (Time.realtimeSinceStartup - scrollBeat) * currentScrollLengthY;
scroll.NormalizedX = -scrollOffsetX - normalizedX;
scroll.NormalizedY = -scrollOffsetY - normalizedY;
scroll.NormalizedX -= xBaseSpeed * xScrollMultiplier * Time.deltaTime;
scroll.NormalizedY -= yBaseSpeed * yScrollMultiplier * Time.deltaTime;
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
{
if (shouldBop)
@ -216,7 +215,6 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("spaceDance/inputBad");
DancerP.DoScaledAnimationAsync("PunchDo", 0.5f);
Gramps.Play("GrampsOhFuck", 0, 0);
// Look at this later, sound effect has some weird clipping on it sometimes?? popping. like. fucking popopop idk why its doing that its fine theres no sample weirdness ughh
}
if (PlayerInput.GetSpecificDirectionDown(1) && !IsExpectingInputNow(InputType.DIRECTION_RIGHT_DOWN))
{
@ -236,11 +234,8 @@ namespace HeavenStudio.Games
public void UpdateScrollSpeed(float scrollSpeedX, float scrollSpeedY)
{
scrollOffsetX = (Time.realtimeSinceStartup - scrollBeat) * currentScrollLengthX;
scrollOffsetY = (Time.realtimeSinceStartup - scrollBeat) * currentScrollLengthY;
currentScrollLengthX = scrollSpeedX;
currentScrollLengthY = scrollSpeedY;
scrollBeat = Time.realtimeSinceStartup;
xScrollMultiplier = scrollSpeedX;
yScrollMultiplier = scrollSpeedY;
}
public void GrampsAnimations(double beat, int type, bool looping)
@ -373,12 +368,8 @@ namespace HeavenStudio.Games
isShootingStar = true;
}
public void DoTurnRight(double beat, int whoSpeaks, bool grampsTurns)
public static void TurnRightSfx(double beat, int whoSpeaks)
{
canBop = false;
if (grampsTurns) grampsCanBop = false;
ScheduleInput(beat, 1f, InputType.DIRECTION_RIGHT_DOWN, JustRight, RightMiss, Empty);
List<MultiSound.Sound> soundsToPlay = new List<MultiSound.Sound>()
{
new MultiSound.Sound("spaceDance/voicelessTurn", beat),
@ -390,43 +381,50 @@ namespace HeavenStudio.Games
soundsToPlay.AddRange(new List<MultiSound.Sound>()
{
new MultiSound.Sound("spaceDance/dancerTurn", beat),
new MultiSound.Sound("spaceDance/dancerRight", beat + 1.0f, 1, 1, false, 0.007f),
new MultiSound.Sound("spaceDance/dancerRight", beat + 1.0f, 1, 1, false, 0.012f),
});
break;
case (int)WhoSpeaks.Gramps:
soundsToPlay.AddRange(new List<MultiSound.Sound>()
{
new MultiSound.Sound("spaceDance/otherTurn", beat),
new MultiSound.Sound("spaceDance/otherRight", beat + 1.0f, 1, 1, false, 0.007f),
new MultiSound.Sound("spaceDance/otherRight", beat + 1.0f, 1, 1, false, 0.005f),
});
break;
case (int)WhoSpeaks.Both:
soundsToPlay.AddRange(new List<MultiSound.Sound>()
{
new MultiSound.Sound("spaceDance/dancerTurn", beat),
new MultiSound.Sound("spaceDance/dancerRight", beat + 1.0f, 1, 1, false, 0.007f),
new MultiSound.Sound("spaceDance/dancerRight", beat + 1.0f, 1, 1, false, 0.012f),
new MultiSound.Sound("spaceDance/otherTurn", beat),
new MultiSound.Sound("spaceDance/otherRight", beat + 1.0f, 1, 1, false, 0.007f),
new MultiSound.Sound("spaceDance/otherRight", beat + 1.0f, 1, 1, false, 0.005f),
});
break;
}
MultiSound.Play(soundsToPlay.ToArray());
}
public void DoTurnRight(double beat, bool grampsTurns)
{
canBop = false;
if (grampsTurns) grampsCanBop = false;
ScheduleInput(beat, 1f, InputType.DIRECTION_RIGHT_DOWN, JustRight, RightMiss, Empty);
BeatAction.New(Player, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { DancerP.DoScaledAnimationAsync("TurnRightStart", 0.5f);}),
new BeatAction.Action(beat, delegate { Dancer1.DoScaledAnimationAsync("TurnRightStart", 0.5f);}),
new BeatAction.Action(beat, delegate { Dancer2.DoScaledAnimationAsync("TurnRightStart", 0.5f);}),
new BeatAction.Action(beat, delegate
{
{
DancerP.DoScaledAnimationAsync("TurnRightStart", 0.5f);
Dancer1.DoScaledAnimationAsync("TurnRightStart", 0.5f);
Dancer2.DoScaledAnimationAsync("TurnRightStart", 0.5f);
Dancer3.DoScaledAnimationAsync("TurnRightStart", 0.5f);
if (grampsTurns) Gramps.DoScaledAnimationAsync("GrampsTurnRightStart", 0.5f);
}),
new BeatAction.Action(beat + 1f, delegate { Dancer1.DoScaledAnimationAsync("TurnRightDo", 0.5f);}),
new BeatAction.Action(beat + 1f, delegate { Dancer2.DoScaledAnimationAsync("TurnRightDo", 0.5f);}),
new BeatAction.Action(beat + 1f, delegate
{
Dancer1.DoScaledAnimationAsync("TurnRightDo", 0.5f);
Dancer2.DoScaledAnimationAsync("TurnRightDo", 0.5f);
Dancer3.DoScaledAnimationAsync("TurnRightDo", 0.5f);
if (grampsTurns) Gramps.DoScaledAnimationAsync("GrampsTurnRightDo", 0.5f);
}),
@ -435,11 +433,8 @@ namespace HeavenStudio.Games
}
public void DoSitDown(double beat, int whoSpeaks, bool grampsSits)
public static void SitDownSfx(double beat, int whoSpeaks)
{
canBop = false;
if (grampsSits) grampsCanBop = false;
ScheduleInput(beat, 1f, InputType.DIRECTION_DOWN_DOWN, JustSit, SitMiss, Empty);
List<MultiSound.Sound> soundsToPlay = new List<MultiSound.Sound>()
{
new MultiSound.Sound("spaceDance/voicelessSit", beat),
@ -450,48 +445,55 @@ namespace HeavenStudio.Games
case (int)WhoSpeaks.Dancers:
soundsToPlay.AddRange(new List<MultiSound.Sound>()
{
new MultiSound.Sound("spaceDance/dancerLets", beat, 1, 1, false, 0.07f),
new MultiSound.Sound("spaceDance/dancerSit", beat + 0.5f, 1, 1, false, 0.02f),
new MultiSound.Sound("spaceDance/dancerDown", beat + 1f, 1, 1, false, 0.006f),
new MultiSound.Sound("spaceDance/dancerLets", beat, 1, 1, false, 0.055f),
new MultiSound.Sound("spaceDance/dancerSit", beat + 0.5f, 1, 1, false, 0.05f),
new MultiSound.Sound("spaceDance/dancerDown", beat + 1f, 1, 1, false, 0.004f),
});
break;
case (int)WhoSpeaks.Gramps:
soundsToPlay.AddRange(new List<MultiSound.Sound>()
{
new MultiSound.Sound("spaceDance/otherLets", beat, 1, 1, false, 0.024f),
new MultiSound.Sound("spaceDance/otherSit", beat + 0.5f, 1, 1, false, 0.04f),
new MultiSound.Sound("spaceDance/otherLets", beat, 1, 1, false, 0.02f),
new MultiSound.Sound("spaceDance/otherSit", beat + 0.5f, 1, 1, false, 0.064f),
new MultiSound.Sound("spaceDance/otherDown", beat + 1f, 1, 1, false, 0.01f),
});
break;
case (int)WhoSpeaks.Both:
soundsToPlay.AddRange(new List<MultiSound.Sound>()
{
new MultiSound.Sound("spaceDance/dancerLets", beat, 1, 1, false, 0.07f),
new MultiSound.Sound("spaceDance/dancerSit", beat + 0.5f, 1, 1, false, 0.02f),
new MultiSound.Sound("spaceDance/dancerDown", beat + 1f, 1, 1, false, 0.006f),
new MultiSound.Sound("spaceDance/otherLets", beat, 1, 1, false, 0.024f),
new MultiSound.Sound("spaceDance/otherSit", beat + 0.5f, 1, 1, false, 0.04f),
new MultiSound.Sound("spaceDance/dancerLets", beat, 1, 1, false, 0.055f),
new MultiSound.Sound("spaceDance/dancerSit", beat + 0.5f, 1, 1, false, 0.05f),
new MultiSound.Sound("spaceDance/dancerDown", beat + 1f, 1, 1, false, 0.004f),
new MultiSound.Sound("spaceDance/otherLets", beat, 1, 1, false, 0.02f),
new MultiSound.Sound("spaceDance/otherSit", beat + 0.5f, 1, 1, false, 0.064f),
new MultiSound.Sound("spaceDance/otherDown", beat + 1f, 1, 1, false, 0.01f),
});
break;
}
MultiSound.Play(soundsToPlay.ToArray());
}
public void DoSitDown(double beat, bool grampsSits)
{
canBop = false;
if (grampsSits) grampsCanBop = false;
ScheduleInput(beat, 1f, InputType.DIRECTION_DOWN_DOWN, JustSit, SitMiss, Empty);
BeatAction.New(Player, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { DancerP.DoScaledAnimationAsync("SitDownStart", 0.5f);}),
new BeatAction.Action(beat, delegate { Dancer1.DoScaledAnimationAsync("SitDownStart", 0.5f);}),
new BeatAction.Action(beat, delegate { Dancer2.DoScaledAnimationAsync("SitDownStart", 0.5f);}),
new BeatAction.Action(beat, delegate
{
{
DancerP.DoScaledAnimationAsync("SitDownStart", 0.5f);
Dancer1.DoScaledAnimationAsync("SitDownStart", 0.5f);
Dancer2.DoScaledAnimationAsync("SitDownStart", 0.5f);
Dancer3.DoScaledAnimationAsync("SitDownStart", 0.5f);
if (grampsSits) Gramps.DoScaledAnimationAsync("GrampsSitDownStart", 0.5f);
}),
new BeatAction.Action(beat + 1f, delegate { Dancer1.DoScaledAnimationAsync("SitDownDo", 0.5f);}),
new BeatAction.Action(beat + 1f, delegate { Dancer2.DoScaledAnimationAsync("SitDownDo", 0.5f);}),
new BeatAction.Action(beat + 1f, delegate
{
{
Dancer1.DoScaledAnimationAsync("SitDownDo", 0.5f);
Dancer2.DoScaledAnimationAsync("SitDownDo", 0.5f);
Dancer3.DoScaledAnimationAsync("SitDownDo", 0.5f);
if (grampsSits) Gramps.DoScaledAnimationAsync("GrampsSitDownDo", 0.5f);
}),
@ -500,11 +502,8 @@ namespace HeavenStudio.Games
}
public void DoPunch(double beat, int whoSpeaks, bool grampsPunches)
public static void PunchSfx(double beat, int whoSpeaks)
{
canBop = false;
if (grampsPunches) grampsCanBop = false;
ScheduleInput(beat, 1.5f, InputType.STANDARD_DOWN, JustPunch, PunchMiss, Empty);
List<MultiSound.Sound> soundsToPlay = new List<MultiSound.Sound>()
{
new MultiSound.Sound("spaceDance/voicelessPunch", beat),
@ -548,40 +547,51 @@ namespace HeavenStudio.Games
}
MultiSound.Play(soundsToPlay.ToArray());
}
public void DoPunch(double beat, bool grampsPunches)
{
canBop = false;
if (grampsPunches) grampsCanBop = false;
ScheduleInput(beat, 1.5f, InputType.STANDARD_DOWN, JustPunch, PunchMiss, Empty);
BeatAction.New(Player, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { DancerP.DoScaledAnimationAsync("PunchStartInner", 0.5f);}),
new BeatAction.Action(beat, delegate { Dancer1.DoScaledAnimationAsync("PunchStartInner", 0.5f);}),
new BeatAction.Action(beat, delegate { Dancer2.DoScaledAnimationAsync("PunchStartInner", 0.5f);}),
new BeatAction.Action(beat, delegate
{
new BeatAction.Action(beat, delegate
{
DancerP.DoScaledAnimationAsync("PunchStartInner", 0.5f);
Dancer1.DoScaledAnimationAsync("PunchStartInner", 0.5f);
Dancer2.DoScaledAnimationAsync("PunchStartInner", 0.5f);
Dancer3.DoScaledAnimationAsync("PunchStartInner", 0.5f);
if (grampsPunches) Gramps.DoScaledAnimationAsync("GrampsPunchStartOdd", 0.5f);
}),
new BeatAction.Action(beat + 0.5f, delegate { DancerP.DoScaledAnimationAsync("PunchStartOuter", 0.5f);}),
new BeatAction.Action(beat + 0.5f, delegate { Dancer1.DoScaledAnimationAsync("PunchStartOuter", 0.5f);}),
new BeatAction.Action(beat + 0.5f, delegate { Dancer2.DoScaledAnimationAsync("PunchStartOuter", 0.5f);}),
new BeatAction.Action(beat + 0.5f, delegate
{
new BeatAction.Action(beat + 0.5f, delegate
{
DancerP.DoScaledAnimationAsync("PunchStartOuter", 0.5f);
Dancer1.DoScaledAnimationAsync("PunchStartOuter", 0.5f);
Dancer2.DoScaledAnimationAsync("PunchStartOuter", 0.5f);
Dancer3.DoScaledAnimationAsync("PunchStartOuter", 0.5f);
if (grampsPunches) Gramps.DoScaledAnimationAsync("GrampsPunchStartEven", 0.5f);
}),
new BeatAction.Action(beat + 1f, delegate { DancerP.DoScaledAnimationAsync("PunchStartInner", 0.5f);}),
new BeatAction.Action(beat + 1f, delegate { Dancer1.DoScaledAnimationAsync("PunchStartInner", 0.5f);}),
new BeatAction.Action(beat + 1f, delegate { Dancer2.DoScaledAnimationAsync("PunchStartInner", 0.5f);}),
new BeatAction.Action(beat + 1f, delegate
{
new BeatAction.Action(beat + 1f, delegate
{
DancerP.DoScaledAnimationAsync("PunchStartInner", 0.5f);
Dancer1.DoScaledAnimationAsync("PunchStartInner", 0.5f);
Dancer2.DoScaledAnimationAsync("PunchStartInner", 0.5f);
Dancer3.DoScaledAnimationAsync("PunchStartInner", 0.5f);
if (grampsPunches) Gramps.DoScaledAnimationAsync("GrampsPunchStartOdd", 0.5f);
}),
new BeatAction.Action(beat + 1.5f, delegate { Dancer1.DoScaledAnimationAsync("PunchDo", 0.5f);}),
new BeatAction.Action(beat + 1.5f, delegate { Dancer2.DoScaledAnimationAsync("PunchDo", 0.5f);}),
new BeatAction.Action(beat + 1.5f, delegate
{
new BeatAction.Action(beat + 1.5f, delegate
{
Dancer1.DoScaledAnimationAsync("PunchDo", 0.5f);
Dancer2.DoScaledAnimationAsync("PunchDo", 0.5f);
Dancer3.DoScaledAnimationAsync("PunchDo", 0.5f);
if (grampsPunches) Gramps.DoScaledAnimationAsync("GrampsPunchDo", 0.5f);
}),
new BeatAction.Action(beat + 2.5, delegate
{
canBop = true; grampsCanBop = true;
})
});
}