From 2119eb1a8efcfc6d6a9cdf563eb7126d3ac505bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E7=91=97=E6=9D=B0?= <3695888@qq.com> Date: Sat, 26 Dec 2020 00:44:35 +0800 Subject: [PATCH] sleep! --- docs/configes sample/basic_config.json | 5 ++++- docs/configes sample/in_file_config.json | 3 ++- libs/Game_threads/orbit_demo.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/configes sample/basic_config.json b/docs/configes sample/basic_config.json index cb781d3..9fb2c19 100644 --- a/docs/configes sample/basic_config.json +++ b/docs/configes sample/basic_config.json @@ -10,6 +10,9 @@ } }, "basic_number": { - "name" : ["float", "int", ["unit"], ["unit"], "name = float × 10^int × unit(s) ÷ unit(s)"] + "name": ["float", "int", ["unit"], ["unit"], "name = float × 10^int × unit(s) ÷ unit(s)"] + }, + "basic_force" : { + "name": ["x", "y", "x&y format:basic_number/unit1:[m]/unit2:[]"] } } \ No newline at end of file diff --git a/docs/configes sample/in_file_config.json b/docs/configes sample/in_file_config.json index 15e0802..a28c04d 100644 --- a/docs/configes sample/in_file_config.json +++ b/docs/configes sample/in_file_config.json @@ -2,7 +2,8 @@ "Game_threads": { "orbit_demo": { "ship_info": { - "mass" : "basic_config:basic_number" + "mass": "basic_config:basic_number", + "force": "basic_config:basic_force" } } } diff --git a/libs/Game_threads/orbit_demo.py b/libs/Game_threads/orbit_demo.py index 94c5045..7ca38bc 100644 --- a/libs/Game_threads/orbit_demo.py +++ b/libs/Game_threads/orbit_demo.py @@ -15,7 +15,7 @@ class Orbit_demo(threading.Thread): # father class __init__() threading.Thread.__init__(self) # dic - self.ship_info = {"mass": [1, 5, ["kg"], []],} + self.ship_info = {"mass": [1, 5, ["kg"], []], "force": []} self.planet_system = {"Solar System": {"planets": {"smearth": {"description": "", "gravity": 9.81, "radius": 63710000, "map_color": [103, 157, 255]}}}} self.main_ship_parts = {} self.this_planet_info = {}