From 9885b03b7d1d0b2d27969345dc4f56496dbf0426 Mon Sep 17 00:00:00 2001 From: MtH Date: Sat, 13 Mar 2021 20:06:03 +0100 Subject: [PATCH] portraits before box to fix thorns intro layering issue --- source/DialogueBox.hx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index 104b10a8b..ade30a8e3 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -60,6 +60,24 @@ class DialogueBox extends FlxSpriteGroup bgFade.alpha = 0.7; }, 5); + portraitLeft = new FlxSprite(-20, 40); + portraitLeft.frames = Paths.getSparrowAtlas('weeb/senpaiPortrait'); + portraitLeft.animation.addByPrefix('enter', 'Senpai Portrait Enter', 24, false); + portraitLeft.setGraphicSize(Std.int(portraitLeft.width * PlayState.daPixelZoom * 0.9)); + portraitLeft.updateHitbox(); + portraitLeft.scrollFactor.set(); + add(portraitLeft); + portraitLeft.visible = false; + + portraitRight = new FlxSprite(0, 40); + portraitRight.frames = Paths.getSparrowAtlas('weeb/bfPortrait'); + portraitRight.animation.addByPrefix('enter', 'Boyfriend portrait enter', 24, false); + portraitRight.setGraphicSize(Std.int(portraitRight.width * PlayState.daPixelZoom * 0.9)); + portraitRight.updateHitbox(); + portraitRight.scrollFactor.set(); + add(portraitRight); + portraitRight.visible = false; + box = new FlxSprite(-20, 45); var hasDialog = false; @@ -94,24 +112,6 @@ class DialogueBox extends FlxSpriteGroup if (!hasDialog) return; - portraitLeft = new FlxSprite(-20, 40); - portraitLeft.frames = Paths.getSparrowAtlas('weeb/senpaiPortrait'); - portraitLeft.animation.addByPrefix('enter', 'Senpai Portrait Enter', 24, false); - portraitLeft.setGraphicSize(Std.int(portraitLeft.width * PlayState.daPixelZoom * 0.9)); - portraitLeft.updateHitbox(); - portraitLeft.scrollFactor.set(); - add(portraitLeft); - portraitLeft.visible = false; - - portraitRight = new FlxSprite(0, 40); - portraitRight.frames = Paths.getSparrowAtlas('weeb/bfPortrait'); - portraitRight.animation.addByPrefix('enter', 'Boyfriend portrait enter', 24, false); - portraitRight.setGraphicSize(Std.int(portraitRight.width * PlayState.daPixelZoom * 0.9)); - portraitRight.updateHitbox(); - portraitRight.scrollFactor.set(); - add(portraitRight); - portraitRight.visible = false; - box.animation.play('normalOpen'); box.setGraphicSize(Std.int(box.width * PlayState.daPixelZoom * 0.9)); box.updateHitbox();