Код: Выделить всё
import Player from './Player.mjs';
import Collectible from './Collectible.mjs';
const socket = io();
const canvas = document.getElementById('game-window');
const context = canvas.getContext('2d');
const load = () => {
context.fillStyle = "#000000";
context.fillRect(0, 0, canvas.width, canvas.height);
context.font = "30px Comic Sans MS";
context.fillStyle = "red";
context.textAlign = "center";
context.fillText("Coin Race", 100, 30);
context.strokeStyle = "yellow";
context.strokeRect(5, 35, canvas.width - 10, canvas.height - 40)
}
load();
Код: Выделить всё
Secure Real-Time Multiplayer Game
Secure Real Time Multiplayer Game
Может кто-нибудь, скажите мне, пожалуйста, что я делаю не так.
Я заметил, что когда я комментирую приведенное ниже в game.mjs, запускается внешний скрипт
Код: Выделить всё
import Player from './Player.mjs';
import Collectible from './Collectible.mjs';
const socket = io();
Подробнее здесь: https://stackoverflow.com/questions/691 ... oing-wrong
Мобильная версия