HabitState.nextFrame()
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
using StringTools;
|
using StringTools;
|
||||||
|
import haxe.Constraints;
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
|
|||||||
@@ -47,6 +47,13 @@
|
|||||||
(prop &mut t 1)
|
(prop &mut t 1)
|
||||||
(prop :FlxRect disableMouse (new FlxRect 0 0 0 0))
|
(prop :FlxRect disableMouse (new FlxRect 0 0 0 0))
|
||||||
(method &override :Void update [:Float elapsed]
|
(method &override :Void update [:Float elapsed]
|
||||||
|
(prop :Array<Function> nextFrameFunctions [])
|
||||||
|
(method nextFrame [:Function f]
|
||||||
|
(nextFrameFunctions.push f))
|
||||||
|
(when nextFrameFunctions
|
||||||
|
(whileLet [f (nextFrameFunctions.shift)]
|
||||||
|
(f)))
|
||||||
|
|
||||||
// workaround for text box somehow losing focus:
|
// workaround for text box somehow losing focus:
|
||||||
(when entryNameText (set entryNameText.hasFocus true))
|
(when entryNameText (set entryNameText.hasFocus true))
|
||||||
(super.update elapsed)
|
(super.update elapsed)
|
||||||
|
|||||||
Reference in New Issue
Block a user