this.loadTexture(npc.key);
npc.kill();
this.disguise = npc;
+ logic.gameinterface.dropNoticeTimeout(Phaser.Timer.SECOND * 5, "You are now identified as " + npc.fullname + "!");
}
}
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() {
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);
tpDone(value) {
console.log("Woot-woot! Teleport complete:", value);
+ value.makeHappy();
+ logic.carlos.makeHappy();
}
}
this.text_notice.visible = true;
}
+ dropNoticeTimeout(timeout, text) {
+ this.dropNotice(text);
+ game.time.events.add(timeout, this.clearNotice, this);
+ }
+
clearNotice() {
this.back_notice.visible = false;
this.text_notice.visible = false;