Difficult-Rocket/libs/main.py

33 lines
796 B
Python
Raw Normal View History

2020-12-05 21:24:54 +08:00
"""
writen by shenjackyuanjie
mail: 3695888@qq.com
"""
import pyglet
import libs
2020-12-05 22:21:27 +08:00
from pyglet.app import run
from pyglet.window import Window
2020-12-05 21:24:54 +08:00
class Game:
def __init__(self):
# value
# dic
self.parts = {} # now ship parts
self.o_parts = {} # stand for opther parts
self.b_g_e = {} # stand for back ground element
# list
def start_game(self):
2020-12-05 22:21:27 +08:00
run()
2020-12-05 21:24:54 +08:00
def setup(self):
2020-12-05 22:21:27 +08:00
# dic
self.window_c = libs.loads.window_config()
2020-12-05 21:24:54 +08:00
# window
2020-12-05 22:21:27 +08:00
self.window = Window(width=int(self.window_c['width']),
height=int(self.window_c['height']),
fullscreen=bool(self.window_c['fullscreen']),
caption=str(self.window_c['caption']))