Update haptic values to compensate for default 1 multiplier
This commit is contained in:
@@ -211,7 +211,7 @@ class Preferences
|
||||
|
||||
static function get_hapticsIntensityMultiplier():Float
|
||||
{
|
||||
return Save?.instance?.options?.hapticsIntensityMultiplier ?? 2.5;
|
||||
return Save?.instance?.options?.hapticsIntensityMultiplier ?? 1;
|
||||
}
|
||||
|
||||
static function set_hapticsIntensityMultiplier(value:Float):Float
|
||||
|
||||
@@ -66,7 +66,7 @@ class FunkinBackButton extends FunkinButton
|
||||
held = true;
|
||||
|
||||
FlxTween.cancelTweensOf(this);
|
||||
HapticUtil.vibrate(0, 0.01, 0.2);
|
||||
HapticUtil.vibrate(0, 0.01, 0.5);
|
||||
animation.play('hold');
|
||||
|
||||
alpha = 1;
|
||||
|
||||
@@ -536,7 +536,7 @@ class PauseSubState extends MusicBeatSubState
|
||||
FlxTween.tween(pauseCircle, {alpha: 0}, 0.6, {ease: FlxEase.quartOut});
|
||||
|
||||
hapticTimer.start(0.2, function(_) {
|
||||
HapticUtil.vibrate(0, 0.01, 0.2);
|
||||
HapticUtil.vibrate(0, 0.01, 0.5);
|
||||
});
|
||||
|
||||
dataFadeTimer.start(0.3, function(_) {
|
||||
@@ -640,12 +640,12 @@ class PauseSubState extends MusicBeatSubState
|
||||
if (i == currentEntry)
|
||||
{
|
||||
currentMenuEntries[currentEntry].callback(this);
|
||||
HapticUtil.vibrate(0, 0.05, 0.5);
|
||||
HapticUtil.vibrate(0, 0.05, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
changeSelection(i - currentEntry);
|
||||
HapticUtil.vibrate(0, 0.01, 0.2);
|
||||
HapticUtil.vibrate(0, 0.01, 0.5);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -773,7 +773,7 @@ class ResultState extends MusicBeatSubState
|
||||
// GF slams into the wall.
|
||||
if (atlas.sprite.anim.curFrame == 51)
|
||||
{
|
||||
HapticUtil.vibrate(0, 0.01, Constants.MAX_VIBRATION_AMPLITUDE / 3);
|
||||
HapticUtil.vibrate(0, 0.01, (Constants.MAX_VIBRATION_AMPLITUDE / 3) * 2.5);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -797,7 +797,7 @@ class ResultState extends MusicBeatSubState
|
||||
// Pico shoots.
|
||||
if (atlas.sprite.anim.curFrame == 45)
|
||||
{
|
||||
HapticUtil.vibrate(0, 0.01, Constants.MAX_VIBRATION_AMPLITUDE / 3);
|
||||
HapticUtil.vibrate(0, 0.01, (Constants.MAX_VIBRATION_AMPLITUDE / 3) * 2.5);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class NoteVibrationsHandler
|
||||
|
||||
if (stackingAmplitude > Constants.MAX_VIBRATION_AMPLITUDE) stackingAmplitude = Constants.MAX_VIBRATION_AMPLITUDE;
|
||||
|
||||
if (stackingAmplitude > 0) HapticUtil.vibrate(0, 0.01, stackingAmplitude, 1, [HapticsMode.ALL, HapticsMode.NOTES_ONLY]);
|
||||
if (stackingAmplitude > 0) HapticUtil.vibrate(0, 0.01, stackingAmplitude * 2.5, 1, [HapticsMode.ALL, HapticsMode.NOTES_ONLY]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,7 +84,7 @@ class NoteVibrationsHandler
|
||||
|
||||
if (stackingAmplitude > Constants.MAX_VIBRATION_AMPLITUDE) stackingAmplitude = Constants.MAX_VIBRATION_AMPLITUDE;
|
||||
|
||||
if (stackingAmplitude > 0) HapticUtil.vibrate(0, 0.01, stackingAmplitude, 1, [HapticsMode.ALL, HapticsMode.NOTES_ONLY]);
|
||||
if (stackingAmplitude > 0) HapticUtil.vibrate(0, 0.01, stackingAmplitude * 2.5, 1, [HapticsMode.ALL, HapticsMode.NOTES_ONLY]);
|
||||
|
||||
for (currentNoteStatus in noteStatuses)
|
||||
{
|
||||
|
||||
@@ -123,7 +123,7 @@ class Save
|
||||
zoomCamera: true,
|
||||
debugDisplay: false,
|
||||
hapticsMode: 'All',
|
||||
hapticsIntensityMultiplier: 2.5,
|
||||
hapticsIntensityMultiplier: 1,
|
||||
autoPause: true,
|
||||
vsyncMode: 'Off',
|
||||
strumlineBackgroundOpacity: 0,
|
||||
@@ -1557,7 +1557,7 @@ typedef SaveDataOptions =
|
||||
|
||||
/**
|
||||
* Multiplier of intensity for all the haptic feedback effects.
|
||||
* @default `2.5`
|
||||
* @default `1`
|
||||
*/
|
||||
var hapticsIntensityMultiplier:Float;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ class MenuTypedList<T:MenuListItem> extends FlxTypedGroup<T>
|
||||
{
|
||||
// Pause input variable
|
||||
public static var pauseInput:Bool = false;
|
||||
|
||||
public var selectedIndex(default, null):Int = 0;
|
||||
public var selectedItem(get, never):T;
|
||||
|
||||
@@ -180,7 +181,7 @@ class MenuTypedList<T:MenuListItem> extends FlxTypedGroup<T>
|
||||
item.scale.set(1.1, 1.1);
|
||||
FlxTween.tween(item.scale, {x: 1, y: 1}, 0.3, {ease: FlxEase.backOut});
|
||||
|
||||
HapticUtil.vibrate(0, 0.05, 0.5);
|
||||
HapticUtil.vibrate(0, 0.05, 1);
|
||||
accept();
|
||||
}
|
||||
else
|
||||
@@ -189,7 +190,7 @@ class MenuTypedList<T:MenuListItem> extends FlxTypedGroup<T>
|
||||
item.scale.set(0.94, 0.94);
|
||||
FlxTween.tween(item.scale, {x: 1, y: 1}, 0.3, {ease: FlxEase.backOut});
|
||||
|
||||
HapticUtil.vibrate(0, 0.01, 0.2);
|
||||
HapticUtil.vibrate(0, 0.01, 0.5);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1630,7 +1630,7 @@ class FreeplayState extends MusicBeatSubState
|
||||
if (dj != null) FlxG.watch.addQuick('dj-anim', dj.getCurrentAnimation());
|
||||
|
||||
// If the allowPicoBulletsVibration is true, trigger vibration each update (for pico shooting bullets animation).
|
||||
if (allowPicoBulletsVibration) HapticUtil.vibrate(0, 0.01, Constants.MAX_VIBRATION_AMPLITUDE / 3);
|
||||
if (allowPicoBulletsVibration) HapticUtil.vibrate(0, 0.01, (Constants.MAX_VIBRATION_AMPLITUDE / 3) * 2.5);
|
||||
}
|
||||
|
||||
var _dragOffset:Float = 0;
|
||||
@@ -1830,7 +1830,7 @@ class FreeplayState extends MusicBeatSubState
|
||||
curSelected = i;
|
||||
changeSelection(0);
|
||||
FunkinSound.playOnce(Paths.sound('scrollMenu'), 0.4);
|
||||
HapticUtil.vibrate(0, 0.01, 0.2);
|
||||
HapticUtil.vibrate(0, 0.01, 0.5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1991,7 +1991,7 @@ class FreeplayState extends MusicBeatSubState
|
||||
// If we press onto our difficulty, we want to "grab" it rather than simply check if we are overlapping
|
||||
if (TouchUtil.overlapsComplex(currentDifficultySprite, funnyCam) && TouchUtil.justPressed && !draggingDifficulty)
|
||||
{
|
||||
HapticUtil.vibrate(0, 0.01, 0.15, 0.4);
|
||||
HapticUtil.vibrate(0, 0.01, 0.375, 0.4);
|
||||
draggingDifficulty = true;
|
||||
}
|
||||
|
||||
@@ -2004,7 +2004,7 @@ class FreeplayState extends MusicBeatSubState
|
||||
var vibDist:Float = 5; // essentially how far the touch needs to be before it will trigger a tiny haptic feel
|
||||
if (Std.int((TouchUtil.touch.x - _dragOffset) / vibDist) * vibDist != _prevRoundedDragOffset)
|
||||
{
|
||||
HapticUtil.vibrate(0, 0.01, 0.08, 0.8);
|
||||
HapticUtil.vibrate(0, 0.01, 0.2, 0.8);
|
||||
}
|
||||
_prevRoundedDragOffset = Std.int((TouchUtil.touch.x - _dragOffset) / vibDist) * vibDist;
|
||||
|
||||
@@ -2216,7 +2216,7 @@ class FreeplayState extends MusicBeatSubState
|
||||
}
|
||||
if (change != 0)
|
||||
{
|
||||
HapticUtil.vibrate(0, 0.01, 0.2, 0.1);
|
||||
HapticUtil.vibrate(0, 0.01, 0.5, 0.1);
|
||||
FunkinSound.playOnce(Paths.sound('scrollMenu'), 0.4);
|
||||
}
|
||||
|
||||
@@ -2579,7 +2579,7 @@ class FreeplayState extends MusicBeatSubState
|
||||
|
||||
// A single vibration.
|
||||
default:
|
||||
HapticUtil.vibrate(Constants.DEFAULT_VIBRATION_PERIOD, Constants.DEFAULT_VIBRATION_DURATION * 5, Constants.MAX_VIBRATION_AMPLITUDE / 3);
|
||||
HapticUtil.vibrate(Constants.DEFAULT_VIBRATION_PERIOD, Constants.DEFAULT_VIBRATION_DURATION * 5, (Constants.MAX_VIBRATION_AMPLITUDE / 3) * 2.5);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2659,7 +2659,7 @@ class FreeplayState extends MusicBeatSubState
|
||||
if (curSelected != prevSelected)
|
||||
{
|
||||
FunkinSound.playOnce(Paths.sound('scrollMenu'), 0.4);
|
||||
HapticUtil.vibrate(0, 0.01, 0.2);
|
||||
HapticUtil.vibrate(0, 0.01, 0.5);
|
||||
dj?.resetAFKTimer();
|
||||
_pressedOnSelected = false;
|
||||
}
|
||||
@@ -2738,7 +2738,7 @@ class FreeplayState extends MusicBeatSubState
|
||||
}
|
||||
|
||||
// Small vibrations every selection change.
|
||||
if (change != 0) HapticUtil.vibrate(0, 0.01, 0.2);
|
||||
if (change != 0) HapticUtil.vibrate(0, 0.01, 0.5);
|
||||
}
|
||||
|
||||
public function playCurSongPreview(?daSongCapsule:SongMenuItem):Void
|
||||
|
||||
@@ -614,7 +614,7 @@ class Constants
|
||||
/**
|
||||
* Min vibration amplitude.
|
||||
*/
|
||||
public inline static final MIN_VIBRATION_AMPLITUDE:Float = 0.1;
|
||||
public inline static final MIN_VIBRATION_AMPLITUDE:Float = 0.25;
|
||||
|
||||
/**
|
||||
* Default vibration amplitude.
|
||||
|
||||
Reference in New Issue
Block a user