本文整理汇总了Python中direct.distributed.DistributedSmoothNode.DistributedSmoothNode.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python DistributedSmoothNode.__init__方法的具体用法?Python DistributedSmoothNode.__init__怎么用?Python DistributedSmoothNode.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类direct.distributed.DistributedSmoothNode.DistributedSmoothNode
的用法示例。
在下文中一共展示了DistributedSmoothNode.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from direct.distributed.DistributedSmoothNode import DistributedSmoothNode [as 别名]
# 或者: from direct.distributed.DistributedSmoothNode.DistributedSmoothNode import __init__ [as 别名]
def __init__(self, cr):
self.cr = cr
Char.Char.__init__(self)
DistributedSmoothNode.__init__(self, cr)
self.name = ''
self.anim = ''
self.chat = ''
self.charType = ''
self.clerk = 0
示例2: __init__
# 需要导入模块: from direct.distributed.DistributedSmoothNode import DistributedSmoothNode [as 别名]
# 或者: from direct.distributed.DistributedSmoothNode.DistributedSmoothNode import __init__ [as 别名]
def __init__(self, cr):
DistributedSmoothNode.__init__(self, cr)
self.actor = None
self.isMoving = False
self.name = ''
self.chat = ''
self.nameText = None
self.nameTextNP = None
self.chatText = None
self.chatTextNP = None
示例3: __init__
# 需要导入模块: from direct.distributed.DistributedSmoothNode import DistributedSmoothNode [as 别名]
# 或者: from direct.distributed.DistributedSmoothNode.DistributedSmoothNode import __init__ [as 别名]
def __init__(self, cr, playerId = None):
DistributedSmoothNode.__init__(self,cr)
# you have to initialize NodePath.__init__() here because it is
# not called in DistributedSmoothNode.__init__()
NodePath.__init__(self, 'avatar')
self.playerId = playerId
self.setTag('paintType', 'avatar')
# This point is in the middle of the avatar, for determining
# paint normals and such.
self.center = self.attachNewNode('center')
self.center.setZ(0.5)
self.lastPaintPoint = None
self.paintDirty = False
self.flushTask = None
self.p = None
self.tex = None
# A dictionary of player -> count, showing the number of
# pixels that each player has painted onto this avatar.
self.players = {}
self.actor = None
self.nametag = None
self.moving = False
# This is true if this avatar represents the "local avatar",
# the player at the keyboard, as opposed to a remote player.
self.localAvatar = False
# Create an "into" collision sphere so it becomes tangible.
cs = CollisionSphere(0, 0, 0.5, 0.5)
cnode = CollisionNode('cnode')
cnode.addSolid(cs)
self.cnp = self.attachNewNode(cnode)
self.cnp.setCollideMask(Globals.AvatarBit)
示例4: __init__
# 需要导入模块: from direct.distributed.DistributedSmoothNode import DistributedSmoothNode [as 别名]
# 或者: from direct.distributed.DistributedSmoothNode.DistributedSmoothNode import __init__ [as 别名]
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
示例5: __init__
# 需要导入模块: from direct.distributed.DistributedSmoothNode import DistributedSmoothNode [as 别名]
# 或者: from direct.distributed.DistributedSmoothNode.DistributedSmoothNode import __init__ [as 别名]
def __init__(self, cr):
ShadowCaster.__init__(self)
DistributedSmoothNode.__init__(self, cr)
NodePath.__init__(self, 'Projectile')
示例6: __init__
# 需要导入模块: from direct.distributed.DistributedSmoothNode import DistributedSmoothNode [as 别名]
# 或者: from direct.distributed.DistributedSmoothNode.DistributedSmoothNode import __init__ [as 别名]
def __init__(self, cr):
DistributedSmoothNode.__init__(self, cr)
NodePath.__init__(self, "Model")
self.model = base.loader.loadModel('smiley.egg')
self.model.reparentTo(self)