@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 459a7ea4ef65c664482b6377848ac5c3
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -520,15 +520,15 @@ namespace Dreamteck.Splines
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void FixedUpdate()
|
private void FixedUpdate()
|
||||||
// {
|
{
|
||||||
// if (updateMethod == UpdateMethod.FixedUpdate)
|
if (updateMethod == UpdateMethod.FixedUpdate)
|
||||||
// {
|
{
|
||||||
// Run();
|
Run();
|
||||||
// RunUpdate();
|
RunUpdate();
|
||||||
// LateRun();
|
LateRun();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
//Update logic for handling threads and rebuilding
|
//Update logic for handling threads and rebuilding
|
||||||
private void RunUpdate()
|
private void RunUpdate()
|
||||||
|
|||||||
32762
Assets/FR2_Cache.asset
32762
Assets/FR2_Cache.asset
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 6dbdd314784e80440b48088e6357c1ef
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -14,7 +14,7 @@ namespace Ichni.RhythmGame
|
|||||||
{
|
{
|
||||||
public partial class Hold : NoteBase
|
public partial class Hold : NoteBase
|
||||||
{
|
{
|
||||||
//public static List<Hold> holdingHoldList = new();
|
public static List<Hold> holdingHoldList = new();
|
||||||
|
|
||||||
public float holdEndTime;
|
public float holdEndTime;
|
||||||
public float holdingTime;
|
public float holdingTime;
|
||||||
@@ -65,6 +65,7 @@ namespace Ichni.RhythmGame
|
|||||||
{
|
{
|
||||||
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(hold, GetNoteTypeName(hold) + "_Prefab");
|
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(hold, GetNoteTypeName(hold) + "_Prefab");
|
||||||
}
|
}
|
||||||
|
|
||||||
return hold;
|
return hold;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -156,24 +157,17 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
public partial class Hold
|
public partial class Hold
|
||||||
{
|
{
|
||||||
// 添加类级别缓存
|
protected override void Update()
|
||||||
private static HashSet<Hold> holdingHoldSet = new HashSet<Hold>(); // 替换List为HashSet
|
|
||||||
public override void UpdateNote()
|
|
||||||
{
|
{
|
||||||
if (Keyboard.current.hKey.wasPressedThisFrame)
|
if (Keyboard.current.hKey.wasPressedThisFrame)
|
||||||
{
|
{
|
||||||
// 优化:避免字典枚举和Lambda
|
foreach (KeyValuePair<string, List<EffectBase>> effect in noteVisual.effectSubmodule.effectCollection)
|
||||||
var effectCollection = noteVisual.effectSubmodule.effectCollection;
|
|
||||||
foreach (var pair in effectCollection)
|
|
||||||
{
|
{
|
||||||
var effects = pair.Value;
|
effect.Value.ForEach(x => x.Disrupt());
|
||||||
for (int i = 0; i < effects.Count; i++)
|
|
||||||
{
|
|
||||||
effects[i].Disrupt();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (holdEndTime < exactJudgeTime)
|
if (holdEndTime < exactJudgeTime)
|
||||||
{
|
{
|
||||||
LogWindow.Log("Hold end time is earlier than exact judge time.", Color.red);
|
LogWindow.Log("Hold end time is earlier than exact judge time.", Color.red);
|
||||||
@@ -198,6 +192,7 @@ namespace Ichni.RhythmGame
|
|||||||
{
|
{
|
||||||
isHolding = false;
|
isHolding = false;
|
||||||
isFinalJudged = true;
|
isFinalJudged = true;
|
||||||
|
//noteAudioSubmodule?.PlayNoteJudgeAudios(EditorManager.instance.currentJudgeType);//有待商榷
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,74 +206,56 @@ namespace Ichni.RhythmGame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 优化:避免LINQ查询
|
|
||||||
if (noteJudgeSubmodule != null && !EditorManager.instance.cameraManager.isSceneCameraActive)
|
if (noteJudgeSubmodule != null && !EditorManager.instance.cameraManager.isSceneCameraActive)
|
||||||
{
|
{
|
||||||
var judgeUnits = noteJudgeSubmodule.judgeUnitList;
|
foreach (NoteJudgeUnit unit in noteJudgeSubmodule.judgeUnitList.Where(unit => unit.isShowingJudge))
|
||||||
for (int i = 0; i < judgeUnits.Count; i++)
|
|
||||||
{
|
{
|
||||||
var unit = judgeUnits[i];
|
unit.UpdateJudge();
|
||||||
if (unit.isShowingJudge)
|
|
||||||
{
|
|
||||||
unit.UpdateJudge();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (noteVisual != null)
|
if (noteVisual != null)
|
||||||
{
|
{
|
||||||
// 优化:缓存常用引用,避免重复字典查找
|
noteVisual.effectSubmodule.effectCollection["Generate"].ForEach(e => e.UpdateEffect(exactJudgeTime));
|
||||||
var effectSubmodule = noteVisual.effectSubmodule;
|
noteVisual.effectSubmodule.effectCollection["StartHold"].ForEach(e => e.UpdateEffect(exactJudgeTime));
|
||||||
var effectColl = effectSubmodule.effectCollection;
|
noteVisual.effectSubmodule.effectCollection["Holding"].ForEach(e => e.UpdateEffect(exactJudgeTime));
|
||||||
|
|
||||||
// 优化:手动遍历避免Lambda
|
|
||||||
UpdateEffectList(effectColl["Generate"], exactJudgeTime);
|
|
||||||
UpdateEffectList(effectColl["StartHold"], exactJudgeTime);
|
|
||||||
UpdateEffectList(effectColl["Holding"], exactJudgeTime);
|
|
||||||
UpdateEffectList(effectColl["GeneralJudge"], holdEndTime);
|
|
||||||
UpdateEffectList(effectColl["AfterJudge"], holdEndTime);
|
|
||||||
|
|
||||||
// 优化switch语句
|
noteVisual.effectSubmodule.effectCollection["GeneralJudge"].ForEach(e => e.UpdateEffect(holdEndTime));
|
||||||
var judgeType = EditorManager.instance.currentJudgeType;
|
switch (EditorManager.instance.currentJudgeType)
|
||||||
switch (judgeType)
|
|
||||||
{
|
{
|
||||||
case NoteJudgeType.Perfect:
|
case NoteJudgeType.Perfect:
|
||||||
UpdateEffectList(effectColl["Perfect"], holdEndTime);
|
noteVisual.effectSubmodule.effectCollection["Perfect"].ForEach(e => e.UpdateEffect(holdEndTime));
|
||||||
break;
|
break;
|
||||||
case NoteJudgeType.Good:
|
case NoteJudgeType.Good:
|
||||||
UpdateEffectList(effectColl["Good"], holdEndTime);
|
noteVisual.effectSubmodule.effectCollection["Good"].ForEach(e => e.UpdateEffect(holdEndTime));
|
||||||
break;
|
break;
|
||||||
case NoteJudgeType.Bad:
|
case NoteJudgeType.Bad:
|
||||||
UpdateEffectList(effectColl["Bad"], holdEndTime);
|
noteVisual.effectSubmodule.effectCollection["Bad"].ForEach(e => e.UpdateEffect(holdEndTime));
|
||||||
break;
|
break;
|
||||||
case NoteJudgeType.Miss:
|
case NoteJudgeType.Miss:
|
||||||
UpdateEffectList(effectColl["Miss"], holdEndTime);
|
noteVisual.effectSubmodule.effectCollection["Miss"].ForEach(e => e.UpdateEffect(holdEndTime));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
noteVisual.effectSubmodule.effectCollection["AfterJudge"].ForEach(e => e.UpdateEffect(holdEndTime));
|
||||||
|
|
||||||
if (EditorManager.instance.cameraManager.haveGameCamera)
|
if (EditorManager.instance.cameraManager.haveGameCamera)
|
||||||
{
|
{
|
||||||
noteScreenPosition = EditorManager.instance.cameraManager.gameCamera.gameCamera.WorldToScreenPoint(noteVisual.noteVisualPosition);
|
noteScreenPosition = EditorManager.instance.cameraManager.gameCamera.gameCamera.WorldToScreenPoint(noteVisual.noteVisualPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 优化:使用HashSet避免Contains的GC
|
// 优化持有列表的添加和移除
|
||||||
if (isHolding)
|
if (isHolding)
|
||||||
{
|
{
|
||||||
holdingHoldSet.Add(this);
|
if (!holdingHoldList.Contains(this))
|
||||||
|
holdingHoldList.Add(this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
holdingHoldSet.Remove(this);
|
if (holdingHoldList.Contains(this))
|
||||||
}
|
holdingHoldList.Remove(this);
|
||||||
}
|
|
||||||
|
|
||||||
// 辅助方法:避免Lambda产生的GC
|
|
||||||
private void UpdateEffectList(List<EffectBase> effects, float time)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < effects.Count; i++)
|
|
||||||
{
|
|
||||||
effects[i].UpdateEffect(time);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
[Title("NoteVisual")]
|
[Title("NoteVisual")]
|
||||||
public NoteVisualBase noteVisual;
|
public NoteVisualBase noteVisual;
|
||||||
public float NoteAppearTime => noteVisual ? noteVisual.NoteAppearTime : -1;
|
|
||||||
|
|
||||||
[Title("Submodules")]
|
[Title("Submodules")]
|
||||||
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
||||||
@@ -34,22 +33,9 @@ namespace Ichni.RhythmGame
|
|||||||
[FormerlySerializedAs("isJudged")] public bool isFirstJudged;
|
[FormerlySerializedAs("isJudged")] public bool isFirstJudged;
|
||||||
public override int HierarchyPriority => -10;
|
public override int HierarchyPriority => -10;
|
||||||
|
|
||||||
|
|
||||||
public override void Initialize(string name, Guid elementGuid, List<string> tags, bool isFirstGenerated, GameElement parentElement)
|
|
||||||
{
|
|
||||||
base.Initialize(name, elementGuid, tags, isFirstGenerated, parentElement);
|
|
||||||
NoteManager.instance.AddNote(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
public override void AfterInitialize()
|
|
||||||
{
|
|
||||||
base.AfterInitialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 在MovableTrack上更新Note的位置,注意HoldNote需要重写这个方法
|
/// 在MovableTrack上更新Note的位置,注意HoldNote需要重写这个方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public virtual void UpdateNoteInMovableTrack()
|
public virtual void UpdateNoteInMovableTrack()
|
||||||
{
|
{
|
||||||
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
|
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
|
||||||
@@ -89,7 +75,7 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
foreach (SampleWindow i in SampleWindow.instances.Where(i => i.gameElement)) i.OnceSpawnNote();
|
foreach (SampleWindow i in SampleWindow.instances.Where(i => i.gameElement)) i.OnceSpawnNote();
|
||||||
}
|
}
|
||||||
public virtual void UpdateNote()
|
protected virtual void Update()
|
||||||
{
|
{
|
||||||
var editor = EditorManager.instance;
|
var editor = EditorManager.instance;
|
||||||
var cameraManager = editor.cameraManager;
|
var cameraManager = editor.cameraManager;
|
||||||
@@ -105,13 +91,13 @@ namespace Ichni.RhythmGame
|
|||||||
if (isFirstJudged && songTime < exactJudgeTime)
|
if (isFirstJudged && songTime < exactJudgeTime)
|
||||||
{
|
{
|
||||||
isFirstJudged = false;
|
isFirstJudged = false;
|
||||||
if (noteVisual != null) noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
|
noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
|
||||||
}
|
}
|
||||||
else if (!isFirstJudged && songTime >= exactJudgeTime)
|
else if (!isFirstJudged && songTime >= exactJudgeTime)
|
||||||
{
|
{
|
||||||
noteAudioSubmodule?.PlayNoteJudgeAudios(editor.currentJudgeType);
|
noteAudioSubmodule?.PlayNoteJudgeAudios(editor.currentJudgeType);
|
||||||
isFirstJudged = true;
|
isFirstJudged = true;
|
||||||
if (noteVisual != null) noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
|
noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判定单元更新
|
// 判定单元更新
|
||||||
@@ -249,11 +235,6 @@ namespace Ichni.RhythmGame
|
|||||||
foreach (SampleWindow i in SampleWindow.instances.Where(i => i.gameElement)) i.OnceSpawnNote();
|
foreach (SampleWindow i in SampleWindow.instances.Where(i => i.gameElement)) i.OnceSpawnNote();
|
||||||
|
|
||||||
}
|
}
|
||||||
NoteManager.instance.RemoveNote(this);
|
|
||||||
if (noteVisual != null)
|
|
||||||
{
|
|
||||||
noteVisual.OnDelete();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int CompareTo(NoteBase other)
|
public int CompareTo(NoteBase other)
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using Ichni.Editor;
|
using Ichni.Editor;
|
||||||
using UniRx;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Serialization;
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
@@ -24,9 +22,6 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
public virtual Vector3 noteVisualPosition => noteMain.transform.position;
|
public virtual Vector3 noteVisualPosition => noteMain.transform.position;
|
||||||
|
|
||||||
public NoteGenerateEffect generateEffect;
|
|
||||||
public float NoteAppearTime => generateEffect is null ? note.exactJudgeTime : note.exactJudgeTime - generateEffect.generateTime;
|
|
||||||
|
|
||||||
public EffectSubmodule effectSubmodule { get; set; }
|
public EffectSubmodule effectSubmodule { get; set; }
|
||||||
public SelectSubmodule selectSubmodule { get; set; }
|
public SelectSubmodule selectSubmodule { get; set; }
|
||||||
|
|
||||||
@@ -39,19 +34,8 @@ namespace Ichni.RhythmGame
|
|||||||
noteVisual.isHighlighted = isHighlighted;
|
noteVisual.isHighlighted = isHighlighted;
|
||||||
noteVisual.SetHighlight();
|
noteVisual.SetHighlight();
|
||||||
noteVisual.SetEditorSubmodules();
|
noteVisual.SetEditorSubmodules();
|
||||||
Observable.NextFrame().Subscribe(_ =>
|
|
||||||
{
|
|
||||||
noteVisual.AfterInitialize();
|
|
||||||
|
|
||||||
});
|
|
||||||
return noteVisual;
|
return noteVisual;
|
||||||
}
|
}
|
||||||
public override void AfterInitialize()
|
|
||||||
{
|
|
||||||
base.AfterInitialize();
|
|
||||||
generateEffect ??= effectSubmodule.effectCollection["Generate"].First(i => i is NoteGenerateEffect) as NoteGenerateEffect;
|
|
||||||
if (generateEffect == null) throw new Exception("NoteVisual必须有一个生成特效。");
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetDefaultSubmodules()
|
public override void SetDefaultSubmodules()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Lean.Pool;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
@@ -18,47 +19,28 @@ namespace Ichni.Editor
|
|||||||
[Tooltip("指定网格所在的平面:0 = XZ (y=0), 1 = XY (z=0), 2 = YZ (x=0)")]
|
[Tooltip("指定网格所在的平面:0 = XZ (y=0), 1 = XY (z=0), 2 = YZ (x=0)")]
|
||||||
public int gridPlane = 0;
|
public int gridPlane = 0;
|
||||||
|
|
||||||
[Tooltip("网格基础缩放值,单位 1")]
|
[Tooltip("网格基础缩放值,单位 1")] public float baseScale = 1f;
|
||||||
public float baseScale = 1f;
|
|
||||||
|
|
||||||
[Tooltip("调整缩放的影响因子,建议值 1~5")]
|
[Tooltip("调整缩放的影响因子,建议值 1~5")] public float scaleMultiplier = 1f;
|
||||||
public float scaleMultiplier = 1f;
|
|
||||||
|
|
||||||
[Tooltip("距离因子,用于计算对数缩放(例如距离大于该值时切换到下一级单位)")]
|
[Tooltip("距离因子,用于计算对数缩放(例如距离大于该值时切换到下一级单位)")]
|
||||||
public float distanceFactor = 10f;
|
public float distanceFactor = 10f;
|
||||||
|
|
||||||
[Tooltip("位置文本更新频率(秒)")]
|
|
||||||
public float textUpdateFrequency = 0.1f;
|
|
||||||
|
|
||||||
[FormerlySerializedAs("showPositionText")]
|
|
||||||
public bool canShowPositionText;
|
|
||||||
|
|
||||||
public bool isShowingPositionText;
|
|
||||||
public Transform textContainer;
|
|
||||||
public GameObject positionTextPrefab;
|
|
||||||
|
|
||||||
// 内部缓存材质
|
// 内部缓存材质
|
||||||
private Material gridMaterial;
|
private Material gridMaterial;
|
||||||
public Dictionary<GameObject, Vector3> positionTexts = new Dictionary<GameObject, Vector3>();
|
|
||||||
|
|
||||||
// 对象池相关
|
|
||||||
private Queue<GameObject> textPool = new Queue<GameObject>();
|
|
||||||
private const int POOL_SIZE = 50;
|
|
||||||
|
|
||||||
// 性能优化缓存
|
|
||||||
private float lastTextUpdateTime = 0f;
|
|
||||||
private Vector3 lastCameraPosition;
|
|
||||||
private float lastGridScale;
|
|
||||||
private Plane gridPlaneCache;
|
|
||||||
private Vector2 screenCenter;
|
|
||||||
|
|
||||||
public float logScale;
|
public float logScale;
|
||||||
public float gridScale; // 1, 4, 16, 64...
|
public float gridScale; // 1, 4, 16, 64...
|
||||||
|
|
||||||
|
[FormerlySerializedAs("showPositionText")] public bool canShowPositionText;
|
||||||
|
public bool isShowingPositionText;
|
||||||
|
public Transform textContainer;
|
||||||
|
public GameObject positionTextPrefab;
|
||||||
|
public Dictionary<GameObject, Vector3> positionTexts;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
positionTexts = new Dictionary<GameObject, Vector3>();
|
||||||
InitializeTextPool();
|
|
||||||
|
|
||||||
sceneCamera = EditorManager.instance.cameraManager.sceneCamera.sceneCamera;
|
sceneCamera = EditorManager.instance.cameraManager.sceneCamera.sceneCamera;
|
||||||
// 实例化材质,避免修改共享材质
|
// 实例化材质,避免修改共享材质
|
||||||
@@ -70,12 +52,6 @@ namespace Ichni.Editor
|
|||||||
float screenWidth = Screen.width;
|
float screenWidth = Screen.width;
|
||||||
float lineWidth = lineWidthOf3840 * (screenWidth / 3840f);
|
float lineWidth = lineWidthOf3840 * (screenWidth / 3840f);
|
||||||
gridMaterial.SetFloat("_LineWidth", lineWidth);
|
gridMaterial.SetFloat("_LineWidth", lineWidth);
|
||||||
|
|
||||||
// 预计算屏幕中心
|
|
||||||
screenCenter = new Vector2(Screen.width / 2f, Screen.height / 2f);
|
|
||||||
|
|
||||||
// 预计算网格平面
|
|
||||||
UpdateGridPlaneCache();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
@@ -108,266 +84,84 @@ namespace Ichni.Editor
|
|||||||
|
|
||||||
if (canShowPositionText && isShowingPositionText)
|
if (canShowPositionText && isShowingPositionText)
|
||||||
{
|
{
|
||||||
// 添加更新频率控制
|
GetPoints();
|
||||||
bool shouldUpdate = Time.time - lastTextUpdateTime >= textUpdateFrequency ||
|
|
||||||
Vector3.Distance(sceneCamera.transform.position, lastCameraPosition) > gridScale * 0.5f ||
|
|
||||||
Mathf.Abs(gridScale - lastGridScale) > 0.1f;
|
|
||||||
|
|
||||||
if (shouldUpdate)
|
foreach (KeyValuePair<GameObject, Vector3> positionText in positionTexts)
|
||||||
{
|
{
|
||||||
GetPoints();
|
positionText.Key.transform.position = positionText.Value + new Vector3(gridScale / 6, 0, gridScale / 12);
|
||||||
lastTextUpdateTime = Time.time;
|
float scaleFactor = gridScale * 1.5f;
|
||||||
lastCameraPosition = sceneCamera.transform.position;
|
positionText.Key.transform.localScale = new Vector3(scaleFactor, scaleFactor, scaleFactor);
|
||||||
lastGridScale = gridScale;
|
Vector3 direction = EditorManager.instance.cameraManager.currentCamera.transform.position - positionText.Key.transform.position;
|
||||||
}
|
positionText.Key.transform.forward = -direction.normalized;
|
||||||
else
|
|
||||||
{
|
|
||||||
// 只更新文本朝向(性能较轻)
|
|
||||||
UpdateTextOrientations();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (isShowingPositionText && !canShowPositionText)
|
|
||||||
{
|
|
||||||
ClearAllTexts();
|
|
||||||
isShowingPositionText = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#region 文本显示优化
|
|
||||||
|
|
||||||
private void InitializeTextPool()
|
|
||||||
{
|
|
||||||
for (int i = 0; i < POOL_SIZE; i++)
|
|
||||||
{
|
|
||||||
GameObject textObj = Instantiate(positionTextPrefab, textContainer);
|
|
||||||
textObj.SetActive(false);
|
|
||||||
textPool.Enqueue(textObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private GameObject GetTextFromPool()
|
|
||||||
{
|
|
||||||
if (textPool.Count > 0)
|
|
||||||
{
|
|
||||||
GameObject textObj = textPool.Dequeue();
|
|
||||||
textObj.SetActive(true);
|
|
||||||
return textObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 如果池子空了,动态创建一个(应该很少发生)
|
|
||||||
GameObject newTextObj = Instantiate(positionTextPrefab, textContainer);
|
|
||||||
return newTextObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ReturnTextToPool(GameObject textObj)
|
|
||||||
{
|
|
||||||
textObj.SetActive(false);
|
|
||||||
textPool.Enqueue(textObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateTextOrientations()
|
|
||||||
{
|
|
||||||
foreach (var textObj in positionTexts.Keys)
|
|
||||||
{
|
|
||||||
if (textObj != null && textObj.activeInHierarchy)
|
|
||||||
{
|
|
||||||
Vector3 direction = sceneCamera.transform.position - textObj.transform.position;
|
|
||||||
textObj.transform.forward = -direction.normalized;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClearAllTexts()
|
|
||||||
{
|
|
||||||
foreach (var textObj in positionTexts.Keys)
|
|
||||||
{
|
|
||||||
if (textObj != null)
|
|
||||||
{
|
|
||||||
ReturnTextToPool(textObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
positionTexts.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 网格点计算优化
|
|
||||||
|
|
||||||
void GetPoints()
|
void GetPoints()
|
||||||
{
|
{
|
||||||
// 使用平面射线检测替代 Physics.Raycast(性能更好)
|
Ray sceneCameraRay = sceneCamera.ScreenPointToRay(new Vector2(Screen.width / 2f, Screen.height / 2f));
|
||||||
Ray sceneCameraRay = sceneCamera.ScreenPointToRay(screenCenter);
|
if (Physics.Raycast(sceneCameraRay, out RaycastHit sceneCameraHit, float.MaxValue, LayerMask.GetMask("Grid")))
|
||||||
|
|
||||||
if (gridPlaneCache.Raycast(sceneCameraRay, out float enter))
|
|
||||||
{
|
{
|
||||||
Vector3 point = sceneCameraRay.GetPoint(enter);
|
if (sceneCameraHit.collider.gameObject == gameObject)
|
||||||
|
|
||||||
// 添加距离检查,太远就不显示文本
|
|
||||||
float distanceToCamera = Vector3.Distance(sceneCamera.transform.position, point);
|
|
||||||
if (distanceToCamera > 50f)
|
|
||||||
{
|
{
|
||||||
ClearAllTexts();
|
Vector3 point = sceneCameraHit.point;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
float radius = gridScale * 16f;
|
float radius = gridScale * 16f;
|
||||||
float step = gridScale * 4f;
|
float step = gridScale * 4f;
|
||||||
|
|
||||||
// 计算可见区域边界
|
float minX = point.x - radius;
|
||||||
Vector2Int minMaxX = CalculateBounds(point.x, radius, step);
|
float maxX = point.x + radius;
|
||||||
Vector2Int minMaxZ = CalculateBounds(point.z, radius, step);
|
float minZ = point.z - radius;
|
||||||
|
float maxZ = point.z + radius;
|
||||||
|
|
||||||
// 使用 HashSet 来跟踪需要显示的位置(避免重复计算)
|
// 对于 X 与 Z 方向,根据网格间距取整,确保从整点开始
|
||||||
HashSet<Vector3> requiredPositions = new HashSet<Vector3>();
|
minX = Mathf.Floor(minX / step) * step;
|
||||||
|
maxX = Mathf.Ceil(maxX / step) * step;
|
||||||
|
minZ = Mathf.Floor(minZ / step) * step;
|
||||||
|
maxZ = Mathf.Ceil(maxZ / step) * step;
|
||||||
|
|
||||||
for (int x = minMaxX.x; x <= minMaxX.y; x++)
|
List<Vector3> newPositions = new List<Vector3>();
|
||||||
{
|
|
||||||
for (int z = minMaxZ.x; z <= minMaxZ.y; z++)
|
// 添加距离检测逻辑
|
||||||
|
bool withinDistance = Vector3.Distance(sceneCamera.transform.position, point) <= 50f;
|
||||||
|
|
||||||
|
for (float x = minX; x <= maxX; x += step)
|
||||||
{
|
{
|
||||||
Vector3 position = new Vector3(x * step, 0, z * step);
|
for (float z = minZ; z <= maxZ; z += step)
|
||||||
requiredPositions.Add(position);
|
{
|
||||||
|
Vector3 position = new Vector3(x, 0, z);
|
||||||
|
|
||||||
|
if (withinDistance && !positionTexts.ContainsValue(position))
|
||||||
|
{
|
||||||
|
GameObject posText = LeanPool.Spawn(positionTextPrefab);
|
||||||
|
posText.transform.position = position + new Vector3(gridScale / 8, 0, gridScale / 16);
|
||||||
|
posText.transform.forward = -transform.up;
|
||||||
|
posText.GetComponent<TMP_Text>().text = $"({Mathf.RoundToInt(position.x)}, {Mathf.RoundToInt(position.z)})";
|
||||||
|
posText.transform.SetParent(textContainer);
|
||||||
|
positionTexts.Add(posText, position);
|
||||||
|
}
|
||||||
|
|
||||||
|
newPositions.Add(new Vector3(x, 0, z));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<GameObject> toRemove = new List<GameObject>();
|
||||||
|
// 清除不在新范围内的Text
|
||||||
|
foreach (KeyValuePair<GameObject, Vector3> positionText in positionTexts)
|
||||||
|
{
|
||||||
|
if (!newPositions.Contains(positionText.Value))
|
||||||
|
{
|
||||||
|
LeanPool.Despawn(positionText.Key);
|
||||||
|
toRemove.Add(positionText.Key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (GameObject text in toRemove)
|
||||||
|
{
|
||||||
|
positionTexts.Remove(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateTextDisplay(requiredPositions);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 辅助方法:计算边界(避免重复的数学运算)
|
|
||||||
private Vector2Int CalculateBounds(float center, float radius, float step)
|
|
||||||
{
|
|
||||||
int min = Mathf.FloorToInt((center - radius) / step);
|
|
||||||
int max = Mathf.CeilToInt((center + radius) / step);
|
|
||||||
return new Vector2Int(min, max);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新网格平面缓存
|
|
||||||
private void UpdateGridPlaneCache()
|
|
||||||
{
|
|
||||||
gridPlaneCache = gridPlane switch
|
|
||||||
{
|
|
||||||
0 => new Plane(Vector3.up, transform.position), // XZ
|
|
||||||
1 => new Plane(Vector3.forward, transform.position), // XY
|
|
||||||
2 => new Plane(Vector3.right, transform.position), // YZ
|
|
||||||
_ => new Plane(Vector3.up, transform.position)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateTextDisplay(HashSet<Vector3> requiredPositions)
|
|
||||||
{
|
|
||||||
// 第一步:移除不再需要的位置文本
|
|
||||||
List<GameObject> toRemove = new List<GameObject>();
|
|
||||||
foreach (var kvp in positionTexts)
|
|
||||||
{
|
|
||||||
if (!requiredPositions.Contains(kvp.Value))
|
|
||||||
{
|
|
||||||
toRemove.Add(kvp.Key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (GameObject textObj in toRemove)
|
|
||||||
{
|
|
||||||
positionTexts.Remove(textObj);
|
|
||||||
ReturnTextToPool(textObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 第二步:添加新位置文本
|
|
||||||
foreach (Vector3 position in requiredPositions)
|
|
||||||
{
|
|
||||||
if (!ContainsPosition(position))
|
|
||||||
{
|
|
||||||
GameObject textObj = GetTextFromPool();
|
|
||||||
SetupTextObject(textObj, position);
|
|
||||||
positionTexts[textObj] = position;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool ContainsPosition(Vector3 position)
|
|
||||||
{
|
|
||||||
foreach (var pos in positionTexts.Values)
|
|
||||||
{
|
|
||||||
if (Vector3.Distance(pos, position) < 0.1f)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetupTextObject(GameObject textObj, Vector3 position)
|
|
||||||
{
|
|
||||||
textObj.transform.position = position + new Vector3(gridScale / 6, 0, gridScale / 12);
|
|
||||||
|
|
||||||
float scaleFactor = gridScale * 1.5f;
|
|
||||||
textObj.transform.localScale = new Vector3(scaleFactor, scaleFactor, scaleFactor);
|
|
||||||
|
|
||||||
// 设置文本内容
|
|
||||||
TMP_Text tmpText = textObj.GetComponent<TMP_Text>();
|
|
||||||
if (tmpText != null)
|
|
||||||
{
|
|
||||||
tmpText.text = $"({Mathf.RoundToInt(position.x)}, {Mathf.RoundToInt(position.z)})";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始朝向
|
|
||||||
Vector3 direction = sceneCamera.transform.position - textObj.transform.position;
|
|
||||||
textObj.transform.forward = -direction.normalized;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 公共方法
|
|
||||||
|
|
||||||
public void ShowPositionText()
|
|
||||||
{
|
|
||||||
canShowPositionText = true;
|
|
||||||
isShowingPositionText = true;
|
|
||||||
lastTextUpdateTime = 0; // 强制下一次更新
|
|
||||||
}
|
|
||||||
|
|
||||||
public void HidePositionText()
|
|
||||||
{
|
|
||||||
canShowPositionText = false;
|
|
||||||
ClearAllTexts();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetGridPlane(int planeIndex)
|
|
||||||
{
|
|
||||||
if (planeIndex >= 0 && planeIndex <= 2)
|
|
||||||
{
|
|
||||||
gridPlane = planeIndex;
|
|
||||||
gridMaterial.SetFloat("_Plane", gridPlane);
|
|
||||||
UpdateGridPlaneCache();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OnDestroy()
|
|
||||||
{
|
|
||||||
// 清理资源
|
|
||||||
if (gridMaterial != null)
|
|
||||||
{
|
|
||||||
if (Application.isEditor)
|
|
||||||
DestroyImmediate(gridMaterial);
|
|
||||||
else
|
|
||||||
Destroy(gridMaterial);
|
|
||||||
}
|
|
||||||
|
|
||||||
ClearAllTexts();
|
|
||||||
|
|
||||||
// 清理对象池
|
|
||||||
foreach (var textObj in textPool)
|
|
||||||
{
|
|
||||||
if (textObj != null)
|
|
||||||
{
|
|
||||||
if (Application.isEditor)
|
|
||||||
DestroyImmediate(textObj);
|
|
||||||
else
|
|
||||||
Destroy(textObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
textPool.Clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,6 @@ namespace Ichni
|
|||||||
public BackgroundController backgroundController;
|
public BackgroundController backgroundController;
|
||||||
public GridController gridController;
|
public GridController gridController;
|
||||||
public CameraManager cameraManager;
|
public CameraManager cameraManager;
|
||||||
public NoteManager noteManager;
|
|
||||||
public Ichni.Editor.PostProcessingManager postProcessingManager;
|
public Ichni.Editor.PostProcessingManager postProcessingManager;
|
||||||
public Canvas judgeHintCanvas;
|
public Canvas judgeHintCanvas;
|
||||||
public Canvas inspectorCanvas;
|
public Canvas inspectorCanvas;
|
||||||
@@ -60,7 +59,7 @@ namespace Ichni
|
|||||||
isLoaded = false;
|
isLoaded = false;
|
||||||
projectManager = new ProjectManager();
|
projectManager = new ProjectManager();
|
||||||
operationManager = new OperationManager();
|
operationManager = new OperationManager();
|
||||||
noteManager = new NoteManager();
|
|
||||||
if (!ES3.FileExists(Application.streamingAssetsPath + "/EditorSettings.es3"))
|
if (!ES3.FileExists(Application.streamingAssetsPath + "/EditorSettings.es3"))
|
||||||
{
|
{
|
||||||
editorSettings = new EditorSettings(300, 3, 100, 100, 60);
|
editorSettings = new EditorSettings(300, 3, 100, 100, 60);
|
||||||
@@ -121,7 +120,6 @@ namespace Ichni
|
|||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (isLoaded) projectManager.autoSaveManager.UpdateAutoSave();
|
if (isLoaded) projectManager.autoSaveManager.UpdateAutoSave();
|
||||||
noteManager.UpdateNote();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadProject(string projectName)
|
public void LoadProject(string projectName)
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ namespace Ichni.Editor
|
|||||||
public partial class InputListener : MonoBehaviour
|
public partial class InputListener : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static InputListener instance;
|
public static InputListener instance;
|
||||||
public bool isPointerOverUI;
|
private PointerEventData pointerEventData;
|
||||||
|
private bool isPointerOverUI;
|
||||||
public TMP_Text hoveredUIText;
|
public TMP_Text hoveredUIText;
|
||||||
//public GameObject hoveredUI;
|
public GameObject hoveredUI;
|
||||||
public EventSystem eventSystem;
|
public EventSystem eventSystem;
|
||||||
public List<GraphicRaycaster> graphicRaycasters;
|
public List<GraphicRaycaster> graphicRaycasters;
|
||||||
private List<SelectionConnector> lastHitConnectors = new List<SelectionConnector>();
|
private List<SelectionConnector> lastHitConnectors = new List<SelectionConnector>();
|
||||||
@@ -46,7 +47,7 @@ namespace Ichni.Editor
|
|||||||
if (currentMousePosition != lastMousePosition || frameCount % uiCheckFrameInterval == 0)
|
if (currentMousePosition != lastMousePosition || frameCount % uiCheckFrameInterval == 0)
|
||||||
{
|
{
|
||||||
lastMousePosition = currentMousePosition;
|
lastMousePosition = currentMousePosition;
|
||||||
isPointerOverUI = IsPointerOverUI();
|
isPointerOverUI = IsPointerOverUI(out hoveredUI);
|
||||||
}
|
}
|
||||||
SceneCameraOperation();
|
SceneCameraOperation();
|
||||||
MusicPlayerOperation();
|
MusicPlayerOperation();
|
||||||
@@ -307,34 +308,68 @@ namespace Ichni.Editor
|
|||||||
{
|
{
|
||||||
private TMP_Text UIText => EditorManager.instance.UIText;
|
private TMP_Text UIText => EditorManager.instance.UIText;
|
||||||
|
|
||||||
// 类级别缓存
|
public bool IsPointerOverUI(out GameObject hoveredUI)
|
||||||
private PointerEventData EventData;
|
|
||||||
private List<RaycastResult> raycastResults = new List<RaycastResult>();
|
|
||||||
|
|
||||||
public bool IsPointerOverUI()
|
|
||||||
{
|
{
|
||||||
|
hoveredUI = null;
|
||||||
|
|
||||||
if (Mouse.current == null) return false;
|
if (Mouse.current == null) return false;
|
||||||
|
|
||||||
if (EventData == null)
|
pointerEventData = new PointerEventData(eventSystem)
|
||||||
{
|
{
|
||||||
EventData = new PointerEventData(eventSystem);
|
position = Mouse.current.position.ReadValue()
|
||||||
}
|
};
|
||||||
EventData.position = Mouse.current.position.ReadValue();
|
|
||||||
|
|
||||||
raycastResults.Clear(); // 复用列表
|
List<RaycastResult> allResults = new List<RaycastResult>();
|
||||||
EventSystem.current.RaycastAll(EventData, raycastResults);
|
|
||||||
|
|
||||||
for (int i = 0; i < raycastResults.Count; i++)
|
// 使用EventSystem的RaycastAll来确保检测所有UI
|
||||||
|
EventSystem.current.RaycastAll(pointerEventData, allResults);
|
||||||
|
|
||||||
|
// 或者手动检测所有GraphicRaycaster
|
||||||
|
foreach (var raycaster in FindObjectsOfType<GraphicRaycaster>())
|
||||||
{
|
{
|
||||||
var result = raycastResults[i];
|
if (!raycaster.enabled || !raycaster.gameObject.activeInHierarchy)
|
||||||
if (result.gameObject != null &&
|
continue;
|
||||||
result.gameObject.activeInHierarchy &&
|
|
||||||
result.gameObject.GetComponent<RectTransform>() != null)
|
List<RaycastResult> results = new List<RaycastResult>();
|
||||||
{
|
raycaster.Raycast(pointerEventData, results);
|
||||||
return true;
|
allResults.AddRange(results);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 移除无效结果
|
||||||
|
allResults.RemoveAll(r =>
|
||||||
|
r.gameObject == null ||
|
||||||
|
!r.gameObject.activeInHierarchy ||
|
||||||
|
!r.gameObject.GetComponent<RectTransform>());
|
||||||
|
|
||||||
|
if (allResults.Count > 0)
|
||||||
|
{
|
||||||
|
// 完整排序
|
||||||
|
// allResults.Sort((a, b) =>
|
||||||
|
// {
|
||||||
|
// // 先按sorting layer
|
||||||
|
// int layerCompare = SortingLayer.GetLayerValueFromID(b.sortingLayer)
|
||||||
|
// .CompareTo(SortingLayer.GetLayerValueFromID(a.sortingLayer));
|
||||||
|
// if (layerCompare != 0) return layerCompare;
|
||||||
|
|
||||||
|
// // 再按sorting order
|
||||||
|
// int orderCompare = b.sortingOrder.CompareTo(a.sortingOrder);
|
||||||
|
// if (orderCompare != 0) return orderCompare;
|
||||||
|
|
||||||
|
// // 最后按depth
|
||||||
|
// return b.depth.CompareTo(a.depth);
|
||||||
|
// });
|
||||||
|
|
||||||
|
// hoveredUI = allResults[0].gameObject;
|
||||||
|
// string text = $"UI: {hoveredUI.name}, Layer: {SortingLayer.IDToName(allResults[0].sortingLayer)}, Order: {allResults[0].sortingOrder}";
|
||||||
|
// if (UIText.text != text)
|
||||||
|
// {
|
||||||
|
// UIText.text = text;
|
||||||
|
// }
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//UIText.text = "No UI";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,162 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Ichni.RhythmGame;
|
|
||||||
using UniRx;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Ichni
|
|
||||||
{
|
|
||||||
public class NoteManager
|
|
||||||
{
|
|
||||||
public static NoteManager instance;
|
|
||||||
public NoteManager()
|
|
||||||
{
|
|
||||||
instance = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<NoteBase> allNotes = new List<NoteBase>();
|
|
||||||
public List<NoteBase> activeNotes = new List<NoteBase>();
|
|
||||||
private List<NoteBase> notesToRemove = new List<NoteBase>();
|
|
||||||
|
|
||||||
public int currentActiveNoteCount => activeNotes.Count;
|
|
||||||
private float lastKnownTime = -1f;
|
|
||||||
|
|
||||||
public void AddNote(NoteBase note)
|
|
||||||
{
|
|
||||||
allNotes.Add(note);
|
|
||||||
// 只在添加时排序一次
|
|
||||||
allNotes.Sort((a, b) => a.NoteAppearTime.CompareTo(b.NoteAppearTime));
|
|
||||||
|
|
||||||
note.UpdateNote(); // 初始化状态
|
|
||||||
Observable.NextFrame().Subscribe(_ =>
|
|
||||||
{
|
|
||||||
note.noteVisual?.generateEffect?.PreExecute();
|
|
||||||
note.noteVisual?.noteMain.SetActive(true);
|
|
||||||
note.UpdateNote(); // 确保在下一帧也更新一次,防止遗漏
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveNote(NoteBase note)
|
|
||||||
{
|
|
||||||
activeNotes.Remove(note);
|
|
||||||
allNotes.Remove(note);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateNote()
|
|
||||||
{
|
|
||||||
if (allNotes.Count == 0) return;
|
|
||||||
|
|
||||||
float currentTime = EditorManager.instance.songInformation.songTime;
|
|
||||||
|
|
||||||
// 检测时间方向
|
|
||||||
bool isTimeMovingForward = currentTime >= lastKnownTime;
|
|
||||||
lastKnownTime = currentTime;
|
|
||||||
|
|
||||||
// 清空待移除列表
|
|
||||||
notesToRemove.Clear();
|
|
||||||
// 处理时间前进的情况 - 添加新音符
|
|
||||||
if (isTimeMovingForward)
|
|
||||||
{
|
|
||||||
// 查找所有应该激活但尚未激活的音符
|
|
||||||
for (int i = 0; i < allNotes.Count; i++)
|
|
||||||
{
|
|
||||||
var note = allNotes[i];
|
|
||||||
|
|
||||||
// 如果音符应该出现但还没激活
|
|
||||||
if (note.NoteAppearTime <= currentTime
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (!activeNotes.Contains(note)) activeNotes.Add(note);
|
|
||||||
}
|
|
||||||
else if (note.exactJudgeTime < currentTime) break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 处理时间倒退的情况 - 调整活跃列表
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 移除在当前时间之后出现的音符
|
|
||||||
for (int i = activeNotes.Count - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
var note = activeNotes[i];
|
|
||||||
if (note.NoteAppearTime > currentTime)
|
|
||||||
{
|
|
||||||
notesToRemove.Add(note);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (int i = 0; i < allNotes.Count; i++)
|
|
||||||
{
|
|
||||||
var note = allNotes[i];
|
|
||||||
|
|
||||||
// 如果音符应该出现但还没激活
|
|
||||||
if (note.isFirstJudged && note.exactJudgeTime > currentTime
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (!activeNotes.Contains(note)) activeNotes.Add(note);
|
|
||||||
}
|
|
||||||
// else if (note.NoteAppearTime < currentTime)
|
|
||||||
// {
|
|
||||||
// break; // 提前退出循环,优化性能
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新所有活跃音符
|
|
||||||
for (int i = 0; i < activeNotes.Count; i++)
|
|
||||||
{
|
|
||||||
var note = activeNotes[i];
|
|
||||||
note.UpdateNote();
|
|
||||||
// Debug.Log($"Updating Note {note.elementName} at time {currentTime}");
|
|
||||||
// 标记已判定的音符等待移除
|
|
||||||
if (note.isFirstJudged)
|
|
||||||
{
|
|
||||||
notesToRemove.Add(note);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 移除标记的音符
|
|
||||||
for (int i = 0; i < notesToRemove.Count; i++)
|
|
||||||
{
|
|
||||||
activeNotes.Remove(notesToRemove[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 重置所有状态(用于歌曲重新开始等)
|
|
||||||
public void ResetAll()
|
|
||||||
{
|
|
||||||
activeNotes.Clear();
|
|
||||||
notesToRemove.Clear();
|
|
||||||
lastKnownTime = -1f;
|
|
||||||
|
|
||||||
// 不重置音符状态,让音符自己的逻辑处理
|
|
||||||
}
|
|
||||||
|
|
||||||
// 跳转到指定时间
|
|
||||||
public void SeekToTime(float targetTime)
|
|
||||||
{
|
|
||||||
// 清空当前活跃列表
|
|
||||||
activeNotes.Clear();
|
|
||||||
notesToRemove.Clear();
|
|
||||||
|
|
||||||
// 添加在目标时间之前应该出现的音符
|
|
||||||
for (int i = 0; i < allNotes.Count; i++)
|
|
||||||
{
|
|
||||||
var note = allNotes[i];
|
|
||||||
|
|
||||||
// 添加在目标时间之前应该出现的音符
|
|
||||||
if (note.NoteAppearTime <= targetTime)
|
|
||||||
{
|
|
||||||
activeNotes.Add(note);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lastKnownTime = targetTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取所有音符(只读)
|
|
||||||
public IReadOnlyList<NoteBase> GetAllNotes()
|
|
||||||
{
|
|
||||||
return allNotes.AsReadOnly();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 6fe401fc051728b49a4e682f518ffc54
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -64,7 +64,7 @@ Material:
|
|||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _Tex:
|
- _Tex:
|
||||||
m_Texture: {fileID: 8900000, guid: 7ba462c2dc80b544eacfdc537aab22c6, type: 3}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _Tex2:
|
- _Tex2:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"Note" : {
|
|
||||||
"__type" : "System.Collections.Generic.List`1[[Ichni.RhythmGame.Beatmap.BaseElement_BM, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]],mscorlib",
|
|
||||||
"value" : [
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.Flick_BM,Assembly-CSharp",
|
|
||||||
"availableFlickDirections" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"exactJudgeTime" : 38.1000023,
|
|
||||||
"elementName" : "Flick (38.1)",
|
|
||||||
"tags" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"elementGuid" : {
|
|
||||||
"value" : "da7a57fa-88a1-454c-8f2b-76d8b20da266"
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "0ae5b3f7-75f7-49c8-8841-7e4dbbb20d35"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
|
|
||||||
"isOverridingDuration" : false,
|
|
||||||
"startTime" : -32767,
|
|
||||||
"endTime" : 32767,
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "da7a57fa-88a1-454c-8f2b-76d8b20da266"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.NoteJudgeSubmodule_BM,Assembly-CSharp",
|
|
||||||
"judgeUnitList" : [
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TouchAreaJudgeUnit_BM,Assembly-CSharp",
|
|
||||||
"areaRadius" : 600
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "da7a57fa-88a1-454c-8f2b-76d8b20da266"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.NoteAudioSubmodule_BM,Assembly-CSharp",
|
|
||||||
"generalJudgeAudioList" : [
|
|
||||||
"DefaultFlick"
|
|
||||||
],
|
|
||||||
"perfectAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"goodAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"badAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"missAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"holdStartAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "da7a57fa-88a1-454c-8f2b-76d8b20da266"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteVisual_BM,Assembly-CSharp",
|
|
||||||
"isHighlighted" : true,
|
|
||||||
"themeBundleName" : "departure_to_multiverse",
|
|
||||||
"objectName" : "DTM_NoteVisualFlick",
|
|
||||||
"elementName" : "New Note Visual",
|
|
||||||
"tags" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"elementGuid" : {
|
|
||||||
"value" : "4507c7f6-cd26-45c3-94ea-fe36d5b05251"
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "da7a57fa-88a1-454c-8f2b-76d8b20da266"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
|
|
||||||
"originalPosition" : {
|
|
||||||
"x" : -6.024219,
|
|
||||||
"y" : 0,
|
|
||||||
"z" : 0
|
|
||||||
},
|
|
||||||
"originalEulerAngles" : {
|
|
||||||
"x" : 0,
|
|
||||||
"y" : 0,
|
|
||||||
"z" : 0
|
|
||||||
},
|
|
||||||
"originalScale" : {
|
|
||||||
"x" : 1.5,
|
|
||||||
"y" : 1.5,
|
|
||||||
"z" : 1.5
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "4507c7f6-cd26-45c3-94ea-fe36d5b05251"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
|
|
||||||
"isOverridingDuration" : false,
|
|
||||||
"startTime" : -32767,
|
|
||||||
"endTime" : 32767,
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "4507c7f6-cd26-45c3-94ea-fe36d5b05251"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.ColorSubmodule_BM,Assembly-CSharp",
|
|
||||||
"originalBaseColor" : {
|
|
||||||
"r" : 1,
|
|
||||||
"g" : 1,
|
|
||||||
"b" : 1,
|
|
||||||
"a" : 1
|
|
||||||
},
|
|
||||||
"emissionEnabled" : false,
|
|
||||||
"originalEmissionColor" : {
|
|
||||||
"r" : 0,
|
|
||||||
"g" : 0,
|
|
||||||
"b" : 0,
|
|
||||||
"a" : 1
|
|
||||||
},
|
|
||||||
"originalEmissionIntensity" : 0,
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "4507c7f6-cd26-45c3-94ea-fe36d5b05251"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp",
|
|
||||||
"effectCollection" : {"Generate":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteGenerateExpand_BM,Assembly-CSharp",
|
|
||||||
"generateTime" : 1,
|
|
||||||
"effectTime" : 0.2
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.CameraShakeEffect_BM,Assembly-CSharp",
|
|
||||||
"duration" : 0.2,
|
|
||||||
"frequency" : 200,
|
|
||||||
"amplitudeX" : 1,
|
|
||||||
"amplitudeY" : 1,
|
|
||||||
"amplitudeZ" : 1,
|
|
||||||
"effectTime" : 0
|
|
||||||
}
|
|
||||||
],"GeneralJudge":[
|
|
||||||
|
|
||||||
],"Holding":[
|
|
||||||
|
|
||||||
],"Perfect":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNotePerfectBurst_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0
|
|
||||||
}
|
|
||||||
],"Good":[
|
|
||||||
|
|
||||||
],"Bad":[
|
|
||||||
|
|
||||||
],"Miss":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteMissTransparent_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0.2
|
|
||||||
}
|
|
||||||
],"AfterJudge":[
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "4507c7f6-cd26-45c3-94ea-fe36d5b05251"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 67be16676571f35478a55da8ebcccbb6
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,173 +0,0 @@
|
|||||||
{
|
|
||||||
"Note" : {
|
|
||||||
"__type" : "System.Collections.Generic.List`1[[Ichni.RhythmGame.Beatmap.BaseElement_BM, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]],mscorlib",
|
|
||||||
"value" : [
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.Hold_BM,Assembly-CSharp",
|
|
||||||
"holdEndTime" : 38.1,
|
|
||||||
"exactJudgeTime" : 37.8,
|
|
||||||
"elementName" : "Hold (37.8-38.1)",
|
|
||||||
"tags" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"elementGuid" : {
|
|
||||||
"value" : "fa71b9d8-5450-4602-9d01-6ec8cdd9ed7f"
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "0ae5b3f7-75f7-49c8-8841-7e4dbbb20d35"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
|
|
||||||
"isOverridingDuration" : false,
|
|
||||||
"startTime" : -32767,
|
|
||||||
"endTime" : 32767,
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "fa71b9d8-5450-4602-9d01-6ec8cdd9ed7f"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.NoteJudgeSubmodule_BM,Assembly-CSharp",
|
|
||||||
"judgeUnitList" : [
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TouchAreaJudgeUnit_BM,Assembly-CSharp",
|
|
||||||
"areaRadius" : 600
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TouchAreaJudgeUnit_BM,Assembly-CSharp",
|
|
||||||
"areaRadius" : 600
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "fa71b9d8-5450-4602-9d01-6ec8cdd9ed7f"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.NoteAudioSubmodule_BM,Assembly-CSharp",
|
|
||||||
"generalJudgeAudioList" : [
|
|
||||||
"DefaultEndHold"
|
|
||||||
],
|
|
||||||
"perfectAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"goodAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"badAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"missAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"holdStartAudioList" : [
|
|
||||||
"DefaultStartHold"
|
|
||||||
],
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "fa71b9d8-5450-4602-9d01-6ec8cdd9ed7f"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteVisualHold_BM,Assembly-CSharp",
|
|
||||||
"isHighlighted" : false,
|
|
||||||
"themeBundleName" : "departure_to_multiverse",
|
|
||||||
"objectName" : "DTM_NoteVisualHold",
|
|
||||||
"elementName" : "New Note Visual",
|
|
||||||
"tags" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"elementGuid" : {
|
|
||||||
"value" : "d487a8d6-c440-490d-a82a-edb1d537205e"
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "fa71b9d8-5450-4602-9d01-6ec8cdd9ed7f"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
|
|
||||||
"originalPosition" : {
|
|
||||||
"x" : -6,
|
|
||||||
"y" : 0,
|
|
||||||
"z" : 0
|
|
||||||
},
|
|
||||||
"originalEulerAngles" : {
|
|
||||||
"x" : 0,
|
|
||||||
"y" : 0,
|
|
||||||
"z" : 0
|
|
||||||
},
|
|
||||||
"originalScale" : {
|
|
||||||
"x" : 1,
|
|
||||||
"y" : 1,
|
|
||||||
"z" : 1
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "d487a8d6-c440-490d-a82a-edb1d537205e"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
|
|
||||||
"isOverridingDuration" : false,
|
|
||||||
"startTime" : -32767,
|
|
||||||
"endTime" : 32767,
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "d487a8d6-c440-490d-a82a-edb1d537205e"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.ColorSubmodule_BM,Assembly-CSharp",
|
|
||||||
"originalBaseColor" : {
|
|
||||||
"r" : 1,
|
|
||||||
"g" : 1,
|
|
||||||
"b" : 1,
|
|
||||||
"a" : 1
|
|
||||||
},
|
|
||||||
"emissionEnabled" : false,
|
|
||||||
"originalEmissionColor" : {
|
|
||||||
"r" : 0,
|
|
||||||
"g" : 0,
|
|
||||||
"b" : 0,
|
|
||||||
"a" : 1
|
|
||||||
},
|
|
||||||
"originalEmissionIntensity" : 0,
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "d487a8d6-c440-490d-a82a-edb1d537205e"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp",
|
|
||||||
"effectCollection" : {"Generate":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteGenerateExtend_BM,Assembly-CSharp",
|
|
||||||
"generateTime" : 1,
|
|
||||||
"effectTime" : 0.5
|
|
||||||
}
|
|
||||||
],"GeneralJudge":[
|
|
||||||
|
|
||||||
],"StartHold":[
|
|
||||||
|
|
||||||
],"Holding":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteHoldingBreath_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0.299999237
|
|
||||||
}
|
|
||||||
],"Perfect":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNotePerfectBurst_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0
|
|
||||||
}
|
|
||||||
],"Good":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteGoodBurst_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0
|
|
||||||
}
|
|
||||||
],"Bad":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteBadBurst_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0
|
|
||||||
}
|
|
||||||
],"Miss":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteMissTransparent_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0.2
|
|
||||||
}
|
|
||||||
],"AfterJudge":[
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "d487a8d6-c440-490d-a82a-edb1d537205e"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 95cb000d04bdebf409a018593ab4e5c4
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,166 +0,0 @@
|
|||||||
{
|
|
||||||
"Note" : {
|
|
||||||
"__type" : "System.Collections.Generic.List`1[[Ichni.RhythmGame.Beatmap.BaseElement_BM, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]],mscorlib",
|
|
||||||
"value" : [
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.Tap_BM,Assembly-CSharp",
|
|
||||||
"exactJudgeTime" : 17.7,
|
|
||||||
"elementName" : "Tap (17.7)",
|
|
||||||
"tags" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"elementGuid" : {
|
|
||||||
"value" : "5b0597ba-88d3-4912-8cd4-d33a51d92c98"
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "00000000-0000-0000-0000-000000000000"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
|
|
||||||
"isOverridingDuration" : false,
|
|
||||||
"startTime" : -32767,
|
|
||||||
"endTime" : 32767,
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "5b0597ba-88d3-4912-8cd4-d33a51d92c98"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.NoteAudioSubmodule_BM,Assembly-CSharp",
|
|
||||||
"generalJudgeAudioList" : [
|
|
||||||
"DefaultTap"
|
|
||||||
],
|
|
||||||
"perfectAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"goodAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"badAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"missAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"holdStartAudioList" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "5b0597ba-88d3-4912-8cd4-d33a51d92c98"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.NoteJudgeSubmodule_BM,Assembly-CSharp",
|
|
||||||
"judgeUnitList" : [
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TouchAreaJudgeUnit_BM,Assembly-CSharp",
|
|
||||||
"areaRadius" : 600
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "5b0597ba-88d3-4912-8cd4-d33a51d92c98"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteVisual_BM,Assembly-CSharp",
|
|
||||||
"isHighlighted" : false,
|
|
||||||
"themeBundleName" : "departure_to_multiverse",
|
|
||||||
"objectName" : "DTM_NoteVisualTap",
|
|
||||||
"elementName" : "New Note Visual",
|
|
||||||
"tags" : [
|
|
||||||
|
|
||||||
],
|
|
||||||
"elementGuid" : {
|
|
||||||
"value" : "85451a3e-9d99-4706-bcd5-c3e18e182916"
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "5b0597ba-88d3-4912-8cd4-d33a51d92c98"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
|
|
||||||
"originalPosition" : {
|
|
||||||
"x" : 0,
|
|
||||||
"y" : 0,
|
|
||||||
"z" : 0
|
|
||||||
},
|
|
||||||
"originalEulerAngles" : {
|
|
||||||
"x" : 0,
|
|
||||||
"y" : 0,
|
|
||||||
"z" : 0
|
|
||||||
},
|
|
||||||
"originalScale" : {
|
|
||||||
"x" : 1.2,
|
|
||||||
"y" : 1.2,
|
|
||||||
"z" : 1.2
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "85451a3e-9d99-4706-bcd5-c3e18e182916"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
|
|
||||||
"isOverridingDuration" : false,
|
|
||||||
"startTime" : -32767,
|
|
||||||
"endTime" : 32767,
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "85451a3e-9d99-4706-bcd5-c3e18e182916"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.ColorSubmodule_BM,Assembly-CSharp",
|
|
||||||
"originalBaseColor" : {
|
|
||||||
"r" : 1,
|
|
||||||
"g" : 1,
|
|
||||||
"b" : 1,
|
|
||||||
"a" : 1
|
|
||||||
},
|
|
||||||
"emissionEnabled" : false,
|
|
||||||
"originalEmissionColor" : {
|
|
||||||
"r" : 0,
|
|
||||||
"g" : 0,
|
|
||||||
"b" : 0,
|
|
||||||
"a" : 1
|
|
||||||
},
|
|
||||||
"originalEmissionIntensity" : 0,
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "85451a3e-9d99-4706-bcd5-c3e18e182916"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp",
|
|
||||||
"effectCollection" : {"Generate":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteGenerateExpand_BM,Assembly-CSharp",
|
|
||||||
"generateTime" : 3,
|
|
||||||
"effectTime" : 0.5
|
|
||||||
}
|
|
||||||
],"GeneralJudge":[
|
|
||||||
|
|
||||||
],"StartHold":[
|
|
||||||
|
|
||||||
],"Holding":[
|
|
||||||
|
|
||||||
],"Perfect":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNotePerfectBurst_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0
|
|
||||||
}
|
|
||||||
],"Good":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteGoodBurst_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0
|
|
||||||
}
|
|
||||||
],"Bad":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteBadBurst_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0
|
|
||||||
}
|
|
||||||
],"Miss":[
|
|
||||||
{
|
|
||||||
"__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteMissTransparent_BM,Assembly-CSharp",
|
|
||||||
"effectTime" : 0.2
|
|
||||||
}
|
|
||||||
],"AfterJudge":[
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"attachedElementGuid" : {
|
|
||||||
"value" : "85451a3e-9d99-4706-bcd5-c3e18e182916"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 883ef17754a31e741b58fa60ce21b740
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -12,7 +12,6 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
|||||||
this.noteVisual = noteVisual;
|
this.noteVisual = noteVisual;
|
||||||
this.generateTime = generateTime;
|
this.generateTime = generateTime;
|
||||||
this.effectTime = effectTime;
|
this.effectTime = effectTime;
|
||||||
this.nowEffectState = CheckEffectState(EditorManager.instance.songInformation.songTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed override void Recover()
|
public sealed override void Recover()
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
|||||||
this.noteVisualHold = noteVisual as DTMNoteVisualHold;
|
this.noteVisualHold = noteVisual as DTMNoteVisualHold;
|
||||||
this.generateTime = generateTime;
|
this.generateTime = generateTime;
|
||||||
this.effectTime = effectTime;
|
this.effectTime = effectTime;
|
||||||
this.nowEffectState = CheckEffectState(EditorManager.instance.songInformation.songTime);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateHold()
|
private void UpdateHold()
|
||||||
|
|||||||
Reference in New Issue
Block a user