mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 19:55:09 +00:00
Fix event property dropdown
This commit is contained in:
parent
3a76cac069
commit
57b14c3f3e
3 changed files with 16 additions and 3 deletions
|
@ -11798,7 +11798,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
level: {fileID: 0}
|
level: {fileID: 0}
|
||||||
music: {fileID: 0}
|
music: {fileID: 8300000, guid: c0b3e65059fb3cd49aa056342f2246c8, type: 3}
|
||||||
debugUI: 0
|
debugUI: 0
|
||||||
playOnStart: 0
|
playOnStart: 0
|
||||||
editor: 1
|
editor: 1
|
||||||
|
@ -17111,7 +17111,7 @@ MonoBehaviour:
|
||||||
m_Elasticity: 0.1
|
m_Elasticity: 0.1
|
||||||
m_Inertia: 1
|
m_Inertia: 1
|
||||||
m_DecelerationRate: 0.135
|
m_DecelerationRate: 0.135
|
||||||
m_ScrollSensitivity: 1
|
m_ScrollSensitivity: 45
|
||||||
m_Viewport: {fileID: 9172948791288181729}
|
m_Viewport: {fileID: 9172948791288181729}
|
||||||
m_HorizontalScrollbar: {fileID: 0}
|
m_HorizontalScrollbar: {fileID: 0}
|
||||||
m_VerticalScrollbar: {fileID: 9172948790907700978}
|
m_VerticalScrollbar: {fileID: 9172948790907700978}
|
||||||
|
|
|
@ -21,6 +21,8 @@ namespace RhythmHeavenMania.Editor
|
||||||
|
|
||||||
private bool active;
|
private bool active;
|
||||||
|
|
||||||
|
private int childCountAtStart;
|
||||||
|
|
||||||
public static EventParameterManager instance { get; set; }
|
public static EventParameterManager instance { get; set; }
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
@ -28,6 +30,11 @@ namespace RhythmHeavenMania.Editor
|
||||||
instance = this;
|
instance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
childCountAtStart = transform.childCount;
|
||||||
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (Input.GetMouseButtonDown(0))
|
if (Input.GetMouseButtonDown(0))
|
||||||
|
@ -113,7 +120,7 @@ namespace RhythmHeavenMania.Editor
|
||||||
private void DestroyParams()
|
private void DestroyParams()
|
||||||
{
|
{
|
||||||
active = false;
|
active = false;
|
||||||
for (int i = 2; i < transform.childCount; i++)
|
for (int i = childCountAtStart; i < transform.childCount; i++)
|
||||||
{
|
{
|
||||||
Destroy(transform.GetChild(i).gameObject);
|
Destroy(transform.GetChild(i).gameObject);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,12 @@ namespace RhythmHeavenMania.Editor
|
||||||
inputField.text = slider.value.ToString();
|
inputField.text = slider.value.ToString();
|
||||||
parameterManager.entity[propertyName] = (int)slider.value;
|
parameterManager.entity[propertyName] = (int)slider.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
inputField.onEndEdit.AddListener(delegate
|
||||||
|
{
|
||||||
|
slider.value = Mathf.RoundToInt(System.Convert.ToSingle(System.Convert.ToSingle(inputField.text)));
|
||||||
|
parameterManager.entity[propertyName] = (int)slider.value;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if (objType == typeof(EntityTypes.Float))
|
else if (objType == typeof(EntityTypes.Float))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue