mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-18 18:47:48 +00:00
Make cars stop moving while the game is paused.
This commit is contained in:
parent
66b45b526f
commit
6edd9e8c6a
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit 5a743b52ed0a1e80c489b580a3af0470c31dcf9c
|
||||
Subproject commit e1a3527e098910d34763b6a2f7f3f4242d13f2b9
|
36
source/funkin/util/FlxTweenUtil.hx
Normal file
36
source/funkin/util/FlxTweenUtil.hx
Normal file
|
@ -0,0 +1,36 @@
|
|||
package funkin.util;
|
||||
|
||||
import flixel.addons.plugin.taskManager.FlxTask;
|
||||
import flixel.tweens.FlxTween;
|
||||
import flixel.tweens.FlxEase;
|
||||
|
||||
class FlxTweenUtil
|
||||
{
|
||||
public static function pauseTween(tween:FlxTween):Void
|
||||
{
|
||||
if (tween != null)
|
||||
{
|
||||
tween.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
public static function resumeTween(tween:FlxTween):Void
|
||||
{
|
||||
if (tween != null)
|
||||
{
|
||||
tween.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static function pauseTweensOf(Object:Dynamic, ?FieldPaths:Array<String>):Void
|
||||
{
|
||||
@:privateAccess
|
||||
FlxTween.globalManager.forEachTweensOf(Object, FieldPaths, pauseTween);
|
||||
}
|
||||
|
||||
public static function resumeTweensOf(Object:Dynamic, ?FieldPaths:Array<String>):Void
|
||||
{
|
||||
@:privateAccess
|
||||
FlxTween.globalManager.forEachTweensOf(Object, FieldPaths, resumeTween);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue