From cebcf7de60f7c59f6b5e4a4090628867157af312 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Thu, 25 May 2023 16:50:58 -0600 Subject: [PATCH] only scale actors on character's first appearance --- src/hollywoo_flixel/FlxDirector.kiss | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/hollywoo_flixel/FlxDirector.kiss b/src/hollywoo_flixel/FlxDirector.kiss index b1064db..b618e00 100644 --- a/src/hollywoo_flixel/FlxDirector.kiss +++ b/src/hollywoo_flixel/FlxDirector.kiss @@ -235,16 +235,17 @@ (method :Option autoZConfig [] (Some (object zPerLayer flxMovie.STAGE_BEHIND_DY frontLayer 0))) (method :Void showCharacter [:Character character :Appearance appearance :FlxCamera camera :Continuation cc] - // TODO on the first appearance, show name and description (maybe? also probably not for all?) - // TODO also allow for manually defined flipped frames so text on clothing doesn't mirror + // Do sizing only on first appearance + (whenLet [FirstAppearance appearance] + // All actors same width, display centered on x + (character.actor.setGraphicSize flxMovie.ACTOR_WIDTH) + (character.actor.updateHitbox)) + (set character.actor.cameras [camera]) (set character.actor.flipX ?!(= character.stageFacing character.actor.defaultFacing)) // For characters whose images are forward-facing portraits, it's wrong to flip them based on facing: (when character.actor.portraitFacingForward (set character.actor.flipX false)) - // All actors same width, display centered on x - (character.actor.setGraphicSize flxMovie.ACTOR_WIDTH) - (character.actor.updateHitbox) (set character.actor.x (- character.stagePosition.x (/ character.actor.width 2)))