https://github.com/easierbycode/evil-invaders-phaser4/actions/runs/17341402938/artifacts/3888797287
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let prevButtonStates = []; | |
let fullscreenToggled = false; // Flag to ensure fullscreen is toggled only once | |
window.addEventListener("gamepadconnected", (e) => { | |
console.log(`Gamepad ${e.gamepad.index} connected`); | |
prevButtonStates[e.gamepad.index] = []; | |
requestAnimationFrame(pollGamepads); | |
}); | |
function pollGamepads() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { isset } from './utils.js'; | |
const HERO_DEPTH = 50; | |
const IS_DEV = new URL(window.location.href).searchParams.get("debug") == "1"; | |
// Running | |
const RUNNING_RIGHT = 'RUNNING_RIGHT'; | |
const RUNNING_LEFT = 'RUNNING_LEFT'; |
NewerOlder