本文整理汇总了Python中direct.actor.DistributedActor.DistributedActor类的典型用法代码示例。如果您正苦于以下问题:Python DistributedActor类的具体用法?Python DistributedActor怎么用?Python DistributedActor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DistributedActor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: delete
def delete(self):
try:
self.DistributedAvatar_deleted
except:
self.DistributedAvatar_deleted = 1
Avatar.delete(self)
DistributedActor.delete(self)
示例2: __init__
def __init__(self, cr):
try:
self.DistributedAvatar_initialized
return None
except:
self.DistributedAvatar_initialized = 1
DistributedActor.__init__(self, cr)
示例3: disable
def disable(self):
try:
del self.DistributedAvatar_announced
except:
return None
self.reparentTo(hidden)
self.disableBodyCollisions()
DistributedActor.disable(self)
示例4: generate
def generate(self):
DistributedActor.generate(self)
if not self.isLocal():
self.addActive()
self.considerUnderstandable()
self.setParent(OTPGlobals.SPHidden)
self.setTag('avatarDoId', str(self.doId))
self.accept('nameTagShowAvId', self.__nameTagShowAvId)
self.accept('nameTagShowName', self.__nameTagShowName)
示例5: delete
def delete(self):
DistributedActor.delete(self)
self.health = None
self.maxHealth = None
self.healthLabel = None
self.healthLabelTrack = None
self.hood = None
self.place = None
return
示例6: do_setParent
def do_setParent(self, parentToken):
if not self.isDisabled():
if parentToken == OTPGlobals.SPHidden:
self.nametag2dDist &= ~Nametag.CName
else:
self.nametag2dDist |= Nametag.CName
self.nametag.getNametag2d().setContents(self.nametag2dContents & self.nametag2dDist)
DistributedActor.do_setParent(self, parentToken)
self.__setTags()
示例7: announceGenerate
def announceGenerate(self):
try:
self.DistributedAvatar_announced
return
except:
self.DistributedAvatar_announced = 1
if not self.isLocal():
self.initializeBodyCollisions('distAvatarCollNode-' + str(self.doId))
DistributedActor.announceGenerate(self)
示例8: do_setParent
def do_setParent(self, parentToken):
if not self.isDisabled():
nametag2d = self.nametag.getNametag2d()
if parentToken == OTPGlobals.SPHidden:
nametag2d.hideNametag()
else:
nametag2d.showNametag()
nametag2d.update()
DistributedActor.do_setParent(self, parentToken)
self.__setTags()
示例9: __init__
def __init__(self, cr):
try:
return None
except:
self.DistributedAvatar_initialized = 1
Avatar.__init__(self)
DistributedActor.__init__(self, cr)
self.hpText = None
self.hp = None
self.maxHp = None
示例10: disable
def disable(self):
try:
del self.DistributedAvatar_announced
except:
return
self.reparentTo(hidden)
self.removeActive()
self.disableBodyCollisions()
self.hideHpText()
self.hp = None
self.ignore('nameTagShowAvId')
self.ignore('nameTagShowName')
DistributedActor.disable(self)
return
示例11: __init__
def __init__(self, cr):
try:
self.DistributedAvatar_initialized
return
except:
self.DistributedAvatar_initialized = 1
Avatar.__init__(self)
DistributedActor.__init__(self, cr)
self.health = 0
self.maxHealth = 0
self.healthLabel = None
self.healthLabelTrack = None
self.place = 0
self.hood = None
return
示例12: disable
def disable(self):
DistributedActor.disable(self)
self.stopMovingHealthLabel()
self.detachNode()
示例13: generate
def generate(self):
DistributedActor.generate(self)
示例14: announceGenerate
def announceGenerate(self):
DistributedActor.announceGenerate(self)
self.setPythonTag('avatar', self.doId)
self.setupHealthLabel()
self.setParent(CIGlobals.SPHidden)
示例15: do_setParent
def do_setParent(self, parentToken):
if not self.isDisabled():
DistributedActor.do_setParent(self, parentToken)