-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.py
More file actions
36 lines (26 loc) · 788 Bytes
/
Main.py
File metadata and controls
36 lines (26 loc) · 788 Bytes
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
#!/usr/bin/python
import pygame
import Resources
from pygame.locals import *
from MainMenu import *
class BumpNJump():
def __init__(self):
screenWidth = 1000
screenHeight = 600
pygame.init()
if(Resources.getOptionValue("fullscreen") == 1):
pygame.display.set_mode((screenWidth, screenHeight), FULLSCREEN)
else:
pygame.display.set_mode((screenWidth, screenHeight))
pygame.display.set_caption("Bump'N'Jump")
pygame.mixer.music.load("resources/sound/music.wav")
pygame.mixer.music.set_volume(float(Resources.getOptionValue("music"))/100)
pygame.mixer.music.play(-1)
currentScene = MainMenu()
clock = pygame.time.Clock()
game = True
while game:
game, currentScene = currentScene.update()
clock.tick(60)
if __name__ == '__main__':
BumpNJump()