-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
49 lines (34 loc) · 923 Bytes
/
main.py
File metadata and controls
49 lines (34 loc) · 923 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
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/python
# System imports
import sys
# Panda Engine imports
from pandac.PandaModules import loadPrcFileData
loadPrcFileData("",
"""
window-title Boxed-In 'Development build'
fullscreen 0
win-size 1260 876
cursor-hidden 0
sync-video 1
show-frame-rate-meter 1
"""
)
from direct.showbase.ShowBase import ShowBase
# Game imports
from core.game import GameCore
#----------------------------------------------------------------------#
## BoxedIn ##
class Main(ShowBase):
def __init__(self):
ShowBase.__init__(self)
# Set esc for force exit
self.accept('escape', self.exitApp)
# Load the game
self.game = GameCore(self)
self.game.startGame()
print render.ls()
self.game.physicsMgr.setPhysicsDebug(True)
def exitApp(self):
sys.exit()
main = Main()
run()