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();
}
}