X-Git-Url: http://git.megabrutal.com/?p=wgj58.git;a=blobdiff_plain;f=wgj58.js;h=b3f6ac13743ee93606539ac2030ff31dbc0e1c83;hp=78cd42b4726f0c8bbda38238777fb2584f2b5f16;hb=d493781f63495c7400d2dd03f2a2e7cfdfe2bdfe;hpb=a5638053c6184d5a40f2c801a25362abc9a85f9f diff --git a/wgj58.js b/wgj58.js index 78cd42b..b3f6ac1 100644 --- a/wgj58.js +++ b/wgj58.js @@ -160,6 +160,7 @@ class Player extends Phaser.Sprite { this.loadTexture(npc.key); npc.kill(); this.disguise = npc; + logic.gameinterface.dropNotice("You are now identified as " + npc.fullname + "!"); } } @@ -172,11 +173,13 @@ class GameNPC extends Phaser.Sprite { this.interaction_distance = interaction_distance; this.interactable = false; this.talkcount = 0; + this.happy = false; } kill() { super.kill(); this.exists = false; + this.happy = false; // Dead people are not happy. } update() { @@ -215,6 +218,11 @@ class GameNPC extends Phaser.Sprite { return true; } + makeHappy() { + this.happy = true; + console.log(this.shortname, "is happy!"); + } + offscreenTeleportation(newPosition, callback, callbackValue) { this.teleport_instructions = { newPosition: newPosition, callback: callback, callbackValue: callbackValue }; console.log("Offscreen teleport request registered:", this.teleport_instructions); @@ -508,6 +516,8 @@ class NPC_Saiki extends GameNPC { tpDone(value) { console.log("Woot-woot! Teleport complete:", value); + value.makeHappy(); + logic.carlos.makeHappy(); } }