From fa29c261bfdb6e5ce577c7125568ad8d5aec4233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E7=91=97=E6=9D=B0?= <3695888@qq.com> Date: Thu, 28 Jan 2021 22:50:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E6=84=A7=E6=98=AF=E6=88=91=E5=91=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/client.py | 14 +++++++------- docs/configes sample/in_file_config.json5 | 18 +++++++++++++----- docs/rua!.md | 3 +++ 3 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 docs/rua!.md diff --git a/bin/client.py b/bin/client.py index 2870727..e8c909e 100644 --- a/bin/client.py +++ b/bin/client.py @@ -21,8 +21,8 @@ class RenderThread(mp.Process, pyglet.window.Window): # logging self.logger = logger # value - self.process_id = 'Render' - self.process_name = 'render process' + self.process_id = 'Client' + self.process_name = 'Client process' # share memory self.dev_list = dev_list self.dev_dic = dev_dic @@ -48,17 +48,17 @@ class RenderThread(mp.Process, pyglet.window.Window): caption=str(self.window_c['caption']), visible=bin.tools.mbool(self.window_c['visible'])) - """ - keyboard and mouse input - """ - def on_draw(self): # render parts for ship in self.parts: - ship_poi = ship + ship_poi = ship['brain'][3] for part in ship: pass + """ + keyboard and mouse input + """ + def on_mouse_motion(self, x, y, dx, dy): pass diff --git a/docs/configes sample/in_file_config.json5 b/docs/configes sample/in_file_config.json5 index 58704b3..f5b2cc4 100644 --- a/docs/configes sample/in_file_config.json5 +++ b/docs/configes sample/in_file_config.json5 @@ -10,7 +10,7 @@ 'client': { 'self.parts': { 'ship name': { - 'control center': [ + 'brain': [ 'part type', // part type 'turn', @@ -21,14 +21,14 @@ 'basic_config.basic_poi' ] /*rua! 我用中文了! - 飞船的"控制中心"(直译)没有"特殊值" - 也就是说控制中心只是一个"壳"(服务端同理) + 飞船的"大脑"(直译)没有"特殊值" + 也就是说"大脑"只是一个"壳"(服务端同理) 只会计算位置、方向之类的统一数据 - 需要改的话发issue + 需要改的话发issue 嘿嘿 */ ], 'part ID': [ - // partId + // part id 'part type', // part type 'turn', @@ -41,6 +41,14 @@ { 'special value 1': 'xxx', 'special value 2': 'xxx' + /*继续继续 + 这里的“特殊值”指的是 + 除去上面写的类型、角度、镜像、位置之外的其他属性 + 比如燃料罐的燃料量、太阳能板的打开状态 + 需要渲染一些特殊项的时候 + 比如对接之后传输燃料、渲染太阳能板 + 的时候可以用到 + */ } ] } diff --git a/docs/rua!.md b/docs/rua!.md new file mode 100644 index 0000000..c58372a --- /dev/null +++ b/docs/rua!.md @@ -0,0 +1,3 @@ +# pyglet相关 + +pyglet 坐标轴原点是左上角