技能主要更新,修复卡顿并加入动画,以及各种其他更新。

This commit is contained in:
FloatGaming
2026-02-07 21:05:17 +08:00
parent abeca51be5
commit 1ac3cd0104
1349 changed files with 1526749 additions and 24850 deletions
@@ -2,14 +2,14 @@ using UnityEngine;
public class Notes : MonoBehaviour
{
public int trackIndex; // 轨道索引
public float hitTime; // 该音符应该被击中的时间
private bool canBeJudged = false; // 是否进入判定区域
private bool isHit = false; // 是否已被击中
public int trackIndex; //
public float hitTime; // Ӧñеʱ
private bool canBeJudged = false; // Ƿж
private bool isHit = false; // Ƿѱ
private void Update()
{
// 只有进入判定区后,才允许自动miss
// ֻнж󣬲Զmiss
if (canBeJudged && !isHit && Time.timeSinceLevelLoad > hitTime + 0.3f)
{
JudgeMiss();
@@ -34,7 +34,7 @@ public class Notes : MonoBehaviour
public void JudgeNote()
{
if (!canBeJudged || isHit) return; // 仅在进入判定区后才能被判定
if (!canBeJudged || isHit) return; // ڽжܱж
float currentTime = Time.timeSinceLevelLoad;
float timeDifference = Mathf.Abs(currentTime - hitTime);
@@ -59,10 +59,10 @@ public class Notes : MonoBehaviour
private void Recycle()
{
// 如果存在 NotePool,优先归还池,否则销毁物体
// NotePoolȹ黹أ
if (NotePool.Instance != null)
{
NotePool.Instance.ReturnNote(gameObject, "red"); // color 未保存时默认 red,建议上层调用时传入
NotePool.Instance.ReturnNote(gameObject, "red"); // color δʱĬ redϲʱ
}
else
{