This commit is contained in:
SoulliesOfficial
2025-07-26 04:20:25 -04:00
parent bae0bfbc20
commit abf81ece7b
196 changed files with 3909 additions and 964 deletions

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using Dreamteck.Splines;
using Sirenix.OdinInspector;
using TMPro;
using UniRx;
using UnityEngine;
using UnityEngine.Serialization;
@@ -39,6 +40,8 @@ namespace Ichni.RhythmGame
public bool isFinalJudged;
public override int HierarchyPriority => -10;
[Title("Debug")] public TMP_Text judgeRankHint;
/// <summary>
/// 在MovableTrack上更新Note的位置注意HoldNote需要重写这个方法
/// </summary>
@@ -86,6 +89,8 @@ namespace Ichni.RhythmGame
gameObject.SetActive(false);
GameManager.instance.noteManager.RegisterNote(this, exactJudgeTime - beyondTime - 0.5f);
}
//judgeRankHint = Instantiate(GameManager.instance.basePrefabs.judgeRankHint, noteVisual.transform).GetComponent<TMP_Text>();
}
protected virtual void Update()
@@ -108,6 +113,10 @@ namespace Ichni.RhythmGame
noteScreenPosition = GameManager.instance.cameraManager.gameCamera.gameCamera.WorldToScreenPoint(noteVisual.transform.position);
}
SetJudgeArea();
//SetJudgeRankText();
foreach (EffectBase e in noteVisual.effectSubmodule.effectCollection["Generate"])
{
e.UpdateEffect(exactJudgeTime);
@@ -191,6 +200,12 @@ namespace Ichni.RhythmGame
}).AddTo(gameObject);
if (isOnTrack) track.childElementList.Remove(this);
foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge))
{
unit.SetShowingJudge(false);
}
Destroy(gameObject, 1.2f); //注意所有特效时间不得超过1.2秒
}
@@ -207,6 +222,12 @@ namespace Ichni.RhythmGame
}).AddTo(gameObject);
if (isOnTrack) track.childElementList.Remove(this);
foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge))
{
unit.SetShowingJudge(false);
}
Destroy(gameObject, 1.2f);
}
public virtual void Bad(float triggerTime){
@@ -222,6 +243,12 @@ namespace Ichni.RhythmGame
}).AddTo(gameObject);
if (isOnTrack) track.childElementList.Remove(this);
foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge))
{
unit.SetShowingJudge(false);
}
Destroy(gameObject, 1.2f);
}}
@@ -237,17 +264,23 @@ namespace Ichni.RhythmGame
}).AddTo(gameObject);
if (isOnTrack) track.childElementList.Remove(this);
foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge))
{
unit.SetShowingJudge(false);
}
Destroy(gameObject, 1.2f);
}
}
public abstract partial class NoteBase
{
protected void SetJudgeArea()
protected virtual void SetJudgeArea()
{
if (noteJudgeSubmodule != null)
{
if (GameManager.instance.songTime > exactJudgeTime - 0.25f && !isFirstJudged)
if (GameManager.instance.songTime > exactJudgeTime - 0.1f && !isFirstJudged)
{
foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => !unit.isShowingJudge))
{
@@ -260,7 +293,7 @@ namespace Ichni.RhythmGame
unit.UpdateJudge();
}
if (GameManager.instance.songTime > exactJudgeTime + 0.25f)
if (GameManager.instance.songTime > exactJudgeTime + 0.1f)
{
foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge))
{
@@ -274,6 +307,34 @@ namespace Ichni.RhythmGame
{
return exactJudgeTime.CompareTo(other.exactJudgeTime);
}
private void SetJudgeRankText()
{
float triggerTime = GameManager.instance.songTime;
float timeDifference = triggerTime - exactJudgeTime;
NoteJudgeType startJudgeType = GetStartJudgeType(timeDifference);
if (startJudgeType == NoteJudgeType.Perfect)
{
judgeRankHint.text = "PERFECT";
judgeRankHint.color = Color.cyan;
}
else if (startJudgeType == NoteJudgeType.Good)
{
judgeRankHint.text = "GOOD";
judgeRankHint.color = Color.green;
}
else if (startJudgeType == NoteJudgeType.Bad)
{
judgeRankHint.text = "BAD";
judgeRankHint.color = Color.magenta;
}
else if (startJudgeType == NoteJudgeType.Miss)
{
judgeRankHint.text = "MISS";
judgeRankHint.color = Color.white;
}
}
}
public abstract partial class NoteBase