0

移相器游戏未启动错误

在此处输入图像描述

import Game1 from "phaser/src/core/Game";
import { Game } from "phaser";
console.log(Game1, Game);
const app = new Game1(gameSettings);

控制台日志的以下输出是类似的类: 在此处输入图像描述

但是当我尝试直接使用phaser js中的那个时,没有发现错误

import { Game } from "phaser";
const app = new Game(gameSettings);

提前感谢您回答我做错的部分。

4

1 回答 1

0

在我在网上找到的所有示例中,我看到了 Phaser 的这种导入

import 'phaser';
import Phaser from 'phaser';
import * as Phaser from 'phaser';

然后启动游戏

new Phaser.Game(config)
于 2021-08-11T09:02:55.060 回答