制作点击添加组件然后出现bug
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.Linq;
|
||||
using Ichni;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class GraphicalFlexibleFloatWindow : MovableWindow
|
||||
public partial class GraphicalFlexibleFloatWindow : MovableWindow
|
||||
{
|
||||
public Button addNewUnitButton;
|
||||
public FlexibleFloatTab unitPrefab;
|
||||
@@ -80,3 +83,61 @@ public class GraphicalFlexibleFloatWindow : MovableWindow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class GraphicalFlexibleFloatWindow
|
||||
{
|
||||
[Title("AnimEditor")]
|
||||
public TMP_InputField StartText;
|
||||
public TMP_InputField EndText;
|
||||
public TMP_InputField StartValueText;
|
||||
public TMP_InputField EndValueText;
|
||||
public EventPoint ConnectedPoint;
|
||||
public TMP_Dropdown animationCurveTypeDropdown;
|
||||
public GameObject VisibleArea;
|
||||
|
||||
|
||||
public void Removed()
|
||||
{
|
||||
if (ConnectedPoint != null)
|
||||
{
|
||||
ConnectedPoint.FatherTab.remoceAnim(ConnectedPoint.animatedFloat);
|
||||
ConnectedPoint.FatherTab.eventPoints.Remove(ConnectedPoint);
|
||||
if (ConnectedPoint.LastEventPoint != null)
|
||||
{
|
||||
ConnectedPoint.LastEventPoint.NextEventPoint = ConnectedPoint.NextEventPoint;
|
||||
if (ConnectedPoint.LastEventPoint.NextEventPoint != null) ConnectedPoint.LastEventPoint.NextEventPoint.ReDraw(scalevalue);
|
||||
}
|
||||
|
||||
if (ConnectedPoint.NextEventPoint != null)
|
||||
{
|
||||
ConnectedPoint.NextEventPoint.LastEventPoint = ConnectedPoint.LastEventPoint;
|
||||
if (ConnectedPoint.NextEventPoint.LastEventPoint != null) ConnectedPoint.NextEventPoint.LastEventPoint.ReDraw(scalevalue);
|
||||
}
|
||||
|
||||
//Destroy(ConnectedPoint.animatedFloat);
|
||||
|
||||
VisibleArea.SetActive(false);
|
||||
|
||||
Destroy(ConnectedPoint.gameObject);
|
||||
ApplyParameters();
|
||||
}
|
||||
}
|
||||
public void ChangeValue()
|
||||
{
|
||||
if (ConnectedPoint != null)
|
||||
{
|
||||
float startTime = float.Parse(StartText.text);
|
||||
float endTime = float.Parse(EndText.text);
|
||||
float startValue = float.Parse(StartValueText.text);
|
||||
float endValue = float.Parse(EndValueText.text);
|
||||
|
||||
ConnectedPoint.animatedFloat.startTime = startTime;
|
||||
ConnectedPoint.animatedFloat.endTime = endTime;
|
||||
ConnectedPoint.animatedFloat.startValue = startValue;
|
||||
ConnectedPoint.animatedFloat.endValue = endValue;
|
||||
ConnectedPoint.animatedFloat.animationCurveType = (AnimationCurveType)animationCurveTypeDropdown.value;
|
||||
ConnectedPoint.Initialize(ConnectedPoint.animatedFloat);
|
||||
ConnectedPoint.ReDraw(scalevalue);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user