diff --git a/src/hollywoo_flixel/ActorFlxSprite.kiss b/src/hollywoo_flixel/ActorFlxSprite.kiss index 3391d01..fd12502 100644 --- a/src/hollywoo_flixel/ActorFlxSprite.kiss +++ b/src/hollywoo_flixel/ActorFlxSprite.kiss @@ -1,7 +1,7 @@ -(defNew [:String assetPath &opt :Int frameWidth :Int frameHeight :Map animations] +(defNew [:String assetPath &opt frameWidth frameHeight :Map animations] (super) (if (and frameWidth frameHeight) - (loadGraphic assetPath frameWidth frameHeight) + (loadGraphic assetPath true frameWidth frameHeight) (loadGraphic assetPath)) (when animations (doFor =>name animationArgs animations diff --git a/src/hollywoo_flixel/FlxDirector.kiss b/src/hollywoo_flixel/FlxDirector.kiss index 06e5fcd..221f9cb 100644 --- a/src/hollywoo_flixel/FlxDirector.kiss +++ b/src/hollywoo_flixel/FlxDirector.kiss @@ -11,11 +11,24 @@ (set actionManager.resetOnStateSwitch NONE)) (method :Void showScene [:Scene scene :Appearance appearance :Continuation cc] + // TODO on the first appearance, give a super (for some scenes but probably not others... hm....) (FlxG.switchState (cast scene SceneFlxState)) (cc)) +(var STAGE_LEFT_X 40) +(var STAGE_RIGHT_X 1240) +(var ACTOR_Y 500) + (method :Void showCharacter [:Character character :Appearance appearance :Continuation cc] - (print "Character shneezy") + // TODO on the first appearance, show name and description (maybe? also probably not for all?) + // TODO flip sprite if facing left, and also allow for manually defined flipped frames so text doesn't mirror + (set character.actor.x (case character.stagePosition + (Left + STAGE_LEFT_X) + (Right + STAGE_RIGHT_X))) + (set character.actor.y ACTOR_Y) + (FlxG.state.add character.actor) (cc)) (prop &mut :Null nextCC)