-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgameVariables.js
More file actions
54 lines (53 loc) · 1.03 KB
/
gameVariables.js
File metadata and controls
54 lines (53 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
let gameVariables = {
GAME_HEIGHT: 3000,
GAME_WIDTH: 450,
FPS: 15,
game: undefined,
currentLevel: 0,
PLAYER_SPEED: 3,
FRICTION: 0.8,
GRAVITY: 0.4,
JUMP_POWER: 2.5,
GROUNDED: true,
JUMPING: false,
player: undefined,
SPRITE_HEIGHT: 32,
SPRITE_WIDTH: 26,
BIRD_WIDTH: 50,
BIRD_HEIGHT: 38,
keys: [],
playerVelX: 0,
playerVelY: 0,
eggVelY: 0,
itemVelY: 0,
levels: [],
platforms: [],
eggs: [],
MAX_EGG_TIMER: 50,
eggTimer: 0,
pause: true,
cycleLoop: [8, 7, 8, 9],
birdLoop: [1,2,3],
eggLoop: [2, 3, 4, 5, 6],
jumpLoop: [4, 3, 2, 1],
eggLoopIndex: 0,
currentLoopIndex: 0,
currentBirdIndex: 0,
jumpLoopIndex: 0,
facingRight: true,
jumpingOff: false,
img: new Image(),
frame: 0,
layingEgg: false,
eggTimerBar: undefined,
droppingItems: false,
dropCount: 0,
maxDropCount: 100,
droppedItems: [],
flapCount: 0,
musicPlaying: false,
pauseMusic: false,
myAudioNode: undefined,
flaps: 0
}
window.gameVariables = gameVariables;