Skip to content

Commit

Permalink
534098435098453209
Browse files Browse the repository at this point in the history
  • Loading branch information
ChromaSen committed May 27, 2024
1 parent ab68a6f commit db665d3
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 32 deletions.
12 changes: 8 additions & 4 deletions assets/songs/behold-the-apocalypse/midsongdialogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@
{
"portrait": "senpai",
"expression": "Senpai Portrait Enter",
"text": "Mph.."
"text": "Mph..",
"speed":1
},
{
"portrait": "senpai",
"expression": "Senpai Portrait Enter",
"text": "Very well, boy.."
"text": "Very well, boy..",
"speed":0.9
},
{
"text": "You've earned my respect."
"text": "You've earned my respect.",
"speed":1.2
},
{
"portrait": "senpai",
"expression": "Senpai Portrait Enter",
"text": "But let's see if you can really keep up!"
"text": "But let's see if you can really keep up!",
"speed":1.4
}
]
}
2 changes: 1 addition & 1 deletion source/gameObjects/userInterface/ClassHUD.hx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ClassHUD extends FlxTypedGroup<FlxBasic>

healthBar = new FlxBar(healthBarBG.x + 4, healthBarBG.y + 4, RIGHT_TO_LEFT, Std.int(healthBarBG.width - 8), Std.int(healthBarBG.height - 8));
healthBar.scrollFactor.set();
// healthBar.createFilledBar(CoolUtil.getDominantIconColour(PlayState.dadOpponent.curCharacter), CoolUtil.getDominantIconColour(PlayState.boyfriend.curCharacter));
healthBar.createFilledBar(CoolUtil.getDominantIconColour(PlayState.dadOpponent.curCharacter), CoolUtil.getDominantIconColour(PlayState.boyfriend.curCharacter));
// healthBar
add(healthBar);

Expand Down
5 changes: 4 additions & 1 deletion source/gameObjects/userInterface/DialogueBox.hx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ class DialogueBox extends FlxSpriteGroup
skipText.borderStyle = FlxTextBorderStyle.OUTLINE;
skipText.borderColor = FlxColor.BLACK;
skipText.borderSize = 3;
skipText.alpha=!PlayState.midsongdia?1:0;


skipText.screenCenter(X);
add(skipText);
Expand Down Expand Up @@ -206,11 +208,12 @@ class DialogueBox extends FlxSpriteGroup
// Set the text to nothing for now
alphabetText.startText('', true);
// To prevent awkward text not against a dialogue background, a quick fix is to delay the initial text
new FlxTimer().start(0.375, function(tmr:FlxTimer)
new FlxTimer().start(0.375, function(tmr:FlxTimer)
{
textStarted = true;
startText();
});

}
// If the text has started, build the text
else
Expand Down
48 changes: 22 additions & 26 deletions source/meta/state/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -660,16 +660,16 @@ class PlayState extends MusicBeatState
{
// wheee the shift closes the dialogue
if(!midsongdia){
if (FlxG.keys.justPressed.SHIFT)
dialogueBox.closeDialog();
if (FlxG.keys.justPressed.SHIFT){dialogueBox.closeDialog();}

}
// the change I made was just so that it would only take accept inputs
if (controls.ACCEPT && dialogueBox.textStarted)
if (controls.ACCEPT && dialogueBox.textStarted && !midsongdia)
{
dialogueBox.curPage += 1;
trace(dialogueBox.curPage);

if (dialogueBox.curPage == dialogueBox.dialogueData.dialogue.length)
if (dialogueBox.curPage == dialogueBox.dialogueData.dialogue.length&&!midsongdia)
dialogueBox.closeDialog()
else
dialogueBox.updateDialog();
Expand Down Expand Up @@ -706,13 +706,13 @@ class PlayState extends MusicBeatState
else
Main.switchState(this, new AnimationDebug(boyfriend.curCharacter));
}
if ((FlxG.keys.justPressed.SIX))
}
if ((FlxG.keys.justPressed.SIX))
{
boyfriendStrums.autoplay = !boyfriendStrums.autoplay;
uiHUD.autoplayMark.visible = boyfriendStrums.autoplay;
PlayState.SONG.validScore = false;
}
}
///*
if (startingSong)
{
Expand Down Expand Up @@ -1799,50 +1799,36 @@ class PlayState extends MusicBeatState
FlxTween.tween(camGame,{alpha:0},0.8);
FlxTween.tween(camHUD,{alpha:0},0.8);
case 1544:

var midsongdialoguepath=Paths.json('behold-the-apocalypse/midsongdialogue');
dialogueBox = DialogueBox.createDialogue(sys.io.File.getContent(midsongdialoguepath));
trace(dialogueBox);
dialogueBox.cameras = [dialogueHUD];
case 1548:
midsongdia=true;
case 1548:
add(dialogueBox);
//case 1549:
case 1558:
dialogueBox.curPage+=1;
trace(dialogueBox.curPage);
case 1585:
dialogueBox.curPage+=1;
trace(dialogueBox.curPage);

case 1621:
dialogueBox.curPage+=1;
trace(dialogueBox.curPage);
dadStrums.visible=boyfriendStrums.visible=false;

case 1635:
//dont ask pls
dadOpponent.setCharacter(88.05, 289.1,'gd-true');
dadOpponent.setPosition(150,314.1);
boyfriend.setCharacter(1029.7,709.1,'bf-guitar');
boyfriend.setPosition(959.7,714.1);
case 1646:
midsongdia=false;
closemidsong();
case 1650:
FlxTween.tween(camGame,{alpha:1},0.8,{ease:FlxEase.cubeOut});
FlxTween.tween(camHUD,{alpha:1},0.8,{ease:FlxEase.cubeIn});
midsongdia=false;
closemidsong();
case 1653:
FlxTween.tween(grandpaspeech,{alpha:0},0.8,{ease:FlxEase.quartInOut});
case 1664:
case 1664,1984:
defaultCamZoom=0.75;
case 1792:
tweenCam(0.6,1.4);
case 1808:
defaultCamZoom=0.7;
case 1936:
defaultCamZoom=0.65;
case 1984:
defaultCamZoom=0.75;
case 2064:
defaultCamZoom=0.6;
case 2176:
Expand All @@ -1855,9 +1841,18 @@ class PlayState extends MusicBeatState
case 2715:
bta.animation.play('bta',false);
case 2720:camGame.alpha=0;
case 2726:
case 2724:
bta.alpha=1;
}

//uhh......
if (curStep>=1558&&curStep<=1621&&dialogueBox!=null&&(curStep==1558||curStep==1585||curStep==1621)){
dialogueBox.curPage+=1;
dialogueBox.updateDialog();
trace(dialogueBox.curPage);
}


}
}

Expand Down Expand Up @@ -2158,6 +2153,7 @@ class PlayState extends MusicBeatState

public function closemidsong(){
dialogueBox.kill();dialogueBox.alphabetText.playSounds = false;
dadStrums.visible=boyfriendStrums.visible=true;
}

public function songIntroCutscene()
Expand Down

0 comments on commit db665d3

Please sign in to comment.