Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
Update DialogueBox.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
AnimatingLegend committed Jul 22, 2022
1 parent 2fa8848 commit ee94efc
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions source/DialogueBox.hx
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,6 @@ 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;
Expand Down Expand Up @@ -113,7 +95,25 @@ 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();
Expand Down Expand Up @@ -156,10 +156,9 @@ class DialogueBox extends FlxSpriteGroup

if (PlayState.SONG.song.toLowerCase() == 'thorns')
{
portraitLeft.visible = false;
portraitLeft.color = FlxColor.BLACK;
swagDialogue.color = FlxColor.WHITE;
dropText.color = FlxColor.BLACK;
portraitLeft.visible = false;
}

dropText.text = swagDialogue.text;
Expand Down

0 comments on commit ee94efc

Please sign in to comment.