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


Python StateData.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, book, parentFSM):
     self.book = book
     self.parentFSM = parentFSM
     StateData.__init__(self, 'optionPageDone')
     self.fsm = ClassicFSM('OptionPage', [State('off', self.enterOff, self.exitOff), State('basePage', self.enterBasePage, self.exitBasePage), State('displayPage', self.enterDisplayPage, self.exitDisplayPage)], 'off', 'off')
     self.fsm.enterInitialState()
     self.parentFSM.getStateNamed('optionPage').addChild(self.fsm)
开发者ID:coginvasion,项目名称:src,代码行数:9,代码来源:OptionPage.py

示例2: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, doneEvent, moveOn = 1):
     StateData.__init__(self, doneEvent)
     self.fsm = ClassicFSM('quietZone', [State('off', self.enterOff, self.exitOff, ['waitForQuietZoneResponse']),
      State('waitForQuietZoneResponse', self.enterWaitForQuietZoneResponse, self.exitWaitForQuietZoneResponse, ['waitForSetZoneResponse']),
      State('waitForSetZoneResponse', self.enterWaitForSetZoneResponse, self.exitWaitForSetZoneResponse, ['waitForSetZoneComplete']),
      State('waitForSetZoneComplete', self.enterWaitForSetZoneComplete, self.exitWaitForSetZoneComplete, ['off'])], 'off', 'off')
     self.fsm.enterInitialState()
     self.moveOn = moveOn
开发者ID:coginvasion,项目名称:src,代码行数:10,代码来源:QuietZoneState.py

示例3: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, book, parentFSM):
     self.book = book
     self.parentFSM = parentFSM
     StateData.__init__(self, 'adminPageDone')
     self.fsm = ClassicFSM('AdminPage', [State('off', self.enterOff, self.exitOff),
      State('basePage', self.enterBasePage, self.exitBasePage),
      State('kickSection', self.enterKickSection, self.exitKickSection),
      State('sysMsgSection', self.enterSysMsgSection, self.exitSysMsgSection)], 'off', 'off')
     self.fsm.enterInitialState()
     self.parentFSM.getStateNamed('adminPage').addChild(self.fsm)
开发者ID:coginvasion,项目名称:src,代码行数:12,代码来源:AdminPage.py

示例4: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, parentFSM):
     StateData.__init__(self, 'avChooseDone')
     self.avChooseFSM = ClassicFSM('avChoose', [State('getToonData', self.enterGetToonData, self.exitGetToonData),
      State('avChoose', self.enterAvChoose, self.exitAvChoose),
      State('waitForToonDelResponse', self.enterWaitForToonDelResponse, self.exitWaitForToonDelResponse),
      State('off', self.enterOff, self.exitOff)], 'off', 'off')
     self.avChooseFSM.enterInitialState()
     self.parentFSM = parentFSM
     self.parentFSM.getStateNamed('avChoose').addChild(self.avChooseFSM)
     self.pickAToon = None
     self.setAvatarsNone()
     return
开发者ID:coginvasion,项目名称:src,代码行数:14,代码来源:AvChooser.py

示例5: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, hood, parentFSMState, doneEvent):
     self.hood = hood
     self.parentFSMState = parentFSMState
     StateData.__init__(self, doneEvent)
     self.fsm = ClassicFSM('TownLoader', [State('start', self.enterStart, self.exitStart, ['quietZone', 'street']),
      State('street', self.enterStreet, self.exitStreet, ['quietZone']),
      State('toonInterior', self.enterToonInterior, self.exitToonInterior, ['quietZone']),
      State('quietZone', self.enterQuietZone, self.exitQuietZone, ['street', 'toonInterior']),
      State('final', self.enterFinal, self.exitFinal, ['start'])], 'start', 'final')
     self.branchZone = None
     self.canonicalBranchZone = None
     self.placeDoneEvent = 'placeDone'
     self.linkTunnels = []
     return
开发者ID:coginvasion,项目名称:src,代码行数:16,代码来源:TownLoader.py

示例6: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, parentFSM, doneEvent, dnaStore, hoodId):
     StateData.__init__(self, doneEvent)
     self.parentFSM = parentFSM
     self.doneEvent = doneEvent
     self.dnaStore = dnaStore
     self.hoodId = hoodId
     self.id = None
     self.titleText = None
     self.suitFog = None
     self.suitLight = None
     self.suitLightColor = (0.4, 0.4, 0.4, 1)
     self.suitFogData = [(0.3, 0.3, 0.3), 0.0025]
     self.titleColor = (1, 1, 1, 1)
     return
开发者ID:coginvasion,项目名称:src,代码行数:16,代码来源:Hood.py

示例7: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, parentFSM, doneEvent):
     self.parentFSM = parentFSM
     StateData.__init__(self, doneEvent)
     self.fsm = ClassicFSM('ShtickerBook', [State('off', self.enterOff, self.exitOff),
      State('optionPage', self.enterOptionPage, self.exitOptionPage, ['districtPage', 'off']),
      State('districtPage', self.enterDistrictPage, self.exitDistrictPage, ['optionPage', 'questPage', 'off']),
      State('questPage', self.enterQuestPage, self.exitQuestPage, ['inventoryPage', 'districtPage', 'off']),
      State('inventoryPage', self.enterInventoryPage, self.exitInventoryPage, ['mapPage', 'questPage', 'off']),
      State('mapPage', self.enterMapPage, self.exitMapPage, ['releaseNotesPage', 'inventoryPage', 'off']),
      State('releaseNotesPage', self.enterReleaseNotesPage, self.exitReleaseNotesPage, ['mapPage', 'off']),
      State('adminPage', self.enterAdminPage, self.exitAdminPage, ['releaseNotesPage', 'off'])], 'off', 'off')
     if base.localAvatar.getAdminToken() > -1:
         self.fsm.getStateNamed('releaseNotesPage').addTransition('adminPage')
     self.fsm.enterInitialState()
     self.entered = 0
     self.parentFSM.getStateNamed('shtickerBook').addChild(self.fsm)
开发者ID:coginvasion,项目名称:src,代码行数:18,代码来源:ShtickerBook.py

示例8: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, distShop, doneEvent):
     StateData.__init__(self, doneEvent)
     self.distShop = distShop
     self.destroyEvent = self.distShop.destroyEvent
     self.origHealth = None
     self.avMoney = base.localAvatar.getMoney()
     self.healCooldownDoneSoundPath = 'phase_3.5/audio/sfx/tt_s_gui_sbk_cdrSuccess.mp3'
     self.healCooldownDoneSfx = None
     self.newHealth = None
     self.pages = 1
     self.window = None
     self.upgradesPurchased = False
     self.originalSupply = {}
     self.healCooldowns = {}
     self.newHealCooldowns = {}
     self.acceptOnce(self.destroyEvent, self.destroy)
     return
开发者ID:coginvasion,项目名称:src,代码行数:19,代码来源:Shop.py

示例9: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, hood, parentFSMState, doneEvent):
     StateData.__init__(self, doneEvent)
     self.hood = hood
     self.parentFSMState = parentFSMState
     self.fsm = ClassicFSM('safeZoneLoader', [State('off', self.enterOff, self.exitOff),
      State('playground', self.enterPlayground, self.exitPlayground, ['quietZone']),
      State('toonInterior', self.enterToonInterior, self.exitToonInterior, ['quietZone']),
      State('quietZone', self.enterQuietZone, self.exitQuietZone, ['playground', 'toonInterior'])], 'off', 'off')
     self.placeDoneEvent = 'placeDone'
     self.place = None
     self.playground = None
     self.battleMusic = None
     self.invasionMusic = None
     self.invasionMusicFiles = None
     self.interiorMusic = None
     self.bossBattleMusic = None
     self.music = None
     self.tournamentMusic = None
     self.linkTunnels = []
     return
开发者ID:coginvasion,项目名称:src,代码行数:22,代码来源:SafeZoneLoader.py

示例10: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, doneEvent, suit, target):
     StateData.__init__(self, doneEvent)
     self.suit = suit
     self.target = target
     self.currentAttack = None
     return
开发者ID:coginvasion,项目名称:src,代码行数:8,代码来源:SuitAttacks.py

示例11: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, loader, doneEvent):
     StateData.__init__(self, doneEvent)
     self.loader = loader
     self.zoneId = None
     self.track = None
     return
开发者ID:coginvasion,项目名称:src,代码行数:8,代码来源:Place.py

示例12: __init__

# 需要导入模块: from direct.fsm.StateData import StateData [as 别名]
# 或者: from direct.fsm.StateData.StateData import __init__ [as 别名]
 def __init__(self, doneEvent):
     StateData.__init__(self, doneEvent)
     self.fsm = ClassicFSM('Walk', [State('off', self.enterOff, self.exitOff, ['walking', 'deadWalking']), State('walking', self.enterWalking, self.exitWalking), State('deadWalking', self.enterDeadWalking, self.exitDeadWalking)], 'off', 'off')
     self.fsm.enterInitialState()
开发者ID:coginvasion,项目名称:src,代码行数:6,代码来源:Walk.py


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