some tests

This commit is contained in:
沈瑗杰 2020-12-06 22:28:18 +08:00
parent 4a6d0480d8
commit 582497b3fe
14 changed files with 46 additions and 16 deletions

View File

@ -1,3 +1,14 @@
{
"language": "zh_cn"
"language": "zh_cn",
"textures": {
"back_ground_space": "back_ground_space.png",
"planet": {
"earth_ground": "earth_ground.png"
},
"flame": {
"liquid": "liquid_engine_flame.png",
"soild": "soild_engine_flame.png",
"ion": "ion_engine_flame.png"
}
}
}

View File

@ -1,8 +1,9 @@
{
"width": "1024",
"height": "768",
"fullscreen": "False",
"fullscreen": "0",
"caption": "Simple Rocket 0.1",
"visible": "True",
"resizable":"1",
"visible": "1",
"style": "None"
}

View File

@ -0,0 +1,12 @@
{
"language": "language",
"textures": {
"back_ground_space": "xxx.png",
"planet": {
"xxx": "xxx.png"
},
"flame": {
"xxx": "xxx.png"
}
}
}

View File

@ -1,8 +1,9 @@
{
"width": "int",
"height": "int",
"fullscreen": "bool",
"fullscreen": "`1/0`",
"caption": "xxx",
"visible": "bool",
"resizable":"1/0",
"visible": "1/0",
"style": "xxx(in list)"
}

View File

@ -3,9 +3,8 @@ writen by shenjackyuanjie
mail: 3695888@qq.com
"""
# import folders
import libs.textures
import libs.loads
# import in this forder
import libs.main
import libs.loads
import libs.setup

View File

@ -8,8 +8,17 @@ import libs
from pyglet.app import run
from pyglet.window import Window
from pyglet.resource import image
def mbool(thing): # stand for my bool
if (thing == "True") or (thing == 1) or (thing == "1"):
return True
elif (thing == "False") or (thing == 0) or (thing == "0"):
return False
else:
raise ValueError("Need a 'like bool' not anything else")
class Game:
def __init__(self):
# value
@ -21,13 +30,17 @@ class Game:
def start_game(self):
run()
return
def setup(self):
# dic
self.window_c = libs.loads.config(".\\configs\\window.json")
self.tc = libs.loads.config(".\\configs\\basic_config", "textures")
# image
self.b_g = image("")
# window
self.window = Window(width=int(self.window_c['width']),
height=int(self.window_c['height']),
fullscreen=bool(self.window_c['fullscreen']),
fullscreen=mbool(self.window_c['fullscreen']),
caption=str(self.window_c['caption']),
visible=bool(self.window_c['visible']))
visible=mbool(self.window_c['visible']))

View File

@ -1,7 +0,0 @@
"""
writen by shenjackyuanjie
mail: 3695888@qq.com
"""
# import folders
# import in this forder

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 7.6 MiB

After

Width:  |  Height:  |  Size: 7.6 MiB

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB