This commit is contained in:
沈瑗杰 2021-01-25 07:32:39 +08:00
parent 1512daa86d
commit 75fb3237be
4 changed files with 7 additions and 5 deletions

View File

@ -14,7 +14,7 @@ from pyglet.window import Window
class RenderThread(mp.Process, pyglet.window.Window): class RenderThread(mp.Process, pyglet.window.Window):
def __init__(self, dev_list, dev_dic): def __init__(self, dev_list, dev_dic, net_mode='local'):
# do father class __init__() # do father class __init__()
Window.__init__(self) Window.__init__(self)
mp.Process.__init__(self) mp.Process.__init__(self)

View File

@ -16,8 +16,8 @@ class Game():
def __init__(self): def __init__(self):
self.dics = share().dict() self.dics = share().dict()
self.lists = share().list() self.lists = share().list()
self.client = client.RenderThread(self.lists, self.dics) self.client = client.RenderThread(self.lists, self.dics, net_mode='local')
self.server = server.server(self.lists, self.dics) self.server = server.server(self.lists, self.dics, net_mode='local')
def setup(self): def setup(self):
pass pass

View File

@ -7,13 +7,13 @@ import multiprocessing as mp
class server(mp.Process): class server(mp.Process):
def __init__(self, dev_list, dev_dic): def __init__(self, dev_list, dev_dic, net_mode='local'):
# father class __init__() # father class __init__()
mp.Process.__init__(self) mp.Process.__init__(self)
# value # value
self.process_id = 'Server' self.process_id = 'Server'
self.process_name = 'server process' self.process_name = 'server process'
# share memery # share memory
self.dev_list = dev_list self.dev_list = dev_list
self.dev_dic = dev_dic self.dev_dic = dev_dic

View File

@ -6,6 +6,8 @@
"caption": "Simple Rocket {version}", "caption": "Simple Rocket {version}",
// {version} -> version of SR // {version} -> version of SR
"resizable": "true", "resizable": "true",
// bool
"visible": "true", "visible": "true",
// bool
"style": "None" "style": "None"
} }