APmanageur Wi-Fi V1.0
This commit is contained in:
1 parent
d87b617a38
commit
abf33b9929
8 files changed
+273
-182
No files matched your search
+28
-15
@@ -109,6 +109,17 @@
|
||||
font-family: 'Courier New', monospace !important;
|
||||
}
|
||||
|
||||
html, body {
|
||||
overflow: hidden !important;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
|
||||
* { scrollbar-width: none !important; }
|
||||
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
@@ -117,9 +128,8 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
overflow-x: hidden;
|
||||
padding: 4px;
|
||||
height: 100%;
|
||||
padding: 6px;
|
||||
transition: background 0.3s ease, color 0.3s ease;
|
||||
}
|
||||
|
||||
@@ -127,13 +137,14 @@
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 14px;
|
||||
padding: 10px 12px;
|
||||
padding: 8px 12px;
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(92,167,255,0.12);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
max-width: 480px;
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-bar {
|
||||
@@ -141,8 +152,8 @@
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
padding: 6px 10px;
|
||||
margin-bottom: 6px;
|
||||
padding: 4px 10px;
|
||||
background: var(--panel-box);
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border);
|
||||
@@ -235,10 +246,12 @@
|
||||
}
|
||||
|
||||
.controls-hint {
|
||||
margin-top: 8px;
|
||||
margin-top: 6px;
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
text-align: center;
|
||||
line-height: 1.35;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -255,7 +268,7 @@
|
||||
</div>
|
||||
|
||||
<div class="canvas-wrap">
|
||||
<canvas id="pacmanCanvas" width="380" height="420"></canvas>
|
||||
<canvas id="pacmanCanvas" width="342" height="378"></canvas>
|
||||
|
||||
<div id="gameOverlay" class="overlay" style="display:none">
|
||||
<h2 id="overlayTitle">GAME OVER</h2>
|
||||
@@ -415,7 +428,7 @@
|
||||
|
||||
const canvas = document.getElementById('pacmanCanvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
const TILE = 20;
|
||||
const TILE = 18;
|
||||
const COLS = 19;
|
||||
const ROWS = 21;
|
||||
|
||||
@@ -445,10 +458,10 @@
|
||||
|
||||
function initGhosts() {
|
||||
ghosts = [
|
||||
{ x: 9, y: 8, pixelX: 9 * TILE, pixelY: 8 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[0], speed: 1.8, isEaten: false },
|
||||
{ x: 8, y: 10, pixelX: 8 * TILE, pixelY: 10 * TILE, dirX: 1, dirY: 0, color: GHOST_COLORS[1], speed: 1.6, isEaten: false },
|
||||
{ x: 9, y: 10, pixelX: 9 * TILE, pixelY: 10 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[2], speed: 1.6, isEaten: false },
|
||||
{ x: 10, y: 10, pixelX: 10 * TILE, pixelY: 10 * TILE, dirX: -1, dirY: 0, color: GHOST_COLORS[3], speed: 1.5, isEaten: false }
|
||||
{ x: 9, y: 8, pixelX: 9 * TILE, pixelY: 8 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[0], speed: 2, isEaten: false },
|
||||
{ x: 8, y: 10, pixelX: 8 * TILE, pixelY: 10 * TILE, dirX: 1, dirY: 0, color: GHOST_COLORS[1], speed: 2, isEaten: false },
|
||||
{ x: 9, y: 10, pixelX: 9 * TILE, pixelY: 10 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[2], speed: 2, isEaten: false },
|
||||
{ x: 10, y: 10, pixelX: 10 * TILE, pixelY: 10 * TILE, dirX: -1, dirY: 0, color: GHOST_COLORS[3], speed: 2, isEaten: false }
|
||||
];
|
||||
}
|
||||
|
||||
@@ -576,8 +589,8 @@
|
||||
|
||||
// Move Ghosts
|
||||
ghosts.forEach(g => {
|
||||
const gOnGridX = (g.pixelX % TILE === 0);
|
||||
const gOnGridY = (g.pixelY % TILE === 0);
|
||||
const gOnGridX = (Math.round(g.pixelX) % TILE === 0);
|
||||
const gOnGridY = (Math.round(g.pixelY) % TILE === 0);
|
||||
|
||||
if (gOnGridX && gOnGridY) {
|
||||
const gx = Math.round(g.pixelX / TILE);
|
||||
|
||||
Reference in new issue
Block a user