本文整理汇总了Python中Engine.process_clients方法的典型用法代码示例。如果您正苦于以下问题:Python Engine.process_clients方法的具体用法?Python Engine.process_clients怎么用?Python Engine.process_clients使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Engine
的用法示例。
在下文中一共展示了Engine.process_clients方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: import Engine [as 别名]
# 或者: from Engine import process_clients [as 别名]
#print str(Globals.TIMERS)
## Server Loop
while SERVER_RUN:
telnet_server.poll() ## Send, Recv, and look for new connections
kick_idle() ## Check for idle clients
currentTime = time.time()
deltaTime = (currentTime - startupTime) - lastTime
# print "last " + str(lastTime)
# print "cur+start " + str((currentTime-startupTime))
# print "del " + str(deltaTime)
for timer in Globals.TIMERS:
timer.tick(deltaTime)
for timer in Globals.MoveTIMERS:
timer.tick(deltaTime)
lastTime = (currentTime - startupTime)
engineState = Engine.process_clients(SERVER_RUN, OPList, CLIENT_LIST, CLIENT_DATA) ## Check for client input, saving any state changes generated by the engine to 'engineState'
if engineState == 'shutdown':
#print engineState
SysInit.dataSave(CLIENT_LIST, CLIENT_DATA, TIMERS)
RoomInit.saveAllRooms()
MobInit.saveMobs()
Objects.saveEq()
SERVER_RUN = False
print("<< Server shutdown.")