mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 19:25:16 -05:00
Update NoteKind.hx
This commit is contained in:
parent
c8d019da2f
commit
94fe4a06b9
1 changed files with 5 additions and 12 deletions
|
@ -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<Float>;
|
||||
|
||||
/**
|
||||
* Only used for `RangedInt` and `RangedFloat`
|
||||
* If `max` is null, there is no maximum
|
||||
*/
|
||||
var max:Null<Float>;
|
||||
|
|
Loading…
Reference in a new issue