本文整理汇总了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)
示例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
示例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)
示例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
示例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
示例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
示例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)
示例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
示例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
示例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
示例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
示例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()