diff --git a/flixel/input/actions/FlxAction.hx b/flixel/input/actions/FlxAction.hx index 6756e66fe1..2613175137 100644 --- a/flixel/input/actions/FlxAction.hx +++ b/flixel/input/actions/FlxAction.hx @@ -341,8 +341,7 @@ class FlxAction implements IFlxDestroyable var _x:Null = null; var _y:Null = null; - var _timestamp:Float = 0; - @:deprecated("_checked is deprecated, use triggered, instead") + var _check:Bool = false; var _checked(get, set):Bool; inline function get__checked():Bool @@ -442,13 +441,14 @@ class FlxAction implements IFlxDestroyable */ public function check():Bool { - if (_timestamp == FlxG.game.ticks) + if (_check) return triggered; // run no more than once per frame _x = null; _y = null; - _timestamp = FlxG.game.ticks; + _check = false; + triggered = false; var i = inputs != null ? inputs.length : 0; @@ -477,6 +477,7 @@ class FlxAction implements IFlxDestroyable */ public function update():Void { + _check = true; check(); }