gameplay所有基本功能都装了,加入了全局警告。加入飘字等各种东西。

This commit is contained in:
FloatGaming
2026-02-21 00:20:03 +08:00
parent 9f7c1c57b7
commit 14fb281d6f
254 changed files with 102927 additions and 9427 deletions
+10 -2
View File
@@ -363,7 +363,7 @@ public class ScoreManager : MonoBehaviour
/// Add a per-note pm score delta to the specified track (0..4) and update named fields + aggregate.
/// Also calculates idol score as pmDelta * scoreEfficiency.
/// </summary>
public void AddPmScoreForTrack(int trackIndex, int pmDelta, float scoreEfficiency)
public void AddPmScoreForTrack(int trackIndex, int pmDelta, float scoreEfficiency, bool isSkillRelated = false)
{
TryHookPerfectBonusEvent();
if (trackIndex < 0 || trackIndex >= pmScoreSums.Length) return;
@@ -373,11 +373,19 @@ public class ScoreManager : MonoBehaviour
if (pmScoreSums[trackIndex] < 0) pmScoreSums[trackIndex] = 0;
if (pmScoreSums[trackIndex] > int.MaxValue - 1) pmScoreSums[trackIndex] = int.MaxValue - 1;
// calculate idol score: pmDelta * scoreEfficiency
int idolBefore = idolScoreSums[trackIndex];
int idolDelta = Mathf.FloorToInt(pmDelta * scoreEfficiency);
idolScoreSums[trackIndex] += idolDelta;
if (idolScoreSums[trackIndex] < 0) idolScoreSums[trackIndex] = 0;
if (idolScoreSums[trackIndex] > int.MaxValue - 1) idolScoreSums[trackIndex] = int.MaxValue - 1;
int idolActualDelta = idolScoreSums[trackIndex] - idolBefore;
// Only spawn popup if it is skill-related
if (isSkillRelated && idolActualDelta != 0)
{
var type = idolActualDelta > 0 ? iNumberPrefabController.InstantNumberType.IscorePlus : iNumberPrefabController.InstantNumberType.IscoreMinus;
iNumberPrefabController.SpawnForAllyStatic(trackIndex, type, idolActualDelta);
}
// update named fields for easy access
red_pmScore_sum = pmScoreSums[0];