Spaces:
Running
Running
cutechicken
commited on
Commit
โข
af4bb6b
1
Parent(s):
a915f93
Update game.js
Browse files
game.js
CHANGED
@@ -1004,6 +1004,8 @@ checkPathClear(start, end) {
|
|
1004 |
this.aiState.searchStartTime = null;
|
1005 |
}
|
1006 |
}
|
|
|
|
|
1007 |
|
1008 |
if (currentTime - this.aiState.lastStateChange > this.aiState.stateChangeCooldown) {
|
1009 |
if (this.health < 30) {
|
|
|
1004 |
this.aiState.searchStartTime = null;
|
1005 |
}
|
1006 |
}
|
1007 |
+
// ์ํ ๋ณ๊ฒฝ ์ฟจ๋ค์ด์ 2์ด๋ก ์ค์
|
1008 |
+
const stateChangeCooldown = 2000;
|
1009 |
|
1010 |
if (currentTime - this.aiState.lastStateChange > this.aiState.stateChangeCooldown) {
|
1011 |
if (this.health < 30) {
|