From 96cf2ba3f19e1764aa5c64a640f714a857d20884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E7=91=97=E6=9D=B0?= <3695888@qq.com> Date: Mon, 21 Dec 2020 22:11:49 +0800 Subject: [PATCH] awa --- libs/Game_threads/calculations.py | 9 +++++++++ libs/Game_threads/orbit_demo.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/Game_threads/calculations.py b/libs/Game_threads/calculations.py index e2e7848..7cfb1a6 100644 --- a/libs/Game_threads/calculations.py +++ b/libs/Game_threads/calculations.py @@ -15,6 +15,15 @@ def P_C_M(A, B): # stand for Physics Calculation multiple C = [0.0, 1, [], []] Float = A[0] * B[0] Int = A[1] + B[1] + if Float >= 10: + Float /= 10 + Int += 1 + elif Float <= 0.01: + Float *= 10 + Int -= 1 + else: + Float = float(Float) + Int = int(Int) Unit1 = A[2].extend(B[2]) Unit2 = [] for unit in B[3]: diff --git a/libs/Game_threads/orbit_demo.py b/libs/Game_threads/orbit_demo.py index 89a54d6..6233c6d 100644 --- a/libs/Game_threads/orbit_demo.py +++ b/libs/Game_threads/orbit_demo.py @@ -26,4 +26,4 @@ class Orbit_demo(threading.Thread): print("ha ?") def orbit_math(self): - mass = self.ship_info["mass"] + pass