X-Git-Url: http://git.megabrutal.com/?p=wgj58.git;a=blobdiff_plain;f=wgj58.js;h=49ebc06791d9c18e20abf986c5f81ec8308efa1c;hp=8885d24f3092fd3fbd9562f532c968cddae8070c;hb=3273037b9e3a6188af7d24df0109abd21f885ed9;hpb=dab18eb4e583ec4cf793cc37afa9354cf9f7a2d8 diff --git a/wgj58.js b/wgj58.js index 8885d24..49ebc06 100644 --- a/wgj58.js +++ b/wgj58.js @@ -235,7 +235,6 @@ class NPC_Clara extends GameNPC { { actor: this, text: "If I had no card, would I still exist?" }, { actor: logic.player, text: "..." }, { actor: logic.player, text: "You sound very philosophical today." } ] )); - logic.closeDoor("cutedoor"); break; case 2: case 3: @@ -278,6 +277,13 @@ class NPC_Clara extends GameNPC { } } +class NPC_Carlos extends GameNPC { + actionTalk() { + super.actionTalk(); + logic.endTalk(); + } +} + class GameInterface extends Phaser.Group { constructor(game, parent) { @@ -470,6 +476,10 @@ class GameLogic { newChar = new NPC_Clara(object.x, object.y, 'clara', "Clara", "Clara Tnavelerri", 200); this.clara = newChar; break; + case 'carlos': + newChar = new NPC_Carlos(object.x, object.y, 'carlos', "Carlos", "Carlos Elbacalper", 150); + this.carlos = newChar; + break; default: console.error("Unknown character:", object); } @@ -558,6 +568,7 @@ class GamePlay extends Phaser.State { game.load.image('player', 'john.png'); game.load.image('clara', 'clara.png'); + game.load.image('carlos', 'carlos.png'); game.load.image('saiki', 'saiki.png'); game.load.image('tileset', 'tileset.png'); game.load.image('objects', 'objects.png');