本文整理汇总了Python中CvScreensInterface.showUnVictoryScreen方法的典型用法代码示例。如果您正苦于以下问题:Python CvScreensInterface.showUnVictoryScreen方法的具体用法?Python CvScreensInterface.showUnVictoryScreen怎么用?Python CvScreensInterface.showUnVictoryScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CvScreensInterface
的用法示例。
在下文中一共展示了CvScreensInterface.showUnVictoryScreen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onKbdEvent
# 需要导入模块: import CvScreensInterface [as 别名]
# 或者: from CvScreensInterface import showUnVictoryScreen [as 别名]
def onKbdEvent(self, argsList):
'keypress handler - return 1 if the event was consumed'
eventType,key,mx,my,px,py = argsList
game = gc.getGame()
if (self.bAllowCheats):
# notify debug tools of input to allow it to override the control
argsList = (eventType,key,self.bCtrl,self.bShift,self.bAlt,mx,my,px,py,gc.getGame().isNetworkMultiPlayer())
if ( CvDebugTools.g_CvDebugTools.notifyInput(argsList) ):
return 0
if ( eventType == self.EventKeyDown ):
theKey=int(key)
CvCameraControls.g_CameraControls.handleInput( theKey )
if (self.bAllowCheats):
# Shift - T (Debug - No MP)
if (theKey == int(InputTypes.KB_T)):
if ( self.bShift ):
self.beginEvent(CvUtil.EventAwardTechsAndGold)
#self.beginEvent(CvUtil.EventCameraControlPopup)
return 1
elif (theKey == int(InputTypes.KB_W)):
if ( self.bShift and self.bCtrl):
self.beginEvent(CvUtil.EventShowWonder)
return 1
# Shift - ] (Debug - currently mouse-overd unit, health += 10
elif (theKey == int(InputTypes.KB_LBRACKET) and self.bShift ):
unit = CyMap().plot(px, py).getUnit(0)
if ( not unit.isNone() ):
d = min( unit.maxHitPoints()-1, unit.getDamage() + 10 )
unit.setDamage( d, PlayerTypes.NO_PLAYER )
# Shift - [ (Debug - currently mouse-overd unit, health -= 10
elif (theKey == int(InputTypes.KB_RBRACKET) and self.bShift ):
unit = CyMap().plot(px, py).getUnit(0)
if ( not unit.isNone() ):
d = max( 0, unit.getDamage() - 10 )
unit.setDamage( d, PlayerTypes.NO_PLAYER )
elif (theKey == int(InputTypes.KB_F1)):
if ( self.bShift ):
CvScreensInterface.replayScreen.showScreen(False)
return 1
# don't return 1 unless you want the input consumed
elif (theKey == int(InputTypes.KB_F2)):
if ( self.bShift ):
import CvDebugInfoScreen
CvScreensInterface.showDebugInfoScreen()
return 1
elif (theKey == int(InputTypes.KB_F3)):
if ( self.bShift ):
CvScreensInterface.showDanQuayleScreen(())
return 1
elif (theKey == int(InputTypes.KB_F4)):
if ( self.bShift ):
CvScreensInterface.showUnVictoryScreen(())
return 1
return 0