Загрузить файлы в «Prehistorik»
This commit is contained in:
21
Prehistorik/constants.js
Normal file
21
Prehistorik/constants.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
// ─── Canvas ──────────────────────────────────────────────────────────────────
|
||||
const canvas = document.getElementById('gameCanvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
const W = canvas.width;
|
||||
const H = canvas.height;
|
||||
|
||||
// ─── Physics ─────────────────────────────────────────────────────────────────
|
||||
const GRAVITY = 0.55;
|
||||
const MAX_FALL = 16;
|
||||
const JUMP_POW = -12.5;
|
||||
const WALK_SPD = 4;
|
||||
const STOMP_BOUNCE = -11; // vy after successful stomp
|
||||
|
||||
// ─── Gameplay ────────────────────────────────────────────────────────────────
|
||||
const ATTACK_FRAMES = 22;
|
||||
const INVINC_FRAMES = 100;
|
||||
const WORLD_H = 600;
|
||||
const COMBO_TIMEOUT = 150; // frames before combo resets
|
||||
const MAX_COMBO_MULT = 8; // maximum score multiplier
|
||||
Reference in New Issue
Block a user