changed: changing some air movement values can now be smoothed (including values that are used to smoothing out inputs)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using NodeCanvas.Editor;
|
||||
using NodeCanvas.Framework;
|
||||
using ParadoxNotion.Design;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@@ -97,13 +99,14 @@ namespace Reset.Core{
|
||||
|
||||
public struct FloatValueGroup{
|
||||
public string label;
|
||||
public float value;
|
||||
// public float value;
|
||||
public BBParameter<float> value;
|
||||
|
||||
public ValueChangeAction changeValue;
|
||||
|
||||
public FloatValueGroup(string newLabel){
|
||||
label = newLabel;
|
||||
value = 0f;
|
||||
value = new BBParameter<float>().value = 0f;
|
||||
changeValue = ValueChangeAction.NoChange;
|
||||
}
|
||||
}
|
||||
@@ -123,7 +126,7 @@ namespace Reset.Core{
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public class BoolValueGroupDrawer : ObjectDrawer<BoolValueGroup> {
|
||||
public override BoolValueGroup OnGUI(GUIContent content, BoolValueGroup _instance){
|
||||
public override BoolValueGroup OnGUI(GUIContent _content, BoolValueGroup _instance){
|
||||
// Remove label for floats
|
||||
EditorGUIUtility.labelWidth = 50;
|
||||
|
||||
@@ -274,9 +277,11 @@ namespace Reset.Core{
|
||||
// Create the x settings enum
|
||||
_instance.changeValue = (ValueChangeAction)EditorGUILayout.EnumPopup("", instance.changeValue);
|
||||
|
||||
|
||||
// Create the value/disabled information field
|
||||
if (_instance.changeValue == ValueChangeAction.NewValue){
|
||||
_instance.value = EditorGUILayout.FloatField(_instance.value, floatOptions);
|
||||
// _instance.value = EditorGUILayout.FloatField(_instance.value, floatOptions);
|
||||
BBParameterEditor.ParameterField("", _instance.value);
|
||||
} else {
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
EditorGUILayout.TextField(_instance.changeValue == ValueChangeAction.NoChange ? "Unchanged" : "Reset", floatOptions);
|
||||
|
||||
Reference in New Issue
Block a user