mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-29 08:16:58 +00:00
rename vars
This commit is contained in:
parent
f86a163692
commit
dd6d12de23
|
@ -62,7 +62,7 @@ class PreferencesMenu extends Page
|
||||||
pref.minValue = 60;
|
pref.minValue = 60;
|
||||||
pref.maxValue = 360;
|
pref.maxValue = 360;
|
||||||
pref.changeRate = 1;
|
pref.changeRate = 1;
|
||||||
pref.changeSpeed = 0.05;
|
pref.changeDelay = 0.05;
|
||||||
addPref(pref);
|
addPref(pref);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
@ -133,14 +133,14 @@ class PreferenceItem extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
public var name:String = "";
|
public var name:String = "";
|
||||||
public var description:String = "";
|
public var description:String = "";
|
||||||
|
|
||||||
public function handleInput(deltaTime:Float):Void {}
|
public function handleInput(elapsed:Float):Void {}
|
||||||
}
|
}
|
||||||
|
|
||||||
class NumberedPreferenceItem extends PreferenceItem
|
class NumberedPreferenceItem extends PreferenceItem
|
||||||
{
|
{
|
||||||
public var onChange:Float->Void;
|
public var onChange:Float->Void;
|
||||||
public var changeRate:Float = 1.0;
|
public var changeRate:Float = 1.0;
|
||||||
public var changeSpeed:Float = 0.1;
|
public var changeDelay:Float = 0.1;
|
||||||
|
|
||||||
public var minValue(default, set):Null<Float>;
|
public var minValue(default, set):Null<Float>;
|
||||||
|
|
||||||
|
@ -191,9 +191,9 @@ class NumberedPreferenceItem extends PreferenceItem
|
||||||
|
|
||||||
var timeToWait:Float = 0;
|
var timeToWait:Float = 0;
|
||||||
|
|
||||||
public override function handleInput(deltaTime:Float):Void
|
public override function handleInput(elapsed:Float):Void
|
||||||
{
|
{
|
||||||
timeToWait -= deltaTime;
|
timeToWait -= elapsed;
|
||||||
|
|
||||||
if (timeToWait > 0)
|
if (timeToWait > 0)
|
||||||
{
|
{
|
||||||
|
@ -203,12 +203,12 @@ class NumberedPreferenceItem extends PreferenceItem
|
||||||
if (PlayerSettings.player1.controls.UI_RIGHT)
|
if (PlayerSettings.player1.controls.UI_RIGHT)
|
||||||
{
|
{
|
||||||
currentValue += changeRate;
|
currentValue += changeRate;
|
||||||
timeToWait = changeSpeed;
|
timeToWait = changeDelay;
|
||||||
}
|
}
|
||||||
else if (PlayerSettings.player1.controls.UI_LEFT)
|
else if (PlayerSettings.player1.controls.UI_LEFT)
|
||||||
{
|
{
|
||||||
currentValue -= changeRate;
|
currentValue -= changeRate;
|
||||||
timeToWait = changeSpeed;
|
timeToWait = changeDelay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue