hm
This commit is contained in:
parent
129c07183a
commit
5ed977788c
49 changed files with 1084 additions and 392 deletions
|
|
@ -201,20 +201,18 @@
|
|||
freezeSleepDiseaseMotion(dt = 0) {
|
||||
if (!this.sleepDisease) return false;
|
||||
const beingDraggedByAnt = Boolean((this.antDraggedTimer || 0) > 0 && this.antDraggedBy);
|
||||
const heldByPlayer = Boolean(this.playerHeld || this._heldByPlayer);
|
||||
if (!Number.isFinite(this.sleepDiseaseAnchorX)) this.sleepDiseaseAnchorX = this.x;
|
||||
if (!Number.isFinite(this.sleepDiseaseAnchorY)) this.sleepDiseaseAnchorY = this.y;
|
||||
this.startSleeping(null, beingDraggedByAnt ? "\u7720\u3063\u305f\u307e\u307e\u30a2\u30ea\u306b\u904b\u3070\u308c\u3066\u3044\u308b" : "\u306d\u3080\u308a\u75c5\u3067\u7720\u308a\u7d9a\u3051\u3066\u3044\u308b");
|
||||
this.vx = 0;
|
||||
this.vy = 0;
|
||||
if (beingDraggedByAnt) {
|
||||
this.startSleeping(null, beingDraggedByAnt ? "眠ったままアリに運ばれている" : "ねむり病で眠り続けている");
|
||||
// ねむり病は意識だけを固定し、物理位置は固定しない。
|
||||
// 以前は anchor に毎回スナップしていたため、外力・つまみ・機械接触を無視していた。
|
||||
if (heldByPlayer || beingDraggedByAnt || Math.hypot(Number(this.vx || 0) + Number(this.impulseVx || 0), Number(this.vy || 0) + Number(this.impulseVy || 0)) > 0.1) {
|
||||
this.sleepDiseaseAnchorX = this.x;
|
||||
this.sleepDiseaseAnchorY = this.y;
|
||||
} else {
|
||||
this.x = this.sleepDiseaseAnchorX;
|
||||
this.y = this.sleepDiseaseAnchorY;
|
||||
}
|
||||
this.wanderAngle = this.wanderAngle || 0;
|
||||
this.thought = beingDraggedByAnt ? "\u7720\u3063\u305f\u307e\u307e\u30a2\u30ea\u306b\u904b\u3070\u308c\u3066\u3044\u308b" : "\u306d\u3080\u308a\u75c5\u3067\u7720\u308a\u7d9a\u3051\u3066\u3044\u308b";
|
||||
this.thought = beingDraggedByAnt ? "眠ったままアリに運ばれている" : "ねむり病で眠り続けている";
|
||||
if (this.world && this.world.time > (this.nextSleepBubbleAt || 0)) {
|
||||
this.nextSleepBubbleAt = this.world.time + 5.0;
|
||||
this.world.spawnBubble?.(this.x, this.y - this.radius * 1.18, "Zzz...", "rgba(65,70,92,0.72)");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue