Skip to content

Commit

Permalink
change how limited loop is set to be active
Browse files Browse the repository at this point in the history
  • Loading branch information
flustix committed Nov 2, 2024
1 parent 65a7491 commit 1d015d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fluXis.Game/Audio/GlobalClock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private void onMapChange(ValueChangedEvent<RealmMap> e)
public void LoadMap(RealmMap info)
{
// reset stuff
AllowLimitedLoop = true;
AllowLimitedLoop = false;
mapInfo = null;

ChangeSource(info.GetTrack() ?? tracks.GetVirtual());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ private void onMapChange(APIMap map)

clock.VolumeOut(); // because it sets itself to 1
clock.RestartPoint = 0;
clock.AllowLimitedLoop = false;
backgrounds.AddBackgroundFromMap(localMap);
startClockMusic();
}
Expand Down Expand Up @@ -382,7 +381,6 @@ public override void OnEntering(ScreenTransitionEvent e)

clock.VolumeOut(); // because it sets itself to 1
clock.RestartPoint = 0;
clock.AllowLimitedLoop = false;
backgrounds.AddBackgroundFromMap(mapInfo);
startClockMusic();
}
Expand Down
3 changes: 3 additions & 0 deletions fluXis.Game/Screens/Select/SelectScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ private void selectMap(RealmMap map)
menuScroll.Play();
backgrounds.AddBackgroundFromMap(map);
lightController.FadeColour(FluXisColors.GetKeyColor(map.KeyCount), 400);
clock.AllowLimitedLoop = true;

var item = Items.FirstOrDefault(i => i.Matches(map));

Expand Down Expand Up @@ -691,6 +692,7 @@ public override bool OnExiting(ScreenExitEvent e)

private void playEnterAnimation()
{
clock.AllowLimitedLoop = true;
this.FadeOut();

using (BeginDelayedSequence(ENTER_DELAY))
Expand All @@ -711,6 +713,7 @@ private void playEnterAnimation()

private void playExitAnimation()
{
clock.AllowLimitedLoop = false;
this.FadeOut(FADE_DURATION);

MapList.MoveToX(-100, MOVE_DURATION, Easing.OutQuint);
Expand Down

0 comments on commit 1d015d7

Please sign in to comment.