本文整理汇总了Python中toontown.toon.NPCToons.createNPC方法的典型用法代码示例。如果您正苦于以下问题:Python NPCToons.createNPC方法的具体用法?Python NPCToons.createNPC怎么用?Python NPCToons.createNPC使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toon.NPCToons
的用法示例。
在下文中一共展示了NPCToons.createNPC方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: startup
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def startup(self):
HoodAI.HoodAI.startup(self)
if simbase.config.GetBool('want-minigames', True):
self.createTrolley()
if simbase.config.GetBool('want-classic-chars', True):
if simbase.config.GetBool('want-mickey', True):
self.createClassicChar()
if simbase.config.GetBool('want-butterflies', True):
self.createButterflies()
if simbase.air.wantYinYang:
NPCToons.createNPC(
simbase.air, 2021,
(ToontownGlobals.ToontownCentral, TTLocalizer.NPCToonNames[2021], ('css', 'ms', 'm', 'm', 26, 0, 26, 26, 0, 27, 0, 27, 0, 27), 'm', 1, NPCToons.NPC_YIN),
ToontownGlobals.ToontownCentral, posIndex=0)
NPCToons.createNPC(
simbase.air, 2022,
(ToontownGlobals.ToontownCentral, TTLocalizer.NPCToonNames[2022], ('bss', 'ms', 'm', 'm', 0, 0, 0, 0, 0, 31, 0, 31, 0, 31), 'm', 1, NPCToons.NPC_YANG),
ToontownGlobals.ToontownCentral, posIndex=0)
if simbase.air.wantHalloween:
self.TrickOrTreatTargetManager = DistributedTrickOrTreatTargetAI.DistributedTrickOrTreatTargetAI(self.air)
self.TrickOrTreatTargetManager.generateWithRequired(2649)
if simbase.air.wantChristmas:
self.WinterCarolingTargetManager = DistributedWinterCarolingTargetAI.DistributedWinterCarolingTargetAI(self.air)
self.WinterCarolingTargetManager.generateWithRequired(2649)
if simbase.config.GetBool('want-experiment-event'):
self.createExperimentEvent()
示例2: __init__
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def __init__(self, air, zones, avId):
FSM.__init__(self, 'TutorialFSM')
self.avId = avId
self.zones = zones
self.air = air
npcDesc = NPCToons.NPCToonDict.get(20000)
self.tom = NPCToons.createNPC(self.air, 20000, npcDesc, self.zones.shop, 0)
self.tom.setTutorial(1)
npcDesc = NPCToons.NPCToonDict.get(20002)
self.harry = NPCToons.createNPC(self.air, 20002, npcDesc, self.zones.hq, 0)
self.harry.setTutorial(1)
self.building = ToontorialBuildingAI(self.air, zones.street, zones.shop, self.tom.getDoId())
self.hq = HQBuildingAI(self.air, zones.street, zones.hq, 1)
self.forceTransition('Introduction')
示例3: enterTunnel
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def enterTunnel(self):
npcDesc = NPCToons.NPCToonDict.get(20001)
self.flippy = NPCToons.createNPC(self.air, 20001, npcDesc, self.zones.street, 0)
self.hq.insideDoor1.setDoorLock(FADoorCodes.UNLOCKED)
self.hq.door1.setDoorLock(FADoorCodes.GO_TO_PLAYGROUND)
self.hq.insideDoor0.setDoorLock(FADoorCodes.WRONG_DOOR_HQ)
示例4: generateWithRequired
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def generateWithRequired(self, zoneId):
DistributedObjectAI.generateWithRequired(self, zoneId)
self.npc = NPCToons.createNPC(self.air, self.npcId,
NPCToons.NPCToonDict[self.npcId],
self.zoneId)
self.npc.setScienceFair(self)
示例5: x
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def x():
for door, code in map.items():
door.setDoorLock(code)
if index == 2 and self.streetNpc is None:
self.streetNpc = NPCToons.createNPC(self.air, 20001, NPCToons.NPCToonDict[20001], self.branchZone)
self.streetNpc.setTutorial(1)
self.streetNpc.d_setPos(207, 19, -0.48)
self.streetNpc.d_setHpr(90, 0, 0)
示例6: __init__
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def __init__(self, air, zones, avId):
FSM.__init__(self, 'TutorialFSM')
self.air = air
self.zones = zones
self.avId = avId
npcDesc = NPCToons.NPCToonDict.get(20000)
self.tutorialTom = NPCToons.createNPC(self.air, 20000, npcDesc, self.zones['building'])
self.tutorialTom.setTutorial(1)
npcDesc = NPCToons.NPCToonDict.get(20002)
self.hqHarry = NPCToons.createNPC(self.air, 20002, npcDesc, self.zones['hq'])
self.hqHarry.setTutorial(1)
self.hqHarry.setHq(1)
self.building = TutorialBuildingAI(
self.air, self.zones['street'], self.zones['building'], 2, self.tutorialTom.getDoId())
self.hq = HQBuildingAI(self.air, self.zones['street'], self.zones['hq'], 1)
self.forceTransition('Introduction')
示例7: createStreet
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def createStreet(self, streetZone, shopZone, hqZone):
flunky = DistributedTutorialSuitAI.DistributedTutorialSuitAI(self.air)
suitType = SuitDNA.getSuitType('f')
suitTrack = SuitDNA.getSuitDept('f')
flunky.setupSuitDNA(1, suitType, suitTrack)
flunky.generateWithRequired(streetZone)
desc = NPCToons.NPCToonDict.get(20001)
npc = NPCToons.createNPC(self.air, 20001, desc, streetZone)
npc.setTutorial(1)
npc.d_setPos(207.4, 18.81, -0.475)
npc.d_setHpr(90.0, 0, 0)
示例8: enterTunnel
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def enterTunnel(self):
npcDesc = NPCToons.NPCToonDict.get(20001)
self.flippy = NPCToons.createNPC(self.air, 20001, npcDesc, self.zones['street'], 0)
self.BlackCatManager = DistributedBlackCatMgrAI.DistributedBlackCatMgrAI(self.air)
self.BlackCatManager.generateWithRequired(self.zones['street'])
self.hq.insideDoor0.setDoorLock(FADoorCodes.WRONG_DOOR_HQ)
self.hq.insideDoor1.setDoorLock(FADoorCodes.UNLOCKED)
self.hq.door0.setDoorLock(FADoorCodes.GO_TO_PLAYGROUND)
self.hq.door1.setDoorLock(FADoorCodes.GO_TO_PLAYGROUND)
self.building.door.setDoorLock(FADoorCodes.GO_TO_PLAYGROUND)
示例9: startup
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def startup(self):
HoodAI.HoodAI.startup(self)
if simbase.config.GetBool("want-minigames", True):
self.createTrolley()
if simbase.config.GetBool("want-classic-chars", True):
if simbase.config.GetBool("want-mickey", True):
self.createClassicChar()
if simbase.config.GetBool("want-butterflies", True):
self.createButterflies()
if simbase.air.wantYinYang:
NPCToons.createNPC(
simbase.air,
2021,
(
ToontownGlobals.ToontownCentral,
TTLocalizer.NPCToonNames[2021],
("css", "ms", "m", "m", 26, 0, 26, 26, 0, 27, 0, 27, 0, 27),
"m",
1,
NPCToons.NPC_YIN,
),
ToontownGlobals.ToontownCentral,
posIndex=0,
)
NPCToons.createNPC(
simbase.air,
2022,
(
ToontownGlobals.ToontownCentral,
TTLocalizer.NPCToonNames[2022],
("bss", "ms", "m", "m", 0, 0, 0, 0, 0, 31, 0, 31, 0, 31),
"m",
1,
NPCToons.NPC_YANG,
),
ToontownGlobals.ToontownCentral,
posIndex=0,
)
示例10: generate
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def generate(self):
DistributedObjectAI.generate(self)
self.pond = DistributedFishingPondAI(self.air)
self.pond.setArea(ToontownGlobals.MyEstate)
self.pond.generateWithRequired(self.zoneId)
self.pond.bingoMgr = DistributedPondBingoManagerAI(self.air)
self.pond.bingoMgr.setPondDoId(self.pond.doId)
self.pond.bingoMgr.generateWithRequired(self.zoneId)
if self.air.holidayManager.isHolidayRunning(ToontownGlobals.FISH_BINGO_NIGHT):
self.pond.bingoMgr.enableBingo()
for i in xrange(FishingTargetGlobals.getNumTargets(ToontownGlobals.MyEstate)):
target = DistributedFishingTargetAI(self.air)
target.setPondDoId(self.pond.getDoId())
target.generateWithRequired(self.zoneId)
self.targets.append(target)
if simbase.config.GetBool('want-estate-fisherman', False):
self.fisherman = NPCToons.createNPC(self.air, 91919,
NPCToons.NPCToonDict[91919], self.zoneId)
spot = DistributedFishingSpotAI(self.air)
spot.setPondDoId(self.pond.getDoId())
spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
spot.generateWithRequired(self.zoneId)
self.spots.append(spot)
spot = DistributedFishingSpotAI(self.air)
spot.setPondDoId(self.pond.getDoId())
spot.setPosHpr(46.5222, -134.739, 0.390713, 75, 0, 0)
spot.generateWithRequired(self.zoneId)
self.spots.append(spot)
spot = DistributedFishingSpotAI(self.air)
spot.setPondDoId(self.pond.getDoId())
spot.setPosHpr(41.31, -144.559, 0.375978, 45, 0, 0)
spot.generateWithRequired(self.zoneId)
self.spots.append(spot)
spot = DistributedFishingSpotAI(self.air)
spot.setPondDoId(self.pond.getDoId())
spot.setPosHpr(46.8254, -113.682, 0.46015, 135, 0, 0)
spot.generateWithRequired(self.zoneId)
self.spots.append(spot)
self.createTreasurePlanner()
示例11: startup
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def startup(self):
HoodAI.HoodAI.startup(self)
if simbase.config.GetBool('want-minigames', True):
self.createTrolley()
if simbase.config.GetBool('want-butterflies', True):
self.createButterflies()
NPCToons.createNPC(
simbase.air, 2021,
(ToontownGlobals.ToontownCentral, TTLocalizer.NPCToonNames[2021], ('dss', 'ls', 's', 'm', 13, 41, 13, 13, 1, 6, 1, 6, 0, 18, 0), 'm', 1, NPCToons.NPC_GLOVE),
ToontownGlobals.ToontownCentral, posIndex=0)
if simbase.air.wantHalloween:
self.TrickOrTreatTargetManager = DistributedTrickOrTreatTargetAI.DistributedTrickOrTreatTargetAI(self.air)
self.TrickOrTreatTargetManager.generateWithRequired(2649)
if simbase.air.wantChristmas:
self.WinterCarolingTargetManager = DistributedWinterCarolingTargetAI.DistributedWinterCarolingTargetAI(self.air)
self.WinterCarolingTargetManager.generateWithRequired(2649)
if simbase.air.wantJorElCam:
self.JorElCamManager = DistributedJorElCamAI.DistributedJorElCamAI(self.air)
self.JorElCamManager.generateWithRequired(self.zoneId)
示例12: createHQ
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def createHQ(self, streetZone, shopZone, hqZone):
interior = DistributedHQInteriorAI(1, self.air, hqZone)
interior.generateWithRequired(hqZone)
interior.setTutorial(1)
desc = NPCToons.NPCToonDict.get(20002)
npc = NPCToons.createNPC(self.air, 20002, desc, hqZone)
npc.setTutorial(1)
npc.setHq(1)
door0 = DistributedDoorAI.DistributedDoorAI(
self.air, 1, DoorTypes.EXT_HQ, doorIndex=0,
lockValue=FADoorCodes.DEFEAT_FLUNKY_HQ)
door1 = DistributedDoorAI.DistributedDoorAI(
self.air, 1, DoorTypes.EXT_HQ, doorIndex=1,
lockValue=FADoorCodes.DEFEAT_FLUNKY_HQ)
insideDoor0 = DistributedDoorAI.DistributedDoorAI(
self.air, 1, DoorTypes.INT_HQ, doorIndex=0,
lockValue=FADoorCodes.TALK_TO_HQ)
insideDoor1 = DistributedDoorAI.DistributedDoorAI(
self.air, 1, DoorTypes.INT_HQ, doorIndex=1,
lockValue=FADoorCodes.TALK_TO_HQ)
door0.setOtherDoor(insideDoor0)
insideDoor0.setOtherDoor(door0)
door1.setOtherDoor(insideDoor1)
insideDoor1.setOtherDoor(door1)
door0.zoneId = streetZone
door1.zoneId = streetZone
insideDoor0.zoneId = hqZone
insideDoor1.zoneId = hqZone
door0.generateWithRequired(streetZone)
door1.generateWithRequired(streetZone)
door0.sendUpdate('setDoorIndex', [door0.getDoorIndex()])
door1.sendUpdate('setDoorIndex', [door1.getDoorIndex()])
insideDoor0.generateWithRequired(hqZone)
insideDoor1.generateWithRequired(hqZone)
insideDoor0.sendUpdate('setDoorIndex', [insideDoor0.getDoorIndex()])
insideDoor1.sendUpdate('setDoorIndex', [insideDoor1.getDoorIndex()])
self.accept('extHqDoor0-{0}'.format(streetZone), door0.setDoorLock)
self.accept('extHqDoor1-{0}'.format(streetZone), door1.setDoorLock)
self.accept('intHqDoor0-{0}'.format(hqZone), insideDoor0.setDoorLock)
self.accept('intHqDoor1-{0}'.format(hqZone), insideDoor1.setDoorLock)
示例13: createShop
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def createShop(self, streetZone, shopZone, hqZone):
shopInterior = DistributedTutorialInteriorAI(2, self.air, shopZone)
desc = NPCToons.NPCToonDict.get(20000)
npc = NPCToons.createNPC(self.air, 20000, desc, shopZone)
npc.setTutorial(1)
shopInterior.setTutorialNpcId(npc.doId)
shopInterior.generateWithRequired(shopZone)
extShopDoor = DistributedDoorAI.DistributedDoorAI(self.air, 2, DoorTypes.EXT_STANDARD,
lockValue=FADoorCodes.DEFEAT_FLUNKY_TOM)
intShopDoor = DistributedDoorAI.DistributedDoorAI(self.air, 2, DoorTypes.INT_STANDARD,
lockValue=FADoorCodes.TALK_TO_TOM)
extShopDoor.setOtherDoor(intShopDoor)
intShopDoor.setOtherDoor(extShopDoor)
extShopDoor.zoneId = streetZone
intShopDoor.zoneId = shopZone
extShopDoor.generateWithRequired(streetZone)
extShopDoor.sendUpdate('setDoorIndex', [extShopDoor.getDoorIndex()])
intShopDoor.generateWithRequired(shopZone)
intShopDoor.sendUpdate('setDoorIndex', [intShopDoor.getDoorIndex()])
self.accept('intShopDoor-{0}'.format(shopZone), intShopDoor.setDoorLock)
self.accept('extShopDoor-{0}'.format(streetZone), extShopDoor.setDoorLock)
示例14: create
# 需要导入模块: from toontown.toon import NPCToons [as 别名]
# 或者: from toontown.toon.NPCToons import createNPC [as 别名]
def create(self):
self.branchZone = self.air.zoneAllocator.allocate()
self.interiorZone = self.air.zoneAllocator.allocate()
self.hqZone = self.air.zoneAllocator.allocate()
self.streetInteriorDoor = DistributedDoorAI.DistributedDoorAI(
self.air, 2, DoorTypes.EXT_STANDARD, lockValue=FADoorCodes.DEFEAT_FLUNKY_TOM
)
self.interiorDoor = DistributedDoorAI.DistributedDoorAI(
self.air, 2, DoorTypes.INT_STANDARD, lockValue=FADoorCodes.TALK_TO_TOM
)
self.streetInteriorDoor.setOtherDoor(self.interiorDoor)
self.interiorDoor.setOtherDoor(self.streetInteriorDoor)
self.acceptDoorEvent(1, {self.interiorDoor: FADoorCodes.UNLOCKED}) # after tom
self.streetInteriorDoor.generateWithRequired(self.branchZone)
self.streetInteriorDoor.sendUpdate("setDoorIndex", [self.streetInteriorDoor.getDoorIndex()])
self.interiorDoor.generateWithRequired(self.interiorZone)
self.interiorDoor.sendUpdate("setDoorIndex", [self.interiorDoor.getDoorIndex()])
self.tom = NPCToons.createNPC(self.air, 20000, NPCToons.NPCToonDict[20000], self.interiorZone)
self.tom.setTutorial(1)
self.tom.b_setParent(1)
self.tomInterior = DistributedTutorialInteriorAI.DistributedTutorialInteriorAI(2, self.air, self.interiorZone)
self.tomInterior.setTutorialNpcId(self.tom.doId)
self.tomInterior.generateWithRequired(self.interiorZone)
self.cog = DistributedTutorialSuitAI.DistributedTutorialSuitAI(self.air, self)
self.cog.setupSuitDNA(1, 0, "c")
self.cog.generateWithRequired(self.branchZone)
self.streetNpc = None
self.hqInterior = DistributedHQInteriorAI.DistributedHQInteriorAI(1, self.air, self.hqZone)
self.hqInterior.generateWithRequired(self.hqZone)
self.hqInterior.setTutorial(1)
self.hqNpc = NPCToons.createNPC(self.air, 20002, NPCToons.NPCToonDict[20002], self.hqZone)
self.hqNpc.setTutorial(1)
self.hqNpc.setHq(1)
self.streetHqDoor = DistributedDoorAI.DistributedDoorAI(
self.air, 1, DoorTypes.EXT_HQ, doorIndex=0, lockValue=FADoorCodes.DEFEAT_FLUNKY_HQ
)
self.streetHqDoor2 = DistributedDoorAI.DistributedDoorAI(
self.air, 1, DoorTypes.EXT_HQ, doorIndex=1, lockValue=FADoorCodes.DEFEAT_FLUNKY_HQ
)
self.hqInsideDoor = DistributedDoorAI.DistributedDoorAI(
self.air, 1, DoorTypes.INT_HQ, doorIndex=0, lockValue=FADoorCodes.TALK_TO_HQ
)
self.hqInsideDoor2 = DistributedDoorAI.DistributedDoorAI(
self.air, 1, DoorTypes.INT_HQ, doorIndex=1, lockValue=FADoorCodes.TALK_TO_HQ
)
self.acceptDoorEvent(
2,
{
self.streetHqDoor: FADoorCodes.GO_TO_PLAYGROUND,
self.streetHqDoor2: FADoorCodes.GO_TO_PLAYGROUND,
self.hqInsideDoor2: FADoorCodes.UNLOCKED,
},
)
self.streetHqDoor.setOtherDoor(self.hqInsideDoor)
self.hqInsideDoor.setOtherDoor(self.streetHqDoor)
self.streetHqDoor2.setOtherDoor(self.hqInsideDoor2)
self.hqInsideDoor2.setOtherDoor(self.streetHqDoor2)
self.streetHqDoor.generateWithRequired(self.branchZone)
self.streetHqDoor2.generateWithRequired(self.branchZone)
self.streetHqDoor.sendUpdate("setDoorIndex", [self.streetHqDoor.getDoorIndex()])
self.streetHqDoor2.sendUpdate("setDoorIndex", [self.streetHqDoor2.getDoorIndex()])
self.hqInsideDoor.generateWithRequired(self.hqZone)
self.hqInsideDoor2.generateWithRequired(self.hqZone)
self.hqInsideDoor.sendUpdate("setDoorIndex", [self.hqInsideDoor.getDoorIndex()])
self.hqInsideDoor2.sendUpdate("setDoorIndex", [self.hqInsideDoor2.getDoorIndex()])
self.zones = (20000, self.branchZone, self.interiorZone, self.hqZone)