部分改动
我还是难以理解(
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.Editor;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -12,19 +13,19 @@ namespace Ichni.RhythmGame
|
||||
[Title("Basic Info")]
|
||||
public float exactJudgeTime;
|
||||
|
||||
[Title("Track Info")]
|
||||
[Title("Track Info")]
|
||||
public bool isOnTrack;
|
||||
public Track track;
|
||||
public SplinePositioner trackPositioner;
|
||||
|
||||
|
||||
[Title("NoteVisual")]
|
||||
public NoteVisualBase noteVisual;
|
||||
|
||||
|
||||
[Title("Submodules")]
|
||||
public TransformSubmodule transformSubmodule { get; set; }
|
||||
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
||||
public NoteJudgeSubmodule noteJudgeSubmodule { get; set; }
|
||||
|
||||
|
||||
[Title("In-Game Info")]
|
||||
public Vector2 noteScreenPosition;
|
||||
public bool isJudged;
|
||||
@@ -44,10 +45,10 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
TrackTimeSubmoduleStatic trackTimeSubmoduleStatic = track.trackTimeSubmodule as TrackTimeSubmoduleStatic;
|
||||
|
||||
|
||||
float startMove = exactJudgeTime - trackTimeSubmoduleStatic.trackTotalTime;
|
||||
float percent = AnimationCurveEvaluator.Evaluate(trackTimeSubmoduleStatic.animationCurveType, (songTime - startMove) / trackTimeSubmoduleStatic.trackTotalTime);
|
||||
|
||||
|
||||
percent = Mathf.Max(percent, 0);
|
||||
percent = Mathf.Min(percent, 1);
|
||||
|
||||
@@ -59,7 +60,7 @@ namespace Ichni.RhythmGame
|
||||
transformSubmodule = new TransformSubmodule(this);
|
||||
timeDurationSubmodule = new TimeDurationSubmodule(this);
|
||||
noteJudgeSubmodule = new NoteJudgeSubmodule(this);
|
||||
|
||||
|
||||
submoduleList.Add(transformSubmodule);
|
||||
submoduleList.Add(timeDurationSubmodule);
|
||||
submoduleList.Add(noteJudgeSubmodule);
|
||||
@@ -116,9 +117,9 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public void ExecuteStartJudge()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void UpdateNoteInTrack()
|
||||
{
|
||||
if (isOnTrack && track.trackTimeSubmodule != null)
|
||||
@@ -133,6 +134,26 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void SetUpInspector()
|
||||
{//我想把时间放在第一层菜单所以
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Element Info");
|
||||
var nameInputField = inspector.GenerateParameterInputField(this, container, GetType().Name + "'s Name", nameof(elementName));
|
||||
var guidText = inspector.GenerateParameterText(this, container, "Element GUID", nameof(elementGuid));
|
||||
var tagsListButton = inspector.GenerateButton(this, container, "Tags List", () =>
|
||||
{
|
||||
inspector.GenerateCompositeParameterWindow(this, "Tags List", nameof(tags)).SetAsStringList();
|
||||
});
|
||||
foreach (var submodule in submoduleList)
|
||||
{
|
||||
submodule.SetUpInspector();
|
||||
}
|
||||
|
||||
|
||||
var judgetimeinput =
|
||||
inspector.GenerateParameterInputField(this, container, "exactJudgeTime", nameof(exactJudgeTime));
|
||||
base.SetUpInspector();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract partial class NoteBase
|
||||
@@ -144,6 +165,7 @@ namespace Ichni.RhythmGame
|
||||
Bad,
|
||||
Miss
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
@@ -151,13 +173,13 @@ namespace Ichni.RhythmGame
|
||||
public abstract class NoteBase_BM : GameElement_BM
|
||||
{
|
||||
public float exactJudgeTime;
|
||||
|
||||
|
||||
public NoteBase_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public NoteBase_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement, float exactJudgeTime)
|
||||
public NoteBase_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement, float exactJudgeTime)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.exactJudgeTime = exactJudgeTime;
|
||||
@@ -165,7 +187,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
|
||||
Reference in New Issue
Block a user