def __init__(self, cr):
        DistributedAvatar.__init__(self, cr)
        DistributedSmoothNode.__init__(self, cr)

        self.fsm = ClassicFSM('DDisneyChar', [
            State('off', self.enterOff, self.exitOff),
            State('walking', self.enterWalking, self.exitWalking),
            State('neutral', self.enterNeutral, self.exitNeutral)
        ], 'off', 'off')
        self.fsm.enterInitialState()
        self.neutralFSM = ClassicFSM('DDisneyChar-neutral', [
            State('off', self.enterOff, self.exitOff),
            State('turn2target', self.enterTurn2Target, self.exitTurn2Target),
            State('talk2target', self.enterTalk2Target, self.exitTalk2Target)
        ], 'off', 'off')
        self.neutralFSM.enterInitialState()

        self.charId = 0
        self.geoEyes = 0
        self.avatarType = CIGlobals.CChar
        self.isInRange = False
        self.currentPointLetter = "a"
        self.walkIval = None
        self.currentChat = ""
        self.talkEnabled = True
        self.speechSound = None

        self.chatsSinceLastNoise = 0
        self.chatsWithoutNoise = 5

        self.eyes = None
        self.lpupil = None
        self.rpupil = None
        self.eyesOpen = None
        self.eyesClosed = None
    def __init__(self, cr):
        Suit.__init__(self)
        DistributedAvatar.__init__(self, cr)
        DistributedSmoothNode.__init__(self, cr)

        self.anim = None
        self._state = SuitState.ALIVE
        self.dept = None
        self.variant = None
        self.suitPlan = None
        self.level = None
        self.moveIval = None
        self.hpFlash = None

        # For PythonCTMusicManager:
        # Are we in range of the localAvatar?
        self.isInRange = False

        self.chaseTarget = 0

        self.suitFSM = ClassicFSM('DistributedSuit', [
            State('off', self.enterSuitOff, self.exitSuitOff),
            State('walking', self.enterWalking, self.exitWalking),
            State('flyingDown', self.enterFlyingDown, self.exitFlyingDown),
            State('flyingUp', self.enterFlyingUp, self.exitFlyingUp),
            State('lured', self.enterLured, self.exitLured)
        ], 'off', 'off')
        self.stateIndex2suitState = {}
        self.suitFSM.enterInitialState()
        self.makeStateDict()
 def __init__(self, cr):
     DistributedAvatar.__init__(self, cr)
     DistributedSmoothNode.__init__(self, cr)
     self.fsm = ClassicFSM(
         'DistributedPieTurret',
         [
             State('off', self.enterOff, self.exitOff),
             State('scan', self.enterScan, self.exitScan),
             State('shoot', self.enterShoot, self.exitShoot)
          ],
          'off', 'off'
      )
     self.fsm.enterInitialState()
     self.reloadTime = 0.25
     self.cannon = None
     self.track = None
     self.owner = None
     self.gag = None
     self.readyGag = None
     self.hitGag = None
     self.explosion = None
     self.wallCollNode = None
     self.eventCollNode = None
     self.event = None
     self.suit = None
     self.eventId = None
     self.entities = []
     self.upgradeID = None
     self.deathEvent = None
Ejemplo n.º 4
0
 def __init__(self, cr):
     try:
         self.DistributedVicePresident_initialized
         return
     except:
         self.DistributedVicePresident_initialized = 1
     VicePresident.__init__(self)
     DistributedAvatar.__init__(self, cr)
Ejemplo n.º 5
0
 def __init__(self, cr):
     DistributedAvatar.__init__(self, cr)
     self.owner = None
     self.movementFSM = ClassicFSM('Pet', [
         State('off', self.enterOff, self.exitOff),
         State('forward', self.enterMoveForward, self.exitMoveForward),
         State('backward', self.enterMoveBackward, self.exitMoveBackward),
         State('left', self.enterTurnLeft, self.exitTurnLeft),
         State('right', self.enterTurnRight, self.exitTurnRight)
     ], 'off', 'off')
    def __init__(self, cr):
        try:
            self.DistributedSuit_initialized
            return
        except:
            self.DistributedSuit_initialized = 1
        Suit.__init__(self)
        DistributedAvatar.__init__(self, cr)
        DistributedSmoothNode.__init__(self, cr)

        self.suitFSM = ClassicFSM('DistributedSuit',
            [
                State('off', self.enterSuitOff, self.exitSuitOff),
                State('walking', self.enterWalking, self.exitWalking),
                State('flyingDown', self.enterFlyingDown, self.exitFlyingDown),
                State('flyingUp', self.enterFlyingUp, self.exitFlyingUp),
                State('bossFlying', self.enterBossFlying, self.exitBossFlying)
            ],
            'off', 'off'
        )
        self.suitFSM.enterInitialState()
        self.makeStateDict()
        self.makeAnimStateDict()

        # These are just default values, we'll set them later on.
        self.anim = None
        self.state = "alive"
        self.health = None
        self.type = None
        self.team = None
        self.head = None
        self.skeleton = 0
        self.battle = None
        self.suitState = None
        self.startPoint = None
        self.endPoint = None
        self.moveIval = None
        self.walkPaused = None
        self.animIval = None
        self.level = None
        return
Ejemplo n.º 7
0
    def __init__(self, cr):
        try:
            self.DistributedToon_initialized
            return
        except:
            self.DistributedToon_initialized = 1

        Toon.Toon.__init__(self, cr)
        DistributedAvatar.__init__(self, cr)
        DistributedSmoothNode.__init__(self, cr)
        self.questManager = QuestManager.QuestManager()
        self.token = -1
        self.ghost = 0
        self.puInventory = []
        self.equippedPU = -1
        self.backpack = None
        self.animState2animId = {}
        self.battleMeter = None
        for index in range(len(self.animFSM.getStates())):
            self.animState2animId[self.animFSM.getStates()
                                  [index].getName()] = index

        self.animId2animState = {
            v: k
            for k, v in self.animState2animId.items()
        }
        self.headMeter = None
        self.firstTimeChangingHP = True
        self.quests = []
        self.tier = None
        self.questHistory = None
        self.busy = 1
        self.friends = None
        self.tutDone = 0
        self.hoodsDiscovered = []
        self.teleportAccess = []
        self.lastHood = 0
        self.defaultShard = 0
        self.dmgFadeIval = None
        self.tunnelTrack = None
        return
 def __init__(self, cr):
     Suit.__init__(self)
     DistributedAvatar.__init__(self, cr)
     DistributedSmoothNode.__init__(self, cr)
     self.anim = None
     self.state = SuitState.ALIVE
     self.dept = None
     self.variant = None
     self.suitPlan = None
     self.level = None
     self.moveIval = None
     self.hpFlash = None
     self.suitFSM = ClassicFSM('DistributedSuit', [
      State('off', self.enterSuitOff, self.exitSuitOff),
      State('walking', self.enterWalking, self.exitWalking),
      State('flyingDown', self.enterFlyingDown, self.exitFlyingDown),
      State('flyingUp', self.enterFlyingUp, self.exitFlyingUp),
      State('lured', self.enterLured, self.exitLured)], 'off', 'off')
     self.stateIndex2suitState = {}
     self.suitFSM.enterInitialState()
     self.makeStateDict()
     return
Ejemplo n.º 9
0
    def __init__(self, cr):
        try:
            self.DistributedToon_initialized
            return
        except:
            self.DistributedToon_initialized = 1

        Toon.Toon.__init__(self, cr)
        DistributedAvatar.__init__(self, cr)
        DistributedSmoothNode.__init__(self, cr)
        self.questManager = QuestManager.QuestManager()
        self.token = -1
        self.ghost = 0
        self.puInventory = []
        self.equippedPU = -1
        self.backpackId = None
        self.backpack = None
        self.animState2animId = {}
        self.battleMeter = None
        for index in range(len(self.animFSM.getStates())):
            self.animState2animId[self.animFSM.getStates()[index].getName()] = index

        self.animId2animState = {v:k for k, v in self.animState2animId.items()}
        self.initAmmo = []
        self.initGagIds = []
        self.headMeter = None
        self.firstTimeChangingHP = True
        self.gagBPData = []
        self.quests = []
        self.tier = None
        self.questHistory = None
        self.busy = 1
        self.friends = None
        self.tutDone = 0
        self.hoodsDiscovered = []
        self.teleportAccess = []
        self.lastHood = 0
        return
	def __init__(self, cr):
		DistributedAvatar.__init__(self, cr)
		DistributedSmoothNode.__init__(self, cr)
		self.fsm = ClassicFSM(
			'DistributedPieTurret',
			[
				State('off', self.enterOff, self.exitOff),
				State('scan', self.enterScan, self.exitScan),
				#State('lockOn', self.enterLockOn, self.exitLockOn),
				State('shoot', self.enterShoot, self.exitShoot)
			],
			'off', 'off'
		)
		self.fsm.enterInitialState()
		self.cannon = None
		self.track = None
		self.avatar = None
		self.readyPie = None
		self.explosion = None
		self.wallCollNode = None
		self.eventCollNode = None
		self.event = None
		self.piesInFlight = []