Fixed Working Dough Swing (#948)

Working Dough was overlooked when swing was being added, this should fix it
This commit is contained in:
wookywok 2024-05-19 16:14:29 -05:00 committed by GitHub
parent 245f22d7ef
commit b630a90b8d
4 changed files with 10 additions and 8 deletions

View file

@ -15,7 +15,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
public void Init(double beat, bool hasGandw) public void Init(double beat, bool hasGandw)
{ {
startBeat = beat; startBeat = Conductor.instance.GetUnSwungBeat(beat);
path = WorkingDough.instance.GetPath("BGBall"); path = WorkingDough.instance.GetPath("BGBall");
if (gandw != null) gandw.SetActive(hasGandw); if (gandw != null) gandw.SetActive(hasGandw);
Update(); Update();
@ -27,7 +27,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
if (cond.isPlaying && !cond.isPaused) if (cond.isPlaying && !cond.isPaused)
{ {
double beat = cond.songPositionInBeats; double beat = cond.unswungSongPositionInBeats;
if (startBeat != double.MinValue) if (startBeat != double.MinValue)
{ {
Vector3 pos = GetPathPositionFromBeat(path, Math.Max(startBeat, beat), startBeat); Vector3 pos = GetPathPositionFromBeat(path, Math.Max(startBeat, beat), startBeat);

View file

@ -15,7 +15,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
public void Init(double beat, bool hasGandw) public void Init(double beat, bool hasGandw)
{ {
startBeat = beat; startBeat = Conductor.instance.GetUnSwungBeat(beat);
path = WorkingDough.instance.GetPath("NPCBall"); path = WorkingDough.instance.GetPath("NPCBall");
if (gandw != null) gandw.SetActive(hasGandw); if (gandw != null) gandw.SetActive(hasGandw);
Update(); Update();
@ -27,7 +27,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
if (cond.isPlaying && !cond.isPaused) if (cond.isPlaying && !cond.isPaused)
{ {
double beat = cond.songPositionInBeats; double beat = cond.unswungSongPositionInBeats;
if (startBeat > double.MinValue) if (startBeat > double.MinValue)
{ {
Vector3 pos = GetPathPositionFromBeat(path, Math.Max(beat, startBeat), startBeat); Vector3 pos = GetPathPositionFromBeat(path, Math.Max(beat, startBeat), startBeat);

View file

@ -47,7 +47,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
public void Init(double beat, bool isBig, bool hasGandw) public void Init(double beat, bool isBig, bool hasGandw)
{ {
startBeat = beat; startBeat = Conductor.instance.GetUnSwungBeat(beat);
big = isBig; big = isBig;
canJust = true; canJust = true;
canWrong = true; canWrong = true;
@ -75,7 +75,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
if (startBeat > double.MinValue) if (startBeat > double.MinValue)
{ {
Vector3 pos = new Vector3(); Vector3 pos = new Vector3();
double beat = cond.songPositionInBeats; double beat = cond.unswungSongPositionInBeats;
switch (currentState) switch (currentState)
{ {
case State.None: case State.None:
@ -137,7 +137,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
wrongInput.CleanUp(); wrongInput.CleanUp();
} }
if (currentState is State.Hit or State.Barely or State.Weak) return; if (currentState is State.Hit or State.Barely or State.Weak) return;
double beat = Conductor.instance.songPositionInBeatsAsDouble; double beat = Conductor.instance.unswungSongPositionInBeatsAsDouble;
startBeat = beat; startBeat = beat;
game.playerImpact.SetActive(true); game.playerImpact.SetActive(true);
BeatAction.New(game, new List<BeatAction.Action>() BeatAction.New(game, new List<BeatAction.Action>()
@ -195,7 +195,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
rightInput.CleanUp(); rightInput.CleanUp();
} }
if (currentState is State.Hit or State.Barely or State.Weak) return; if (currentState is State.Hit or State.Barely or State.Weak) return;
double beat = Conductor.instance.songPositionInBeats; double beat = Conductor.instance.unswungSongPositionInBeats;
game.playerImpact.SetActive(true); game.playerImpact.SetActive(true);
BeatAction.New(game, new List<BeatAction.Action>() BeatAction.New(game, new List<BeatAction.Action>()
{ {

View file

@ -403,5 +403,7 @@ MonoBehaviour:
- Assets/Scripts/Games/LaunchParty/LaunchPartyRocket.cs - Assets/Scripts/Games/LaunchParty/LaunchPartyRocket.cs
- Assets/Scripts/Util/BeatAction.cs - Assets/Scripts/Util/BeatAction.cs
- Assets/Scripts/Games/FanClub/NtrIdolAri.cs - Assets/Scripts/Games/FanClub/NtrIdolAri.cs
- Assets/Scripts/Games/WorkingDough/NPCDoughBall.cs
- Assets/Scripts/Games/WorkingDough/BGBall.cs
PathsToSkipImportEvent: [] PathsToSkipImportEvent: []
PathsToIgnoreOverwriteSettingOnAttribute: [] PathsToIgnoreOverwriteSettingOnAttribute: []