コード例 #1
0
 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
コード例 #2
0
 def delete(self):
     try:
         self.DistributedAvatar_deleted
     except:
         self.DistributedAvatar_deleted = 1
         Avatar.delete(self)
         DistributedActor.delete(self)
コード例 #3
0
    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)
コード例 #4
0
    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
コード例 #5
0
ファイル: Chairman.py プロジェクト: perpi06/ttoffline
 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))
コード例 #6
0
    def setName(self, name):
        try:
            self.node().setName('%s-%d' % (name, self.doId))
            self.gotName = 1
        except:
            pass

        return Avatar.setName(self, name)
コード例 #7
0
ファイル: PrologueChairman.py プロジェクト: perpi06/ttoffline
 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))
コード例 #8
0
    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()
コード例 #9
0
 def __init__(self):
     Avatar.__init__(self)
     self.avatarType = AvatarTypes.CaptBarbossa
     self.loadModel('models/char/cb_2000')
     self.setName(self.avatarType.getName())
     self.setNameVisible(0)
コード例 #10
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)
コード例 #11
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)
コード例 #12
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)
コード例 #13
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)
コード例 #14
0
 def delete(self):
     loader.unloadModel('models/char/jg_2000')
     Avatar.delete(self)
コード例 #15
0
 def getFrameTime(self, animName, frame, partName = None):
     return Avatar.getFrameTime(self, animName, frame, partName)
コード例 #16
0
 def getDuration(self, animName = None, partName = None, fromFrame = None, toFrame = None):
     return Avatar.getDuration(self, animName, partName, fromFrame, toFrame)
コード例 #17
0
 def delete(self):
     self.loadAnimatedHead = None
     self.deleteWeaponJoints()
     Avatar.delete(self)
     UsesAnimationMixer.delete(self)
     UsesEffectNode.delete(self)
コード例 #18
0
 def setName(self, val):
     Avatar.setName(self, val)
コード例 #19
0
 def __init__(self):
     Avatar.__init__(self)
     self.avatarType = AvatarTypes.JackSparrow
     self.loadModel('models/char/js_2000')
     self.setName(self.avatarType.getName())
     self.setNameVisible(0)
コード例 #20
0
 def delete(self):
     loader.unloadModel('models/char/jg_2000')
     Avatar.delete(self)
コード例 #21
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)
コード例 #22
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)
コード例 #23
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)
コード例 #24
0
 def getName(self):
     return Avatar.getName(self)
コード例 #25
0
 def __init__(self):
     Avatar.__init__(self)
     self.avatarType = AvatarTypes.JollyRoger
     self.loadModel('models/char/jr_2000')
     self.setName(self.avatarType.getName())
     self.setNameVisible(0)
コード例 #26
0
 def __init__(self):
     Avatar.__init__(self)
     self.avatarType = AvatarTypes.CaptBarbossa
     self.loadModel('models/char/cb_2000')
     self.setName(self.avatarType.getName())
     self.setNameVisible(0)
コード例 #27
0
 def __init__(self):
     Avatar.__init__(self)
     self.avatarType = AvatarTypes.JackSparrow
     self.loadModel('models/char/js_2000')
     self.setName(self.avatarType.getName())
     self.setNameVisible(0)
コード例 #28
0
 def __init__(self):
     Avatar.__init__(self)
     self.avatarType = AvatarTypes.JollyRoger
     self.loadModel('models/char/jr_2000')
     self.setName(self.avatarType.getName())
     self.setNameVisible(0)
コード例 #29
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)