def __init__(self, other = None, animationMixerClass = BipedAnimationMixer): self.wantZombie = base.config.GetBool('want-zombie', 0) Avatar.__init__(self, other) UsesAnimationMixer.__init__(self, animationMixerClass) UsesEffectNode.__init__(self) Biped.initSfx() self.setPickable(0) self.height = 0.0 self.nametagOffset = -5.0 self.rootScale = 1.0 self.nameText = None self.iconNodePath = None self.battleTubeHeight = 0.0 self.battleTubeRadius = 0.0 self.lerpHeadTrack = None self.loadAnimatedHead = None self.rightHandNode = NodePath(ModelNode('rightHand')) self.leftHandNode = NodePath(ModelNode('leftHand')) self.weaponJointInstances = [] self.headFudgeHpr = Vec3(0, 0, 0) self.renderReflection = False self.nametag2dContents = 0 self.nametag2dDist = 0 self.nametag2dNormalContents = 0 self.nametag.getNametag2d().setContents(0) self.nametag3d.setLightOff() self.fader = None
def delete(self): try: self.DistributedAvatar_deleted except: self.DistributedAvatar_deleted = 1 Avatar.delete(self) DistributedActor.delete(self)
def setChatAbsolute(self, chatString, chatFlags, dialogue = None, interrupt = 1): Avatar.setChatAbsolute(self, chatString, chatFlags, dialogue, interrupt) if chatString: avId = None if hasattr(self, 'doId'): avId = self.doId base.talkAssistant.receiveOpenTalk(avId, self.getName(), 0, None, chatString)
def __init__(self, cr): try: self.DistributedAvatar_initialized return except: self.DistributedAvatar_initialized = 1 Avatar.__init__(self) DistributedActor.__init__(self, cr) self.hpText = None self.hp = None self.maxHp = None return
def __init__(self): Avatar.__init__(self) self.setFont(ToontownGlobals.getSuitFont()) self.setPlayerType(NametagGroup.CCSuit) self.initializeNametag3d() self.initializeDropShadow() self.nametag3d.setPos(0, 0, 15.69) self.dropShadow.setScale(1.8) self.nametag3d.setScale(1.4) self.setPickable(0) self.loadModel('phase_14/models/char/chairman-mod') self.loadAnims({'neutral': 'phase_14/models/char/chairman-neutral'}) self.setBlend(frameBlend=base.settings.getBool( 'game', 'smooth-animations', True))
def setName(self, name): try: self.node().setName('%s-%d' % (name, self.doId)) self.gotName = 1 except: pass return Avatar.setName(self, name)
def __init__(self): Avatar.__init__(self) self.setFont(ToontownGlobals.getSuitFont()) self.setSpeechFont(ToontownGlobals.getSuitFont()) self.setPlayerType(NametagGroup.CCSuit) self.initializeNametag3d() self.initializeDropShadow() self.nametag3d.setPos(0, 0, 15.69) self.dropShadow.setScale(1.8) self.nametag3d.setScale(1.4) self.setPickable(0) self.loadModel('phase_14/models/char/chairman-mod') self.loadAnims({ 'walk': 'phase_14/models/char/chairman-walk', 'neutral': 'phase_14/models/char/chairman-neutral', 'into-type': 'phase_14/models/char/chairman-into-type', 'type': 'phase_14/models/char/chairman-type', 'capture': 'phase_14/models/char/chairman-capture' }) self.setBlend( frameBlend=config.GetBool('interpolate-animations', True))
def initializeNametag3d(self): Avatar.initializeNametag3d(self) self.nametag3d.setColorScaleOff(100) self.nametag3d.setLightOff() self.nametag3d.setFogOff() self.nametag3d.setZ(self.scale) self.nametag3d.setH(self.getGeomNode().getH()) self.nametag.setFont(PiratesGlobals.getPirateFont()) return 0 # TODO: fix iconNodePath self.iconNodePath = self.nametag.getNameIcon() if self.iconNodePath.isEmpty(): self.notify.warning('empty iconNodePath in initializeNametag3d') return 0 if not self.nameText: self.nameText = OnscreenText(fg = Vec4(1, 1, 1, 1), bg = Vec4(0, 0, 0, 0), scale = 1.1000000000000001, align = TextNode.ACenter, mayChange = 1, font = PiratesGlobals.getPirateBoldOutlineFont()) self.nameText.reparentTo(self.iconNodePath) self.nameText.setTransparency(TransparencyAttrib.MDual, 2) self.nameText.setColorScaleOff(100) self.nameText.setLightOff() self.nameText.setFogOff() self.nameTag3dInitialized()
def __init__(self): Avatar.__init__(self) self.avatarType = AvatarTypes.CaptBarbossa self.loadModel('models/char/cb_2000') self.setName(self.avatarType.getName()) self.setNameVisible(0)
def __init__(self): Avatar.__init__(self) self.avatarType = AvatarTypes.ElizabethSwan self.loadModel('models/char/es_2000') self.setName(self.avatarType.getName()) self.setNameVisible(0)
def __init__(self): Avatar.__init__(self) self.avatarType = AvatarTypes.WillTurner self.loadModel('models/char/wt_2000') self.setName(self.avatarType.getName()) self.setNameVisible(0)
def __init__(self): Avatar.__init__(self) self.avatarType = AvatarTypes.JoshameeGibbs self.loadModel('models/char/jg_2000') self.setName(self.avatarType.getName()) self.setNameVisible(0)
def delete(self): loader.unloadModel('models/char/jg_2000') Avatar.delete(self)
def getFrameTime(self, animName, frame, partName = None): return Avatar.getFrameTime(self, animName, frame, partName)
def getDuration(self, animName = None, partName = None, fromFrame = None, toFrame = None): return Avatar.getDuration(self, animName, partName, fromFrame, toFrame)
def delete(self): self.loadAnimatedHead = None self.deleteWeaponJoints() Avatar.delete(self) UsesAnimationMixer.delete(self) UsesEffectNode.delete(self)
def setName(self, val): Avatar.setName(self, val)
def __init__(self): Avatar.__init__(self) self.avatarType = AvatarTypes.JackSparrow self.loadModel('models/char/js_2000') self.setName(self.avatarType.getName()) self.setNameVisible(0)
def __init__(self): Avatar.__init__(self) self.avatarType = AvatarTypes.TiaDalma self.loadModel('models/char/td_2000') self.setName(self.avatarType.getName()) self.setNameVisible(0)
def getName(self): return Avatar.getName(self)
def __init__(self): Avatar.__init__(self) self.avatarType = AvatarTypes.JollyRoger self.loadModel('models/char/jr_2000') self.setName(self.avatarType.getName()) self.setNameVisible(0)