本文整理汇总了Python中twisted.internet.protocol.Factory.RealObjects方法的典型用法代码示例。如果您正苦于以下问题:Python Factory.RealObjects方法的具体用法?Python Factory.RealObjects怎么用?Python Factory.RealObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类twisted.internet.protocol.Factory
的用法示例。
在下文中一共展示了Factory.RealObjects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: raw_input
# 需要导入模块: from twisted.internet.protocol import Factory [as 别名]
# 或者: from twisted.internet.protocol.Factory import RealObjects [as 别名]
factory.counter = 0
factory.positions = {}
# Preguntamos si es juego o test
mode = raw_input('[S/s] Server Mode / [] Test Mode:')
is_game = False
if mode == "s" or mode == "S":
is_game = True
print(is_game)
factory.is_game = is_game
factory.maps = []
factory.users_port = {}
factory.RealObjects = {}
factory.lock_positions = threading.Lock()
factory.lock_sockets = threading.Lock()
factory.keys = {
"Red": key_object.KeyObject(1, 5*64, 5*64, "Red"),
"Blue": key_object.KeyObject(2, 6*64, 5*64, "Blue"),
"Yellow": key_object.KeyObject(3, 7*64, 5*64, "Yellow"),
"Green": key_object.KeyObject(4, 8*64, 5*64, "Green")
}
config = json.loads(open('data.json').read())
map_0 = ""
keys_0 = []