本文整理汇总了Python中app.scense.core.PlayersManager.PlayersManager.stopAllTimer方法的典型用法代码示例。如果您正苦于以下问题:Python PlayersManager.stopAllTimer方法的具体用法?Python PlayersManager.stopAllTimer怎么用?Python PlayersManager.stopAllTimer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app.scense.core.PlayersManager.PlayersManager
的用法示例。
在下文中一共展示了PlayersManager.stopAllTimer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: leaveScene_610
# 需要导入模块: from app.scense.core.PlayersManager import PlayersManager [as 别名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import stopAllTimer [as 别名]
def leaveScene_610(dynamicId,characterId):
'''离开场景'''
player = PlayersManager().getPlayerByID(characterId)
if not player:
return None,0
player.stopAllTimer()
playerDumps = cPickle.dumps(player)
player.startAllTimer()
placeId = player.baseInfo.getTown()
return playerDumps,placeId
示例2: DropCharacterInNode_612
# 需要导入模块: from app.scense.core.PlayersManager import PlayersManager [as 别名]
# 或者: from app.scense.core.PlayersManager.PlayersManager import stopAllTimer [as 别名]
def DropCharacterInNode_612(dynamicId,characterId):
'''移除角色在当前场景(副本)服务中的实例
'''
player = PlayersManager().getPlayerByID(characterId)
if not player:
return False
if player.baseInfo.getState()==0:
placeId = player.baseInfo.getTown()
scene = MapManager().getMapId(placeId)
scene.dropPlayer(characterId)
for petId in player.matrix._matrixSetting.values():
if petId>0:
scene.dropPet(petId)
player.stopAllTimer()
PlayersManager().dropPlayerByID(characterId)
return True