事件编辑器初步
待办: 添加删除 复制粘贴 曲线预览
This commit is contained in:
@@ -15,11 +15,16 @@ namespace Ichni.Editor
|
||||
public TMP_InputField startValueInputField;
|
||||
public TMP_InputField endValueInputField;
|
||||
public TMP_Dropdown animationCurveTypeDropdown;
|
||||
|
||||
|
||||
public override void SetUnit(CompositeParameterWindow window, object itemContent)
|
||||
{
|
||||
startTimeInputField.text = "0";
|
||||
endTimeInputField.text = "0";
|
||||
startValueInputField.text = "0";
|
||||
endValueInputField.text = "0";
|
||||
animationCurveTypeDropdown.value = 0;
|
||||
compositeParameterWindow = window;
|
||||
|
||||
|
||||
AnimatedFloat animatedFloat = (AnimatedFloat)itemContent;
|
||||
startTimeInputField.text = animatedFloat.startTime.ToString();
|
||||
endTimeInputField.text = animatedFloat.endTime.ToString();
|
||||
@@ -29,14 +34,14 @@ namespace Ichni.Editor
|
||||
List<string> enumNameList = System.Enum.GetNames(typeof(AnimationCurveType)).ToList();
|
||||
animationCurveTypeDropdown.AddOptions(enumNameList);
|
||||
animationCurveTypeDropdown.value = (int)animatedFloat.animationCurveType;
|
||||
|
||||
|
||||
|
||||
|
||||
startTimeInputField.onEndEdit.AddListener(_ => compositeParameterWindow.ApplyParameters());
|
||||
endTimeInputField.onEndEdit.AddListener(_ => compositeParameterWindow.ApplyParameters());
|
||||
startValueInputField.onEndEdit.AddListener(_ => compositeParameterWindow.ApplyParameters());
|
||||
endValueInputField.onEndEdit.AddListener(_ => compositeParameterWindow.ApplyParameters());
|
||||
animationCurveTypeDropdown.onValueChanged.AddListener(_ => compositeParameterWindow.ApplyParameters());
|
||||
|
||||
|
||||
removeButton.onClick.AddListener(() =>
|
||||
{
|
||||
compositeParameterWindow.RemoveUnit(this);
|
||||
|
||||
Reference in New Issue
Block a user