Skip to content

Commit

Permalink
Place repeat phrases befor actual repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad committed Oct 4, 2020
1 parent 49c4da9 commit 2fdeefe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions source/Level.hx
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,19 @@ class Level extends FlxState
s.tutorialListened = true;
var phrases:Array<Dialog.Phrase> = [];
var dummyFairy = new Fairy(0, 0, 0);

if (s.run > 0 && s.nastyDealsDone() <= 0)
{
var dummyPlayer = new DummyPlayer(0, 0, 0);
phrases.push(new Dialog.Phrase(dummyPlayer, "There should be a way to escape..."));
phrases.push(new Dialog.Phrase(dummyPlayer, "Maybe I need to act a little... different?"));
}
phrases.push(new Dialog.Phrase(dummyFairy, "Hello, brave hero!\n\n(press [SPACE] to go to next phrase)"));
phrases.push(new Dialog.Phrase(dummyFairy, "I'll be your little advisor!"));
phrases.push(new Dialog.Phrase(dummyFairy, "You can use ARROW KEYS to move around."));
phrases.push(new Dialog.Phrase(dummyFairy, "We've got our princess kidnapped, and so we need your help to rescue her!"));
phrases.push(new Dialog.Phrase(dummyFairy, "Now go to the next room and listen to the old wiseacre!"));

if (s.run > 0 && s.nastyDealsDone() <= 0) {
var dummyPlayer = new DummyPlayer(0, 0, 0);
phrases.push(new Dialog.Phrase(dummyPlayer, "There should be a way to escape..."));
phrases.push(new Dialog.Phrase(dummyPlayer, "Maybe I need to act a little... different?"));
}
if (phrases.length > 0)
{
openSubState(new Dialog(phrases));
Expand Down
2 changes: 1 addition & 1 deletion source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Main extends Sprite
public function new()
{
super();
addChild(new FlxGame(320, 224, Level, 2, 60, 60, true));
addChild(new FlxGame(320, 224, MainMenuState, 2, 60, 60, true));
}
}

0 comments on commit 2fdeefe

Please sign in to comment.