changed: changing some air movement values can now be smoothed (including values that are used to smoothing out inputs)

This commit is contained in:
Chris
2025-08-21 17:29:22 -04:00
parent 93634a9586
commit a289c78b5d
7 changed files with 337 additions and 145 deletions

View File

@@ -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);