Пожалуйста, сформируй полный HTML-код (ничего не пропускай), выделив его обратными тройными кавычками, для следующего запроса: "Добавь подсчет попаданий по астероидам и выведи надпись Shoot Count". В прошлой итерации код выглядел следующим образом: "<html>

<head>
    <base href="https://space-in-the-loop.com/" />
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Space In The Loop</title>
    <script src="https://cdn.jsdelivr.net/npm/phaser@3.55.2/dist/phaser.min.js"></script>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: #000;
            overflow: hidden;
        }

        #game-container {
            width: 100vw;
            height: 100vh;
            image-rendering: pixelated;
            image-rendering: crisp-edges;
        }

        @font-face {
            font-family: 'Upheaval Pro';
            src: url('https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/upheaval-pro-regular(Pixel).otf') format('opentype');
        }

        #font-preloader {
            font-family: 'Upheaval Pro';
            position: absolute;
            left: -1000px;
            visibility: hidden;
        }
    </style>
</head>

<body>
    <div id="game-container"></div>
    <div id="font-preloader">.</div>

    <!--
    
    ЭТО ОЧЕНЬ ВАЖНЫЙ БЛОК С КОММЕНТАРИЯМИ, УЧИТЫВАТЬ ЕГО ПРИ РАЗРАБОТКЕ! ЭТОТ БЛОК С КОММЕНТАРИЯМИ НЕЛЬЗЯ УДАЛЯТЬ!
    
    Движок игры: PhaserJS
    
    Краткое описание игры: Игра - космический шутер с видом сверху. Есть корабль, который сбивает астероиды, которые в свою очередь разлетаются на более мелкие астероиды. Цель игрока - выжить и набрать максимальное количество очков за каждое, которые даются за каждое попадание в астероид.
    
    Особенности и стиль разработки:
    1) Код должен состоять из модулей со своими именами, чтобы в случае ошибки не ломался весь код, а только тот модуль, в котором ошибка.
    2) Учитывать масштаб игры во всех вычислениях, на которые он влияет.
    3) Все элементы меню и интерфейса игры должны быть адаптивными, то есть подходить под любое разрешение, если поле просмотра игры меняется.
    
    -->

    <script>
        // Модуль конфигурации
        const ConfigModule = {
            name: 'ConfigModule',
            status: 'работает',
            GAME_SCALE: 1.3,
            MUSIC_VOLUME: 0.1,  // 10% громкость музыки
            SOUND_VOLUME: 0.6,  // 60% громкость звуков
            ASTEROID_SPAWN_INTERVAL: 2000,  // Начальный интервал появления астероидов (2 секунды)

            getConfig: function () {
                return {
                    type: Phaser.AUTO,
                    width: '100%',
                    height: '100%',
                    parent: 'game-container',
                    pixelArt: true,
                    scale: {
                        mode: Phaser.Scale.RESIZE,
                        autoCenter: Phaser.Scale.CENTER_BOTH
                    },
                    scene: {
                        preload: preload,
                        create: create,
                        update: update
                    },
                    physics: {
                        default: 'arcade',
                        arcade: {
                            debug: false
                        }
                    }
                };
            },

            preload: function (scene) {
                scene.load.image('crosshair', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/Cross.png');
            }
        };

        // Модуль фона
        const BackgroundModule = {
            name: 'BackgroundModule',
            status: 'работает',
            background: null,

            preload: function (scene) {
                scene.load.image('background', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/Background.png');
            },

            create: function (scene) {
                this.background = scene.add.image(scene.cameras.main.width / 2, scene.cameras.main.height / 2, 'background');
                this.resizeBackground(scene);
                scene.scale.on('resize', () => this.resizeBackground(scene));
            },

            resizeBackground: function (scene) {
                const scaleX = scene.cameras.main.width / this.background.width;
                const scaleY = scene.cameras.main.height / this.background.height;
                const scale = Math.max(scaleX, scaleY);

                this.background.setScale(scale);
                this.background.setPosition(scene.cameras.main.width / 2, scene.cameras.main.height / 2);
            }
        };

        // Модуль корабля
        const ShipModule = {
            name: 'ShipModule',
            status: 'работает',
            ships: [],
            cursors: null,
            energyRegenTimer: null,

            preload: function (scene) {
                scene.load.image('ship', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/ShipSimple.png');
            },

            create: function (scene) {
                const centerX = scene.cameras.main.width / 2;
                const centerY = scene.cameras.main.height / 2;

                this.addShip(scene, centerX, centerY, {
                    price: 0,
                    shield: 100,
                    health: 100,
                    energy: 100,
                    maxEnergy: 100,
                    guns: [
                        { name: "gun 1", x: 32, y: 16 }
                    ]
                });

                this.cursors = scene.input.keyboard.addKeys({
                    up: Phaser.Input.Keyboard.KeyCodes.W,
                    down: Phaser.Input.Keyboard.KeyCodes.S,
                    left: Phaser.Input.Keyboard.KeyCodes.A,
                    right: Phaser.Input.Keyboard.KeyCodes.D
                });

                this.energyRegenTimer = scene.time.addEvent({
                    delay: 1000,
                    callback: this.regenerateEnergy,
                    callbackScope: this,
                    loop: true
                });
            },

            addShip: function (scene, x, y, params) {
                const ship = scene.physics.add.sprite(x, y, 'ship').setScale(ConfigModule.GAME_SCALE);
                ship.params = params;
                ship.lastFireTime = 0;
                ship.setDamping(true);
                ship.setDrag(0.99);
                ship.setMaxVelocity(300);
                ship.setCircle(ship.width / 2);
                ship.isAlive = true;
                this.ships.push(ship);
            },

            update: function (scene) {
                this.ships.forEach(ship => {
                    if (ship.isAlive) {
                        const angle = Phaser.Math.Angle.Between(ship.x, ship.y, scene.input.x, scene.input.y);
                        ship.setRotation(angle);

                        let moving = false;
                        if (this.cursors.left.isDown) {
                            ship.setAccelerationX(-300);
                            moving = true;
                        } else if (this.cursors.right.isDown) {
                            ship.setAccelerationX(300);
                            moving = true;
                        } else {
                            ship.setAccelerationX(0);
                        }

                        if (this.cursors.up.isDown) {
                            ship.setAccelerationY(-300);
                            moving = true;
                        } else if (this.cursors.down.isDown) {
                            ship.setAccelerationY(300);
                            moving = true;
                        } else {
                            ship.setAccelerationY(0);
                        }

                        if (!moving) {
                            const velocityX = ship.body.velocity.x;
                            const velocityY = ship.body.velocity.y;
                            const resistance = 0.99;

                            ship.setVelocityX(velocityX * resistance);
                            ship.setVelocityY(velocityY * resistance);

                            if (Math.abs(velocityX) < 1 && Math.abs(velocityY) < 1) {
                                ship.setVelocity(0, 0);
                            }
                        }

                        this.wrapShipPosition(scene, ship);
                    }
                });
            },

            wrapShipPosition: function (scene, ship) {
                const halfWidth = ship.width / 2;
                const halfHeight = ship.height / 2;

                if (ship.x < -halfWidth) {
                    ship.x = scene.cameras.main.width + halfWidth;
                } else if (ship.x > scene.cameras.main.width + halfWidth) {
                    ship.x = -halfWidth;
                }

                if (ship.y < -halfHeight) {
                    ship.y = scene.cameras.main.height + halfHeight;
                } else if (ship.y > scene.cameras.main.height + halfHeight) {
                    ship.y = -halfHeight;
                }
            },

            getPlayerShip: function () {
                return this.ships[0];
            },

            getGunPosition: function (ship, gunName) {
                const gun = ship.params.guns.find(g => g.name === gunName);
                if (!gun) return null;

                const x = ship.x + (gun.x - ship.width / 2) * Math.cos(ship.rotation) - (gun.y - ship.height / 2) * Math.sin(ship.rotation);
                const y = ship.y + (gun.x - ship.width / 2) * Math.sin(ship.rotation) + (gun.y - ship.height / 2) * Math.cos(ship.rotation);

                return { x, y };
            },

            damageShip: function (ship, amount) {
                if (!ship.isAlive) return;

                if (ship.params.shield > 0) {
                    ship.params.shield -= amount;
                    if (ship.params.shield < 0) {
                        ship.params.health += ship.params.shield;
                        ship.params.shield = 0;
                    }
                } else {
                    ship.params.health -= amount;
                }

                console.log(`Ship damaged! Shield: ${ship.params.shield}, Health: ${ship.params.health}`);

                ship.scene.cameras.main.shake(200, 0.005);

                if (ship.params.health <= 0 && ship.isAlive) {
                    this.destroyShip(ship);
                }

                UIModule.updateShipUI(ship);
            },

            destroyShip: function (ship) {
                ship.isAlive = false;
                ship.setCollideWorldBounds(false);
                ship.body.allowGravity = false;

                const randomRotationSpeed = Phaser.Math.Between(-100, 100);
                ship.setAngularVelocity(randomRotationSpeed);

                AsteroidModule.setPlayerAliveStatus(false);

                ship.scene.tweens.add({
                    targets: ship,
                    scale: 0,
                    duration: 2000,
                    ease: 'Power2',
                    onUpdate: function (tween) {
                        const progress = tween.getValue();
                        const color = Phaser.Display.Color.Interpolate.ColorWithColor(
                            Phaser.Display.Color.ValueToColor(0xFFFFFF),
                            Phaser.Display.Color.ValueToColor(0x000000),
                            100,
                            progress * 100
                        );
                        ship.setTint(Phaser.Display.Color.GetColor(color.r, color.g, color.b));
                    },
                    onComplete: () => {
                        ship.setVisible(false);
                        UIModule.showGameOverPanel(ship.scene);
                    }
                });
            },

            respawnShip: function (ship) {
                const scene = ship.scene;
                const centerX = scene.cameras.main.width / 2;
                const centerY = scene.cameras.main.height / 2;

                ship.setPosition(centerX, centerY);
                ship.setRotation(0);
                ship.setVelocity(0, 0);
                ship.setAngularVelocity(0);
                ship.setVisible(true);
                ship.setScale(ConfigModule.GAME_SCALE);
                ship.clearTint();

                ship.params.shield = 100;
                ship.params.health = 100;
                ship.params.energy = 100;

                ship.isAlive = true;

                AsteroidModule.setPlayerAliveStatus(true);

                UIModule.updateShipUI(ship);
                ScoreModule.resetScore();
            },

            consumeEnergy: function (ship, amount) {
                if (!ship.isAlive) return;
                ship.params.energy = Math.max(0, ship.params.energy - amount);
                UIModule.updateShipUI(ship);
            },

            hasEnoughEnergy: function (ship, requiredAmount) {
                return ship.isAlive && ship.params.energy >= requiredAmount;
            },

            replenishResource: function (ship, resourceType, amount) {
                if (!ship.isAlive) return;
                switch (resourceType) {
                    case 'shield':
                        ship.params.shield = Math.min(100, ship.params.shield + amount);
                        break;
                    case 'health':
                        ship.params.health = Math.min(100, ship.params.health + amount);
                        break;
                    case 'energy':
                        ship.params.energy = Math.min(ship.params.maxEnergy, ship.params.energy + amount);
                        break;
                }
                UIModule.updateShipUI(ship);
            },

            regenerateEnergy: function () {
                this.ships.forEach(ship => {
                    if (ship.isAlive) {
                        this.replenishResource(ship, 'energy', 1);
                    }
                });
            }
        };

        // Модуль лазера
        const LaserModule = {
            name: 'LaserModule',
            status: 'работает',
            lasers: null,
            particles: null,
            laserSound: null,

            preload: function (scene) {
                scene.load.image('laser', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/laser.png');
                scene.load.audio('laserSound', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/Sounds/Laser.wav');
            },

            create: function (scene) {
                this.lasers = scene.physics.add.group();
                this.particles = scene.add.particles('laser');
                this.laserSound = scene.sound.add('laserSound');
            },

            fireLaser: function (scene, ship, gunName) {
                if (!ship.isAlive) return;

                const currentTime = scene.time.now;
                if (currentTime - ship.lastFireTime < 300) {
                    return;
                }

                if (!ShipModule.hasEnoughEnergy(ship, 1)) {
                    console.log("Not enough energy to fire!");
                    return;
                }

                ship.lastFireTime = currentTime;

                const gunPosition = ShipModule.getGunPosition(ship, gunName);
                if (!gunPosition) return;

                const laser = this.lasers.create(gunPosition.x, gunPosition.y, 'laser').setScale(ConfigModule.GAME_SCALE * 0.5);

                const angle = ship.rotation;
                const speed = 500;

                laser.setRotation(angle);

                const offsetX = Math.cos(angle) * laser.width / 2;
                const offsetY = Math.sin(angle) * laser.width / 2;
                laser.x += offsetX;
                laser.y += offsetY;

                scene.physics.velocityFromRotation(angle, speed, laser.body.velocity);

                this.createShootParticles(scene, gunPosition.x, gunPosition.y, angle);

                scene.time.delayedCall(2000, () => {
                    laser.destroy();
                });

                ShipModule.consumeEnergy(ship, 1);

                // Воспроизведение звука выстрела
                this.laserSound.play({ volume: ConfigModule.SOUND_VOLUME });
            },

            createShootParticles: function (scene, x, y, angle) {
                const emitter = this.particles.createEmitter({
                    speed: { min: 100, max: 200 },
                    scale: { start: 0.1, end: 0 },
                    blendMode: 'ADD',
                    lifespan: 300,
                    angle: {
                        min: Phaser.Math.RadToDeg(angle) - 15,
                        max: Phaser.Math.RadToDeg(angle) + 15
                    }
                });

                emitter.setPosition(x, y);
                emitter.explode(10);
            },

            update: function (scene) {
                // Дополнительная логика для лазеров, если потребуется
            }
        };

        // Модуль астероидов
        const AsteroidModule = {
            name: 'AsteroidModule',
            status: 'работает',
            asteroids: null,
            spawnTimer: null,
            explosionParticles: null,
            explosionSound: null,
            difficultyTimer: null,
            initialSpawnInterval: 1000,
            currentSpawnInterval: 1000,
            isPlayerAlive: true,
            gameStarted: false,

            preload: function (scene) {
                scene.load.image('asteroid', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/Asteroid.png');
                scene.load.image('asteroidLeft', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/AsterLeft.png');
                scene.load.image('asteroidRight', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/AsterRight.png');
                scene.load.image('asteroidSmall', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/AsterSmall.png');
                scene.load.audio('explosionSound', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/Sounds/Explosion.wav');
            },

            create: function (scene) {
                this.asteroids = scene.physics.add.group();
                this.explosionParticles = scene.add.particles('asteroid');
                this.explosionSound = scene.sound.add('explosionSound');

                scene.physics.add.collider(LaserModule.lasers, this.asteroids, this.onLaserHitAsteroid, null, this);
                scene.physics.add.collider(ShipModule.ships, this.asteroids, this.onShipHitAsteroid, null, this);

                this.difficultyTimer = scene.time.addEvent({
                    delay: 10000,
                    callback: this.increaseDifficulty,
                    callbackScope: this,
                    loop: true
                });
            },

            startSpawning: function (scene) {
                this.gameStarted = true;
                this.spawnTimer = scene.time.addEvent({
                    delay: this.currentSpawnInterval,
                    callback: this.spawnAsteroid,
                    callbackScope: this,
                    loop: true
                });
            },

            increaseDifficulty: function () {
                if (this.isPlayerAlive && this.gameStarted) {
                    this.currentSpawnInterval = Math.max(500, this.currentSpawnInterval * 0.9);
                    if (this.spawnTimer) {
                        this.spawnTimer.delay = this.currentSpawnInterval;
                    }
                }
            },

            resetDifficulty: function () {
                this.currentSpawnInterval = this.initialSpawnInterval;
                if (this.spawnTimer) {
                    this.spawnTimer.delay = this.currentSpawnInterval;
                }
            },

            spawnAsteroid: function () {
                if (!this.gameStarted) return;

                const scene = this.asteroids.scene;
                const side = Phaser.Math.Between(0, 3);
                let x, y;

                const padding = 100;

                switch (side) {
                    case 0:
                        x = Phaser.Math.Between(0, scene.cameras.main.width);
                        y = -padding;
                        break;
                    case 1:
                        x = scene.cameras.main.width + padding;
                        y = Phaser.Math.Between(0, scene.cameras.main.height);
                        break;
                    case 2:
                        x = Phaser.Math.Between(0, scene.cameras.main.width);
                        y = scene.cameras.main.height + padding;
                        break;
                    case 3:
                        x = -padding;
                        y = Phaser.Math.Between(0, scene.cameras.main.height);
                        break;
                }

                const asteroid = this.asteroids.create(x, y, 'asteroid').setScale(ConfigModule.GAME_SCALE);
                asteroid.setData('type', 'large');

                asteroid.setCircle(asteroid.width / 2);

                asteroid.setAngularVelocity(Phaser.Math.Between(-100, 100));

                // Генерируем случайную точку в пределах видимой области игры
                const targetX = Phaser.Math.Between(0, scene.cameras.main.width);
                const targetY = Phaser.Math.Between(0, scene.cameras.main.height);

                const angle = Phaser.Math.Angle.Between(x, y, targetX, targetY);

                const speed = Phaser.Math.Between(50, 150);
                scene.physics.velocityFromRotation(angle, speed, asteroid.body.velocity);

                asteroid.wasVisible = false;
            },

            update: function (scene) {
                this.asteroids.getChildren().forEach(asteroid => {
                    if (this.isAsteroidVisible(scene, asteroid)) {
                        asteroid.wasVisible = true;
                    }

                    if (asteroid.wasVisible && !this.isAsteroidVisible(scene, asteroid)) {
                        asteroid.destroy();
                    }
                });
            },

            isAsteroidVisible: function (scene, asteroid) {
                const padding = 50;
                return asteroid.x > -padding &&
                    asteroid.x < scene.cameras.main.width + padding &&
                    asteroid.y > -padding &&
                    asteroid.y < scene.cameras.main.height + padding;
            },

            onLaserHitAsteroid: function (laser, asteroid) {
                this.handleAsteroidCollision(asteroid, true);
                laser.destroy();
                ScoreModule.addScore(1);
            },

            onShipHitAsteroid: function (ship, asteroid) {
                if (ship.isAlive) {
                    const damageAmount = this.getAsteroidDamage(asteroid);
                    ShipModule.damageShip(ship, damageAmount);
                    this.handleAsteroidCollision(asteroid, false);
                }
            },

            getAsteroidDamage: function (asteroid) {
                switch (asteroid.getData('type')) {
                    case 'large':
                        return 10;
                    case 'medium':
                        return 5;
                    case 'small':
                        return 3;
                    default:
                        return 0;
                }
            },

            handleAsteroidCollision: function (asteroid, wasHitByLaser) {
                const scene = asteroid.scene;

                if (asteroid.getData('type') === 'large') {
                    this.splitLargeAsteroid(scene, asteroid);
                } else if (asteroid.getData('type') === 'medium') {
                    this.splitMediumAsteroid(scene, asteroid);
                }

                this.createExplosionEffect(asteroid.x, asteroid.y);

                if (wasHitByLaser && Math.random() < 0.5) {
                    ResourceModule.spawnResource(scene, asteroid.x, asteroid.y);
                }

                this.explosionSound.play({ volume: ConfigModule.SOUND_VOLUME });

                asteroid.destroy();
            },

            splitLargeAsteroid: function (scene, asteroid) {
                const speed = asteroid.body.speed;
                const angle = asteroid.body.angle;

                const createMediumAsteroid = (x, y, texture) => {
                    const mediumAsteroid = this.asteroids.create(x, y, texture).setScale(ConfigModule.GAME_SCALE);
                    mediumAsteroid.setData('type', 'medium');
                    mediumAsteroid.setCircle(mediumAsteroid.width / 2);
                    mediumAsteroid.setAngularVelocity(Phaser.Math.Between(-100, 100));

                    const newAngle = angle + Phaser.Math.Between(-30, 30) * (Math.PI / 180);
                    scene.physics.velocityFromRotation(newAngle, speed, mediumAsteroid.body.velocity);

                    mediumAsteroid.wasVisible = true;
                };

                const offsetX = Math.cos(angle) * 10;
                const offsetY = Math.sin(angle) * 10;

                createMediumAsteroid(asteroid.x - offsetX, asteroid.y - offsetY, 'asteroidLeft');
                createMediumAsteroid(asteroid.x + offsetX, asteroid.y + offsetY, 'asteroidRight');
            },

            splitMediumAsteroid: function (scene, asteroid) {
                const speed = asteroid.body.speed;
                const angle = asteroid.body.angle;

                const createSmallAsteroid = (x, y) => {
                    const smallAsteroid = this.asteroids.create(x, y, 'asteroidSmall').setScale(ConfigModule.GAME_SCALE);
                    smallAsteroid.setData('type', 'small');
                    smallAsteroid.setCircle(smallAsteroid.width / 2);
                    smallAsteroid.setAngularVelocity(Phaser.Math.Between(-100, 100));

                    const newAngle = angle + Phaser.Math.Between(-30, 30) * (Math.PI / 180);
                    scene.physics.velocityFromRotation(newAngle, speed, smallAsteroid.body.velocity);

                    smallAsteroid.wasVisible = true;
                };

                const offsetX = Math.cos(angle) * 5;
                const offsetY = Math.sin(angle) * 5;

                createSmallAsteroid(asteroid.x - offsetX, asteroid.y - offsetY);
                createSmallAsteroid(asteroid.x + offsetX, asteroid.y + offsetY);
            },

            createExplosionEffect: function (x, y) {
                const emitter = this.explosionParticles.createEmitter({
                    x: x,
                    y: y,
                    speed: { min: 50, max: 100 },
                    scale: { start: 0.5, end: 0 },
                    blendMode: 'ADD',
                    lifespan: 500,
                    angle: { min: 0, max: 360 }
                });

                emitter.explode(20);

                setTimeout(() => {
                    emitter.stop();
                }, 500);
            },

            setPlayerAliveStatus: function (status) {
                this.isPlayerAlive = status;
                if (!status) {
                    this.resetDifficulty();
                }
            }
        };

        // Модуль UI
        const UIModule = {
            name: 'UIModule',
            status: 'работает',
            uiLayer: null,
            uiPanel: null,
            shieldBar: null,
            healthBar: null,
            energyBar: null,
            crosshair: null,
            gameOverPanel: null,
            restartButton: null,
            gameOverElements: [],
            startPanel: null,
            startPanelElements: [],
            waveText: null,
            waveTimer: null,
            waveCount: 1,
            highWaveCount: 1,
            highWaveText: null,

            preload: function (scene) {
                scene.load.image('uiPanel', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/UI/UIPanel.png');
                scene.load.image('uiShield', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/UI/UIShield.png');
                scene.load.image('uiHealth', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/UI/UIHealth.png');
                scene.load.image('uiEnergy', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/UI/UIEnergy.png');
                scene.load.image('dialogPanel', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/Menu/DialogPanel.png');
                scene.load.image('button', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/Menu/button.png');
            },

            create: function (scene) {
                this.uiLayer = scene.add.layer();

                const centerX = scene.cameras.main.width / 2;
                const panelY = 20;

                this.shieldBar = scene.add.image(centerX + 10.5, panelY + 2, 'uiShield').setScale(2);
                this.healthBar = scene.add.image(centerX + 10.5, panelY + 13, 'uiHealth').setScale(2);
                this.energyBar = scene.add.image(centerX + 10.5, panelY + 24, 'uiEnergy').setScale(2);

                this.uiPanel = scene.add.image(centerX, panelY, 'uiPanel').setScale(2);
                this.uiPanel.setOrigin(0.5, 0);

                this.shieldBar.setOrigin(0, 0);
                this.healthBar.setOrigin(0, 0);
                this.energyBar.setOrigin(0, 0);

                this.uiLayer.add([this.shieldBar, this.healthBar, this.energyBar, this.uiPanel]);
                this.uiLayer.setDepth(1000);

                this.crosshair = scene.add.image(0, 0, 'crosshair').setScale(ConfigModule.GAME_SCALE);
                this.crosshair.setOrigin(0.5);
                this.uiLayer.add(this.crosshair);
                this.uiLayer.bringToTop(this.crosshair);

                scene.input.setDefaultCursor('none');

                scene.scale.on('resize', (gameSize) => {
                    this.resizeUI(scene);
                });

                this.resizeUI(scene);

                // Показываем начальную панель управления
                this.showStartPanel(scene);

                // Добавляем текстовое поле для отображения волн
                this.waveText = scene.add.text(10, 70, 'Waves: 1', { fontFamily: 'Upheaval Pro', fontSize: '22px', fill: '#AECBF1' }).setDepth(1001);
                this.uiLayer.add(this.waveText);

                // Добавляем текстовое поле для отображения максимального количества волн
                this.highWaveText = scene.add.text(10, 100, 'High Waves: 1', { fontFamily: 'Upheaval Pro', fontSize: '22px', fill: '#AECBF1' }).setDepth(1001);
                this.uiLayer.add(this.highWaveText);

                // Загружаем максимальное количество волн из локального хранилища
                this.highWaveCount = this.getHighWaveCount();
                this.highWaveText.setText('High Waves: ' + this.highWaveCount);

                // Таймер для увеличения волн каждую минуту
                this.waveTimer = scene.time.addEvent({
                    delay: 60000, // 1 минута
                    callback: this.increaseWaveCount,
                    callbackScope: this,
                    loop: true
                });
            },

            resizeUI: function (scene) {
                const centerX = scene.cameras.main.width / 2;
                const panelY = 20;

                this.uiPanel.setPosition(centerX, panelY);
                this.shieldBar.setPosition(centerX - this.uiPanel.displayWidth / 2 + 19.5, panelY + 4);
                this.healthBar.setPosition(centerX - this.uiPanel.displayWidth / 2 + 19.5, panelY + 26);
                this.energyBar.setPosition(centerX - this.uiPanel.displayWidth / 2 + 19.5, panelY + 48);
            },

            updateShipUI: function (ship) {
                const shieldWidth = (ship.params.shield / 100) * this.shieldBar.width;
                const healthWidth = (ship.params.health / 100) * this.healthBar.width;
                const energyWidth = (ship.params.energy / 100) * this.energyBar.width;

                this.shieldBar.setCrop(0, 0, shieldWidth, this.shieldBar.height);
                this.healthBar.setCrop(0, 0, healthWidth, this.healthBar.height);
                this.energyBar.setCrop(0, 0, energyWidth, this.energyBar.height);
            },

            update: function (scene) {
                const pointer = scene.input.activePointer;
                this.crosshair.setPosition(pointer.x, pointer.y);
            },

            showGameOverPanel: function (scene) {
                const centerX = scene.cameras.main.width / 2;
                const centerY = scene.cameras.main.height / 2;

                this.gameOverPanel = scene.add.image(centerX, centerY, 'dialogPanel').setScale(5.5);

                const scoreText = scene.add.text(centerX, centerY - 90, 'Score: ' + ScoreModule.score, { fontFamily: 'Upheaval Pro', fontSize: '28px', fill: '#2F4463' }).setOrigin(0.5);
                const highScoreText = scene.add.text(centerX, centerY - 55, 'High Score: ' + ScoreModule.highScore, { fontFamily: 'Upheaval Pro', fontSize: '28px', fill: '#2F4463' }).setOrigin(0.5);
                const wavesText = scene.add.text(centerX, centerY - 20, 'Waves: ' + this.waveCount, { fontFamily: 'Upheaval Pro', fontSize: '28px', fill: '#2F4463' }).setOrigin(0.5);
                const highWavesText = scene.add.text(centerX, centerY + 15, 'High Waves: ' + this.highWaveCount, { fontFamily: 'Upheaval Pro', fontSize: '28px', fill: '#2F4463' }).setOrigin(0.5);

                this.restartButton = scene.add.image(centerX, centerY + 80, 'button').setScale(2.5);
                const restartText = scene.add.text(centerX, centerY + 80, 'Restart', { fontFamily: 'Upheaval Pro', fontSize: '24px', fill: '#2F4463' }).setOrigin(0.5);

                this.restartButton.setInteractive();
                this.restartButton.on('pointerover', () => this.restartButton.setTint(0xcccccc));
                this.restartButton.on('pointerout', () => this.restartButton.clearTint());
                this.restartButton.on('pointerdown', () => {
                    this.hideGameOverPanel();
                    ShipModule.respawnShip(ShipModule.getPlayerShip());
                    scene.input.setDefaultCursor('none');
                    this.crosshair.setVisible(true);
                });

                this.gameOverElements = [this.gameOverPanel, scoreText, highScoreText, wavesText, highWavesText, this.restartButton, restartText];

                this.uiLayer.add(this.gameOverElements);
                this.uiLayer.setDepth(1000);
                this.gameOverPanel.setDepth(1001);
                scoreText.setDepth(1002);
                highScoreText.setDepth(1002);
                wavesText.setDepth(1002);
                highWavesText.setDepth(1002);
                this.restartButton.setDepth(1002);
                restartText.setDepth(1003);

                scene.input.setDefaultCursor('default');
                this.crosshair.setVisible(false);
            },

            hideGameOverPanel: function () {
                if (this.gameOverElements.length > 0) {
                    this.gameOverElements.forEach(element => element.destroy());
                    this.gameOverElements = [];
                }
            },

            showStartPanel: function (scene) {
                const centerX = scene.cameras.main.width / 2;
                const centerY = scene.cameras.main.height / 2;

                this.startPanel = scene.add.image(centerX, centerY, 'dialogPanel').setScale(5);

                const controlsText = scene.add.text(centerX, centerY - 70, 'Controls:', { fontFamily: 'Upheaval Pro', fontSize: '28px', fill: '#2F4463' }).setOrigin(0.5);
                const moveText = scene.add.text(centerX, centerY - 35, 'Move: W, A, S, D', { fontFamily: 'Upheaval Pro', fontSize: '24px', fill: '#2F4463' }).setOrigin(0.5);
                const shootText = scene.add.text(centerX, centerY, 'Shoot: Left Mouse Button', { fontFamily: 'Upheaval Pro', fontSize: '24px', fill: '#2F4463' }).setOrigin(0.5);

                const okButton = scene.add.image(centerX, centerY + 70, 'button').setScale(2.5);
                const okText = scene.add.text(centerX, centerY + 70, 'OK', { fontFamily: 'Upheaval Pro', fontSize: '24px', fill: '#2F4463' }).setOrigin(0.5);

                okButton.setInteractive();
                okButton.on('pointerover', () => okButton.setTint(0xcccccc));
                okButton.on('pointerout', () => okButton.clearTint());
                okButton.on('pointerdown', () => {
                    this.hideStartPanel();
                    scene.input.setDefaultCursor('none');
                    this.crosshair.setVisible(true);
                    scene.events.emit('startGame');
                });

                this.startPanelElements = [this.startPanel, controlsText, moveText, shootText, okButton, okText];

                this.uiLayer.add(this.startPanelElements);
                this.uiLayer.setDepth(1000);
                this.startPanel.setDepth(1001);
                controlsText.setDepth(1002);
                moveText.setDepth(1002);
                shootText.setDepth(1002);
                okButton.setDepth(1002);
                okText.setDepth(1003);

                scene.input.setDefaultCursor('default');
                this.crosshair.setVisible(false);
            },

            hideStartPanel: function () {
                if (this.startPanelElements.length > 0) {
                    this.startPanelElements.forEach(element => element.destroy());
                    this.startPanelElements = [];
                }
            },

            increaseWaveCount: function () {
                this.waveCount++;
                this.waveText.setText('Waves: ' + this.waveCount);

                if (this.waveCount > this.highWaveCount) {
                    this.highWaveCount = this.waveCount;
                    this.highWaveText.setText('High Waves: ' + this.highWaveCount);
                    this.saveHighWaveCount();
                }
            },

            getHighWaveCount: function () {
                const storedHighWaveCount = localStorage.getItem('highWaveCount');
                return storedHighWaveCount ? parseInt(storedHighWaveCount) : 1;
            },

            saveHighWaveCount: function () {
                localStorage.setItem('highWaveCount', this.highWaveCount.toString());
            }
        };

        // Модуль ресурсов
        const ResourceModule = {
            name: 'ResourceModule',
            status: 'работает',
            resources: null,
            resourceSound: null,

            preload: function (scene) {
                scene.load.image('shieldResource', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/shield.png');
                scene.load.image('energyResource', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/energy.png');
                scene.load.image('healthResource', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/health.png');
                scene.load.audio('resourceSound', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/Sounds/Res.wav');
            },

            create: function (scene) {
                this.resources = scene.physics.add.group();
                scene.physics.add.overlap(ShipModule.ships, this.resources, this.onShipCollectResource, null, this);
                this.resourceSound = scene.sound.add('resourceSound');
            },

            spawnResource: function (scene, x, y) {
                const resourceTypes = ['shieldResource', 'energyResource', 'healthResource'];
                const resourceType = Phaser.Utils.Array.GetRandom(resourceTypes);
                const resource = this.resources.create(x, y, resourceType).setScale(ConfigModule.GAME_SCALE * 1.4);  // Уменьшаем размер на 30%

                resource.setData('type', resourceType);
                resource.setCircle(resource.width / 4);

                const randomAngle = Phaser.Math.FloatBetween(0, Math.PI * 2);
                resource.setRotation(randomAngle);

                resource.setVelocity(
                    Phaser.Math.Between(-50, 50),
                    Phaser.Math.Between(-50, 50)
                );

                resource.setAngularVelocity(Phaser.Math.Between(-50, 50));

                scene.time.delayedCall(10000, () => {
                    if (resource.active) {
                        resource.destroy();
                    }
                });
            },

            onShipCollectResource: function (ship, resource) {
                if (!resource.active || resource.isCollecting) return;

                resource.isCollecting = true;

                const resourceType = resource.getData('type').replace('Resource', '');
                let amount = 10;

                if (resourceType === 'shield') {
                    ShipModule.replenishResource(ship, 'shield', amount);
                } else if (resourceType === 'health') {
                    ShipModule.replenishResource(ship, 'health', amount);
                } else if (resourceType === 'energy') {
                    ShipModule.replenishResource(ship, 'energy', amount * 1.2);  // Увеличиваем энергию на 20% больше
                }

                this.resourceSound.play({ volume: ConfigModule.SOUND_VOLUME });

                resource.scene.tweens.add({
                    targets: resource,
                    scale: resource.scale * 1.5,
                    alpha: 0,
                    duration: 1000,
                    onComplete: () => {
                        resource.destroy();
                    }
                });
            }
        };

        // Модуль счета
        const ScoreModule = {
            name: 'ScoreModule',
            status: 'работает',
            score: 0,
            highScore: 0,
            scoreText: null,
            highScoreText: null,

            create: function (scene) {
                this.score = 0;
                this.highScore = this.getHighScore();
                this.scoreText = scene.add.text(10, 10, 'Score: 0', { fontFamily: 'Upheaval Pro', fontSize: '22px', fill: '#AECBF1' });  // Уменьшаем размер шрифта на 30%
                this.highScoreText = scene.add.text(10, 40, 'High Score: ' + this.highScore, { fontFamily: 'Upheaval Pro', fontSize: '22px', fill: '#AECBF1' });  // Уменьшаем размер шрифта на 30%
                this.scoreText.setDepth(1001);
                this.highScoreText.setDepth(1001);
            },

            addScore: function (points) {
                this.score += points;
                this.scoreText.setText('Score: ' + this.score);
                if (this.score > this.highScore) {
                    this.highScore = this.score;
                    this.highScoreText.setText('High Score: ' + this.highScore);
                    this.saveHighScore();
                }
            },

            resetScore: function () {
                this.score = 0;
                this.scoreText.setText('Score: 0');
            },

            getHighScore: function () {
                const storedHighScore = localStorage.getItem('highScore');
                return storedHighScore ? parseInt(storedHighScore) : 0;
            },

            saveHighScore: function () {
                localStorage.setItem('highScore', this.highScore.toString());
            }
        };

        // Общие функции
        function preload() {
            ConfigModule.preload(this);
            BackgroundModule.preload(this);
            ShipModule.preload(this);
            LaserModule.preload(this);
            AsteroidModule.preload(this);
            UIModule.preload(this);
            ResourceModule.preload(this);
        }

        function create() {
            BackgroundModule.create(this);
            ShipModule.create(this);
            LaserModule.create(this);
            AsteroidModule.create(this);
            UIModule.create(this);
            ResourceModule.create(this);
            ScoreModule.create(this);

            // Загрузка и воспроизведение фоновой музыки
            this.load.audio('backgroundMusic', 'https://file.garden/ZqyI0H6Iv3i3b0Sn/Space%20In%20The%20Loop/Sounds/SpaceMusic.wav');
            this.load.once('complete', () => {
                const music = this.sound.add('backgroundMusic', { loop: true });
                music.play({ volume: ConfigModule.MUSIC_VOLUME });
            });
            this.load.start();

            // Добавляем обработчик для стрельбы при зажатии левой кнопки мыши
            this.input.on('pointerdown', (pointer) => {
                if (pointer.leftButtonDown()) {
                    this.leftMouseDown = true;
                }
            });

            this.input.on('pointerup', (pointer) => {
                if (!pointer.leftButtonDown()) {
                    this.leftMouseDown = false;
                }
            });

            this.sys.events.on('update', () => UIModule.update(this));

            // Отключаем управление кораблем и стрельбу до закрытия начальной панели
            this.gameStarted = false;
            this.events.on('startGame', () => {
                this.gameStarted = true;
                AsteroidModule.startSpawning(this);
            });
        }

        function update() {
            if (this.gameStarted) {
                ShipModule.update(this);
                AsteroidModule.update(this);
                LaserModule.update(this);

                // Стрельба при зажатой левой кнопке мыши
                if (this.leftMouseDown) {
                    const playerShip = ShipModule.getPlayerShip();
                    LaserModule.fireLaser(this, playerShip, "gun 1");
                }
            }
        }

        // Инициализация игры
        const game = new Phaser.Game(ConfigModule.getConfig());
    </script>
</body>

</html>". Запрос прошлой итерации был таким: "Imported HTML".