projects
/
wgj58.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add method to reset talk count
[wgj58.git]
/
wgj58.js
diff --git
a/wgj58.js
b/wgj58.js
index 6ec551c4b34c71cdb37dffb4dba47ad5754d2365..2c503f0829a15065ad0859591ef4640b72353a0f 100644
(file)
--- a/
wgj58.js
+++ b/
wgj58.js
@@
-172,7
+172,7
@@
class GameNPC extends Phaser.Sprite {
this.fullname = fullname;
this.interaction_distance = interaction_distance;
this.interactable = false;
this.fullname = fullname;
this.interaction_distance = interaction_distance;
this.interactable = false;
- this.
talkcount = 0
;
+ this.
resetTalk()
;
this.happy = false;
}
this.happy = false;
}
@@
-218,6
+218,10
@@
class GameNPC extends Phaser.Sprite {
return true;
}
return true;
}
+ resetTalk() {
+ this.talkcount = 0;
+ }
+
makeHappy() {
this.happy = true;
console.log(this.shortname, "is happy!");
makeHappy() {
this.happy = true;
console.log(this.shortname, "is happy!");