當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。