Note Prefab功能
This commit is contained in:
@@ -43,6 +43,11 @@ namespace Ichni.RhythmGame
|
||||
flick.track = null;
|
||||
flick.isOnTrack = false;
|
||||
}
|
||||
|
||||
if (EditorManager.instance.useNotePrefab)
|
||||
{
|
||||
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(flick,GetNoteTypeName(flick) + "_Prefab");
|
||||
}
|
||||
|
||||
return flick;
|
||||
}
|
||||
@@ -66,6 +71,11 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
TemporaryObject.GenerateElement("New Note Visual", Guid.NewGuid(), new List<string>(), true, this);
|
||||
});
|
||||
|
||||
if (noteVisual != null)
|
||||
{
|
||||
generateNoteVisualButton.button.interactable = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,11 @@ namespace Ichni.RhythmGame
|
||||
hold.track = null;
|
||||
hold.isOnTrack = false;
|
||||
}
|
||||
|
||||
if (EditorManager.instance.useNotePrefab)
|
||||
{
|
||||
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(hold,GetNoteTypeName(hold) + "_Prefab");
|
||||
}
|
||||
|
||||
return hold;
|
||||
}
|
||||
@@ -112,6 +117,11 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
TemporaryObject.GenerateElement("New Note Visual", Guid.NewGuid(), new List<string>(), true, this);
|
||||
});
|
||||
|
||||
if (noteVisual != null)
|
||||
{
|
||||
generateNoteVisualButton.button.interactable = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +159,12 @@ namespace Ichni.RhythmGame
|
||||
exactJudgeTimeInputField.AddListenerFunction(UpdateNoteInTrack);
|
||||
exactJudgeTimeInputField.Mark(inspector, "ExactJudgeTime");
|
||||
|
||||
var saveNotePrefabButton =
|
||||
inspector.GenerateButton(this, container, "Save Note Prefab", () =>
|
||||
{
|
||||
EditorManager.instance.projectManager.notePrefabManager.SaveNotePrefab(this, GetNoteTypeName(this) + "_Prefab");
|
||||
});
|
||||
|
||||
var noteScreenPositionText = inspector.GenerateHintText(this, container, () => "Note Screen Position: " + noteScreenPosition);
|
||||
}
|
||||
}
|
||||
@@ -173,6 +179,18 @@ namespace Ichni.RhythmGame
|
||||
Miss
|
||||
}
|
||||
|
||||
public static string GetNoteTypeName(NoteBase note)
|
||||
{
|
||||
return note switch
|
||||
{
|
||||
Tap => "Tap",
|
||||
Stay => "Stay",
|
||||
Hold => "Hold",
|
||||
Flick => "Flick",
|
||||
_ => throw new NotImplementedException("Note type not recognized")
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
|
||||
@@ -39,6 +39,11 @@ namespace Ichni.RhythmGame
|
||||
stay.track = null;
|
||||
stay.isOnTrack = false;
|
||||
}
|
||||
|
||||
if (EditorManager.instance.useNotePrefab)
|
||||
{
|
||||
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(stay,GetNoteTypeName(stay) + "_Prefab");
|
||||
}
|
||||
|
||||
return stay;
|
||||
}
|
||||
@@ -61,6 +66,11 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
TemporaryObject.GenerateElement("New Note Visual", Guid.NewGuid(), new List<string>(), true, this);
|
||||
});
|
||||
|
||||
if (noteVisual != null)
|
||||
{
|
||||
generateNoteVisualButton.button.interactable = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ namespace Ichni.RhythmGame
|
||||
tap.isOnTrack = false;
|
||||
}
|
||||
|
||||
if (EditorManager.instance.useNotePrefab)
|
||||
{
|
||||
EditorManager.instance.projectManager.notePrefabManager.LoadNotePrefab(tap,GetNoteTypeName(tap) + "_Prefab");
|
||||
}
|
||||
|
||||
return tap;
|
||||
}
|
||||
}
|
||||
@@ -62,6 +67,11 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
TemporaryObject.GenerateElement("New Note Visual", Guid.NewGuid(), new List<string>(), true, this);
|
||||
});
|
||||
|
||||
if (noteVisual != null)
|
||||
{
|
||||
generateNoteVisualButton.button.interactable = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user