Skip to content

Commit

Permalink
Gameplay: Change scenecontorl services update order
Browse files Browse the repository at this point in the history
  • Loading branch information
0thElement committed Jul 27, 2024
1 parent 938ba93 commit 0871d9a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
1 change: 0 additions & 1 deletion Assets/Scripts/Gameplay/Chart/NoteGroup/NoteGroup.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using ArcCreate.Gameplay.Data;
using UnityEngine;

namespace ArcCreate.Gameplay.Chart
{
Expand Down
9 changes: 6 additions & 3 deletions Assets/Scripts/Gameplay/GameplayManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,15 @@ private void Update()

Services.Chart.UpdateChartJudgement(currentTiming);
Services.Judgement.ProcessInput(currentTiming);
Services.Chart.UpdateChartRender(currentTiming);
Services.Score.UpdateDisplay(currentTiming);
Services.Camera.UpdateCamera(currentTiming);

Services.Score.UpdateScore(currentTiming);
Services.Scenecontrol.UpdateScenecontrol(currentTiming);
Services.Camera.UpdateCamera(currentTiming);
Services.Chart.UpdateChartRender(currentTiming);
Services.Score.UpdateDisplay();
Services.Hitsound.UpdateHitsoundHistory(currentTiming);
Services.Render.UpdateRenderers();

gameplayData.NotifyUpdate(currentTiming);
}
}
Expand Down
7 changes: 6 additions & 1 deletion Assets/Scripts/Gameplay/Score/IScoreService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ public interface IScoreService
/// <summary>
/// Update the score display.
/// </summary>
void UpdateDisplay();

/// <summary>
/// Update the score calculation.
/// </summary>
/// <param name="currentTiming">The current chart timing.</param>
void UpdateDisplay(int currentTiming);
void UpdateScore(int currentTiming);

PlayResult GetPlayResult();
}
Expand Down
6 changes: 5 additions & 1 deletion Assets/Scripts/Gameplay/Score/ScoreService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void ProcessJudgement(JudgementResult result, Option<int> offset)
}
}

public void UpdateDisplay(int currentTiming)
public void UpdateScore(int currentTiming)
{
comboRedmix = comboRedmix - (Time.deltaTime / Values.ComboLostFlashDuration);
comboRedmix = Mathf.Max(comboRedmix, 0);
Expand Down Expand Up @@ -152,6 +152,10 @@ public void UpdateDisplay(int currentTiming)
}
}

}

public void UpdateDisplay()
{
SetScore(CurrentScoreTotal, CurrentCountTotal);
}

Expand Down

0 comments on commit 0871d9a

Please sign in to comment.