1111 Signed-off-by: TRAfoer <lhf190@outlook.com>
Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
@@ -51,6 +51,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(flick, GetNoteTypeName(flick) + "_Prefab");
|
||||
}
|
||||
if (isFirstGenerated) flick.AfterInitialize();
|
||||
|
||||
return flick;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(hold, GetNoteTypeName(hold) + "_Prefab");
|
||||
}
|
||||
|
||||
if (isFirstGenerated) hold.AfterInitialize();
|
||||
return hold;
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,11 @@ namespace Ichni.RhythmGame
|
||||
public Vector2 noteScreenPosition;
|
||||
[FormerlySerializedAs("isJudged")] public bool isFirstJudged;
|
||||
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);
|
||||
|
||||
}
|
||||
public override void AfterInitialize()
|
||||
{
|
||||
base.AfterInitialize();
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(stay, GetNoteTypeName(stay) + "_Prefab");
|
||||
}
|
||||
if (isFirstGenerated) stay.AfterInitialize();
|
||||
|
||||
return stay;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(tap, GetNoteTypeName(tap) + "_Prefab");
|
||||
}
|
||||
if (isFirstGenerated) tap.AfterInitialize();
|
||||
|
||||
return tap;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
pendingNotes.Add((note, activationTime, finishTime));
|
||||
AllNotesRegistered();
|
||||
print($"Registered note {note.elementName} with activation time {activationTime} and finish time {finishTime}");
|
||||
}
|
||||
|
||||
// 在所有物体注册完毕后,对列表进行一次排序
|
||||
@@ -39,6 +40,8 @@ namespace Ichni.RhythmGame
|
||||
if (shouldBeActive && !isActive)
|
||||
{
|
||||
note.gameObject.SetActive(true);
|
||||
note.Update();
|
||||
if (!note.isFirstJudged) note.noteVisual?.Recover();
|
||||
}
|
||||
else if (!shouldBeActive && isActive)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user