buggy label/skip system for hollywooFlixel
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
(currentState.close))
|
(currentState.close))
|
||||||
// TODO on the first appearance, give a super (for some scenes but probably not others... hm....)
|
// TODO on the first appearance, give a super (for some scenes but probably not others... hm....)
|
||||||
(set currentState (cast scene SceneFlxState))
|
(set currentState (cast scene SceneFlxState))
|
||||||
|
(set currentState.parent FlxG.state)
|
||||||
(FlxG.state.openSubState currentState)
|
(FlxG.state.openSubState currentState)
|
||||||
(cc))
|
(cc))
|
||||||
|
|
||||||
|
|||||||
@@ -21,3 +21,14 @@
|
|||||||
(let [propSprite (new FlxSprite 0 0)]
|
(let [propSprite (new FlxSprite 0 0)]
|
||||||
(propSprite.loadGraphic path)
|
(propSprite.loadGraphic path)
|
||||||
(newProp name propSprite)))
|
(newProp name propSprite)))
|
||||||
|
|
||||||
|
(method :Void update [:Float elapsed]
|
||||||
|
// TODO CCs queued to timers will still be called
|
||||||
|
(#when debug
|
||||||
|
(when FlxG.keys.justPressed.N
|
||||||
|
(doFor [idx label] (enumerate labels)
|
||||||
|
(when (> label lastInstructionPointer)
|
||||||
|
(doFor =>labelName labelIdx labelsByName
|
||||||
|
(when (= labelIdx label) (trace "SKIPPING TO $labelName")))
|
||||||
|
(runInstruction label)
|
||||||
|
(break))))))
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package hollywoo_flixel;
|
package hollywoo_flixel;
|
||||||
|
|
||||||
import flixel.FlxState;
|
import flixel.FlxState;
|
||||||
|
import kiss.Prelude;
|
||||||
|
|
||||||
@:build(kiss.Kiss.build())
|
@:build(kiss.Kiss.build())
|
||||||
class MovieFlxState extends FlxState {}
|
class MovieFlxState extends FlxState {}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package hollywoo_flixel;
|
|||||||
import kiss.Prelude;
|
import kiss.Prelude;
|
||||||
import kiss.List;
|
import kiss.List;
|
||||||
import flixel.FlxSubState;
|
import flixel.FlxSubState;
|
||||||
|
import flixel.FlxState;
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
import hollywoo.Scene;
|
import hollywoo.Scene;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
(defNew [&prop :FlxSprite setSprite &prop :SceneTime time &prop :ScenePerspective perspective]
|
(defNew [&prop :FlxSprite setSprite &prop :SceneTime time &prop :ScenePerspective perspective]
|
||||||
[
|
[
|
||||||
|
&mut :FlxState parent null
|
||||||
:Map<String,Character<FlxStagePosition,FlxStageFacing,ActorFlxSprite>> characters (new Map)
|
:Map<String,Character<FlxStagePosition,FlxStageFacing,ActorFlxSprite>> characters (new Map)
|
||||||
:Map<FlxSprite,FlxScreenPosition> propsOnScreen (new Map)
|
:Map<FlxSprite,FlxScreenPosition> propsOnScreen (new Map)
|
||||||
]
|
]
|
||||||
@@ -15,4 +16,6 @@
|
|||||||
(setSprite.screenCenter))
|
(setSprite.screenCenter))
|
||||||
|
|
||||||
(method &override :Void update [:Float elapsed]
|
(method &override :Void update [:Float elapsed]
|
||||||
|
(when parent
|
||||||
|
(parent.update elapsed))
|
||||||
(super.update elapsed))
|
(super.update elapsed))
|
||||||
Reference in New Issue
Block a user