From 94fe4a06b90089fb8187c177c39cb255c90609fb Mon Sep 17 00:00:00 2001 From: lemz Date: Sat, 22 Jun 2024 10:44:12 +0200 Subject: [PATCH] Update NoteKind.hx --- source/funkin/play/notes/notekind/NoteKind.hx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/source/funkin/play/notes/notekind/NoteKind.hx b/source/funkin/play/notes/notekind/NoteKind.hx index 3aa02088b..a0f759949 100644 --- a/source/funkin/play/notes/notekind/NoteKind.hx +++ b/source/funkin/play/notes/notekind/NoteKind.hx @@ -72,13 +72,12 @@ class NoteKind implements INoteScriptedClass { if (param.name == name) { - if (param.type == NoteKindParamType.RANGED_INT || param.type == NoteKindParamType.RANGED_FLOAT) + switch (param.type) { - param.data.value = FlxMath.bound(value, param.data.min, param.data.max); - } - else - { - param.data.value = value; + case NoteKindParamType.INT | NoteKindParamType.FLOAT: + param.data.value = FlxMath.bound(value, param.data.min, param.data.max); + default: + param.data.value = value; } break; @@ -123,23 +122,17 @@ abstract NoteKindParamType(String) to String public static var INT:String = "Int"; - public static var RANGED_INT:String = "RangedInt"; - public static var FLOAT:String = "Float"; - - public static var RANGED_FLOAT:String = "RangedFloat"; } typedef NoteKindParamData = { /** - * Only used for `RangedInt` and `RangedFloat` * If `min` is null, there is no minimum */ var min:Null; /** - * Only used for `RangedInt` and `RangedFloat` * If `max` is null, there is no maximum */ var max:Null;