update spirit

This commit is contained in:
jakciehan
2026-06-07 22:10:03 +08:00
parent 427a33c55b
commit 9c57deff6d
82 changed files with 5465 additions and 149 deletions
+3
View File
@@ -80,13 +80,16 @@ export class JumpController {
/** Called on `jumpPressed` UI event. */
public pressJump(nowMs: number): IJumpDispatchResult {
if (!this.motion.isGrounded) {
console.log('[JumpController] pressJump REJECTED — airborne, phase=', this.phase);
return { phase: this.phase, height: 0, horizontalImpulse: 0, reason: 'airborne' };
}
if (this.phase !== 'idle') {
console.log('[JumpController] pressJump REJECTED — phase=', this.phase, ', not idle');
return { phase: this.phase, height: 0, horizontalImpulse: 0, reason: 'already_in_jump' };
}
this.phase = 'charging';
this.pressTs = nowMs;
console.log('[JumpController] pressJump ACCEPTED — entering charging phase');
return { phase: this.phase, height: 0, horizontalImpulse: 0 };
}