make prop LAYER_MAX be above all layers
This commit is contained in:
@@ -295,7 +295,7 @@
|
|||||||
(let [propBottom (+ prop.y prop.height)]
|
(let [propBottom (+ prop.y prop.height)]
|
||||||
(when (> propBottom DIALOG_Y)
|
(when (> propBottom DIALOG_Y)
|
||||||
(-= prop.y (- propBottom DIALOG_Y)))))
|
(-= prop.y (- propBottom DIALOG_Y)))))
|
||||||
(.add (nth currentState.spriteLayers SceneFlxState.LAYER_MAX) prop)))
|
(currentState.add prop)))
|
||||||
(cc))
|
(cc))
|
||||||
|
|
||||||
(method :Void smartShowPropOnScreen [:FlxSprite prop :Int layer :RelativePosition rpos :Continuation cc]
|
(method :Void smartShowPropOnScreen [:FlxSprite prop :Int layer :RelativePosition rpos :Continuation cc]
|
||||||
@@ -306,7 +306,10 @@
|
|||||||
(SpriteTools.scaleStampOn prop canvas rpos)
|
(SpriteTools.scaleStampOn prop canvas rpos)
|
||||||
(set prop.x x)
|
(set prop.x x)
|
||||||
(set prop.y y)
|
(set prop.y y)
|
||||||
(.add (nth currentState.spriteLayers layer) prop)))
|
(if (= layer SceneFlxState.LAYER_MAX)
|
||||||
|
// In front of everything:
|
||||||
|
~(currentState.add prop)
|
||||||
|
(.add (nth currentState.spriteLayers layer) prop))))
|
||||||
(cc))
|
(cc))
|
||||||
|
|
||||||
(method :Void showPropOnScreen [:FlxSprite prop :FlxScreenPosition position :Continuation cc]
|
(method :Void showPropOnScreen [:FlxSprite prop :FlxScreenPosition position :Continuation cc]
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
(super)
|
(super)
|
||||||
(add setSprite)
|
(add setSprite)
|
||||||
// TODO characters will be in front of every prop layer -- characters need their own group layer
|
// TODO characters will be in front of every prop layer -- characters need their own group layer
|
||||||
(doFor i (range (+ 1 LAYER_MAX))
|
(doFor i (range LAYER_MAX)
|
||||||
(let [g (new FlxTypedGroup<FlxSprite>)]
|
(let [g (new FlxTypedGroup<FlxSprite>)]
|
||||||
(spriteLayers.push g)
|
(spriteLayers.push g)
|
||||||
(add g))))
|
(add g))))
|
||||||
|
Reference in New Issue
Block a user