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):
def __init__(self, dev_list, dev_dic):
def __init__(self, dev_list, dev_dic, net_mode='local'):
# do father class __init__()
Window.__init__(self)
mp.Process.__init__(self)

View File

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

View File

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

View File

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