本文整理匯總了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)