StartMenu!
This commit is contained in:
@@ -65,8 +65,8 @@ namespace Ichni.RhythmGame
|
||||
float size = transformSubmodule.currentScale.x;
|
||||
Color color = colorSubmodule.currentBaseColor;
|
||||
|
||||
transform.position = position;
|
||||
transform.rotation = Quaternion.LookRotation(normal);
|
||||
transform.localPosition = position;
|
||||
transform.localRotation = Quaternion.LookRotation(normal);
|
||||
transform.localScale = Vector3.one * size;
|
||||
|
||||
node = new SplinePoint(position, Vector3.up, normal, size, color);
|
||||
|
||||
@@ -50,6 +50,8 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
trackPathSubmodule.ClosePath();
|
||||
}
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -76,11 +76,18 @@ namespace Ichni.RhythmGame
|
||||
var container = inspector.GenerateContainer("Track Time Movable");
|
||||
var startTimeInputField =
|
||||
inspector.GenerateInputField(this, container, "Start Time", nameof(trackStartTime));
|
||||
startTimeInputField.AddListenerFunction(_ => RefreshChildren());
|
||||
|
||||
var endTimeInputField = inspector.GenerateInputField(this, container, "End Time", nameof(trackEndTime));
|
||||
endTimeInputField.AddListenerFunction(_ => RefreshChildren());
|
||||
|
||||
var visibleTimeInputField =
|
||||
inspector.GenerateInputField(this, container, "Visible Time Length", nameof(visibleTrackTimeLength));
|
||||
|
||||
var animationCurveDropdown = inspector.GenerateDropdown(this, container, "Animation Curve",
|
||||
typeof(AnimationCurveType), nameof(animationCurveType));
|
||||
animationCurveDropdown.AddListenerFunction(_ => RefreshChildren());
|
||||
|
||||
var deleteButton = inspector.GenerateButton(this, container, "Delete",
|
||||
() =>
|
||||
{
|
||||
@@ -90,6 +97,17 @@ namespace Ichni.RhythmGame
|
||||
track.Refresh();
|
||||
});
|
||||
}
|
||||
|
||||
private void RefreshChildren()
|
||||
{
|
||||
track.childElementList.ForEach(child =>
|
||||
{
|
||||
if (child is NoteBase note)
|
||||
{
|
||||
note.UpdateNoteInTrack();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
|
||||
Reference in New Issue
Block a user