当前位置: 首页>>代码示例>>Python>>正文


Python NODE_STATE.change2Unlocked方法代码示例

本文整理汇总了Python中gui.Scaleform.daapi.view.lobby.techtree.settings.NODE_STATE.change2Unlocked方法的典型用法代码示例。如果您正苦于以下问题:Python NODE_STATE.change2Unlocked方法的具体用法?Python NODE_STATE.change2Unlocked怎么用?Python NODE_STATE.change2Unlocked使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gui.Scaleform.daapi.view.lobby.techtree.settings.NODE_STATE的用法示例。


在下文中一共展示了NODE_STATE.change2Unlocked方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _change2Unlocked

# 需要导入模块: from gui.Scaleform.daapi.view.lobby.techtree.settings import NODE_STATE [as 别名]
# 或者: from gui.Scaleform.daapi.view.lobby.techtree.settings.NODE_STATE import change2Unlocked [as 别名]
 def _change2Unlocked(self, node):
     state = NODE_STATE.change2Unlocked(node['state'])
     if state < 0:
         return node['state']
     node['state'] = state
     if self._canBuy(node['id']):
         state = NODE_STATE.add(state, NODE_STATE.ENOUGH_MONEY)
     else:
         state = NODE_STATE.remove(state, NODE_STATE.ENOUGH_MONEY)
     if state < 0:
         return node['state']
     node['state'] = state
     return state
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:15,代码来源:data.py

示例2: _change2Unlocked

# 需要导入模块: from gui.Scaleform.daapi.view.lobby.techtree.settings import NODE_STATE [as 别名]
# 或者: from gui.Scaleform.daapi.view.lobby.techtree.settings.NODE_STATE import change2Unlocked [as 别名]
 def _change2Unlocked(self, node):
     """
     Changes state of node to 'unlocked'.
     :param node: node data.
     :return: int containing new state of node.
     """
     state = NODE_STATE.change2Unlocked(node['state'])
     if state < 0:
         return node['state']
     node['state'] = state
     if self._mayObtainForMoney(node['id']):
         state = NODE_STATE.add(state, NODE_STATE_FLAGS.ENOUGH_MONEY)
     else:
         state = NODE_STATE.remove(state, NODE_STATE_FLAGS.ENOUGH_MONEY)
     if state < 0:
         return node['state']
     node['state'] = state
     return state
开发者ID:aevitas,项目名称:wotsdk,代码行数:20,代码来源:techtreedata.py


注:本文中的gui.Scaleform.daapi.view.lobby.techtree.settings.NODE_STATE.change2Unlocked方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。