updated scoreboard.

This commit is contained in:
Michael Mainguy 2025-12-01 10:54:09 -06:00
parent 8180088b3b
commit 4ce5f5f2de

View File

@ -191,13 +191,13 @@ export class Scoreboard {
const _afterRender = scene.onAfterRenderObservable.add(() => { const _afterRender = scene.onAfterRenderObservable.add(() => {
if (i++ % 10 !== 0) return; if (i++ % 10 !== 0) return;
scoreText.text = `Score: ${this.calculateScore()}`; scoreText.text = `Destroyed: ${this.calculateScore()}`;
remainingText.text = `Remaining: ${this._remaining}`; remainingText.text = `Remaining: ${this._remaining}`;
// Update velocity from ship if available // Update velocity from ship if available
if (this._ship && this._ship.velocity) { if (this._ship && this._ship.velocity) {
const velocityMagnitude = this._ship.velocity.length(); const velocityMagnitude = this._ship.velocity.length();
velocityText.text = `Velocity: ${velocityMagnitude.toFixed(1)} m/s`; velocityText.text = `Velocity: ${velocityMagnitude.toFixed(1)} km/hr`;
} else { } else {
velocityText.text = `Velocity: 0.0 m/s`; velocityText.text = `Velocity: 0.0 m/s`;
} }