当前位置: 首页>>代码示例>>Python>>正文


Python Pixie.create方法代码示例

本文整理汇总了Python中Pixie.create方法的典型用法代码示例。如果您正苦于以下问题:Python Pixie.create方法的具体用法?Python Pixie.create怎么用?Python Pixie.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pixie的用法示例。


在下文中一共展示了Pixie.create方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: beginPlasmaWarp

# 需要导入模块: import Pixie [as 别名]
# 或者: from Pixie import create [as 别名]
def beginPlasmaWarp(target):
    global warpEffects
    allFinished = 1
    for finished, i, s, t in warpEffects:
        if not finished:
            allFinished = 0

    if allFinished:
        warpEffects = []
    ps = Pixie.create('particles/plasma_suck.xml')
    try:
        target.node('biped Head').attach(ps)
    except:
        target.root.attach(ps)

    m = target.root
    m2 = Matrix()
    m2.setScale((1, 1, 1))
    m2.postMultiply(m)
    v1 = Vector4(3.0, -100000, 0, 0)
    v2 = Vector4(0.0, 0, 0, 0)
    v = Vector4Animation()
    v.keyframes = [(0, v2), (3, v1)]
    v.duration = 1000000
    v.time = 0
    warpEffects.append([0,
     v,
     ps,
     target])
    try:
        BigWorld.addWarp(100000, m2, v)
    except:
        pass

    return len(warpEffects) - 1
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:37,代码来源:psfx.py

示例2: __init__

# 需要导入模块: import Pixie [as 别名]
# 或者: from Pixie import create [as 别名]
    def __init__(self, exhaustEffectsDescriptor, drawOrder, uniqueEffects = None):
        if uniqueEffects is None:
            self.__uniqueEffects = {}
        else:
            self.__uniqueEffects = {name:effect.clone() for name, effect in uniqueEffects.iteritems()}
        self.__tables = []
        self.__maxDrawOrder = drawOrder - 1
        for rangeTable in exhaustEffectsDescriptor.tables:
            effectsValues = []
            for name in rangeTable.values:
                effect = self.__uniqueEffects.get(name)
                if effect is None:
                    effect = Pixie.create(name)
                    self.__maxDrawOrder += 1
                    effect.drawOrder = self.__maxDrawOrder
                    self.__uniqueEffects[name] = effect
                effectsValues.append(effect)

            self.__tables.append(RangeTable(rangeTable.keys, effectsValues))

        if self.__maxDrawOrder < drawOrder:
            self.__maxDrawOrder = drawOrder
        self.__activeEffect = None
        for effect in self.__uniqueEffects.itervalues():
            enablePixie(effect, False)
开发者ID:wotmods,项目名称:WOTDecompiled,代码行数:27,代码来源:vehicleeffects.py

示例3: __createTrailParticlesIfNeeded

# 需要导入模块: import Pixie [as 别名]
# 或者: from Pixie import create [as 别名]
    def __createTrailParticlesIfNeeded(self, node, iTrack, effectGroup, effectIndex, drawOrder, isActiveNode):
        if effectIndex is None:
            return
        else:
            effectDesc = self.__vehicle.typeDescriptor.chassis['effects'].get(effectGroup)
            if effectDesc is None:
                return
            effectName = effectDesc[0].get(effectIndex)
            if effectName is None or effectName == 'none' or effectName == 'None':
                return
            if isinstance(effectName, list):
                effectIdx = iTrack
                effectIdx += 0 if isActiveNode else 2
                effectName = effectName[effectIdx]
            nodeEffects = self.__trailParticles.get(node)
            if nodeEffects is None:
                nodeEffects = []
                self.__trailParticles[node] = nodeEffects
            else:
                for nodeEffect in nodeEffects:
                    createdForActiveNode = nodeEffect[5]
                    if nodeEffect[1] == effectIndex and createdForActiveNode == isActiveNode:
                        return

            pixie = Pixie.create(effectName)
            pixie.drawOrder = drawOrder
            node.attach(pixie)
            basicRates = []
            for i in xrange(pixie.nSystems()):
                try:
                    source = pixie.system(i).action(1)
                    basicRates.append(source.rate)
                    source.rate = source.rate * 0.001
                except:
                    basicRates.append(-1.0)
                    source = pixie.system(i).action(16)
                    source.MultRate(0.01)

            nodeEffects.append([pixie,
             effectIndex,
             0,
             0,
             basicRates,
             isActiveNode])
            return
开发者ID:19colt87,项目名称:WOTDecompiled,代码行数:47,代码来源:vehicleeffects.py

示例4: __init__

# 需要导入模块: import Pixie [as 别名]
# 或者: from Pixie import create [as 别名]
    def __init__(self, vehicleTypeDescriptor):
        self.__enabled = True
        self.__exhaust = []
        exhaust = vehicleTypeDescriptor.hull['exhaust']
        engineTags = vehicleTypeDescriptor.engine['tags']
        pixieName = None
        for tag in engineTags:
            pixieName = exhaust.get('pixie/' + tag, pixieName)

        rates = exhaust['rates']
        for i in xrange(len(exhaust['nodes'])):
            pixie = Pixie.create(pixieName)
            pixie.drawOrder = 50 + i
            self.__exhaust.append([None, pixie])
            for i in xrange(pixie.nSystems()):
                source = pixie.system(i).action(1)
                source.rate = rates[0]

        return
开发者ID:19colt87,项目名称:WOTDecompiled,代码行数:21,代码来源:vehicleeffects.py

示例5: load

# 需要导入模块: import Pixie [as 别名]
# 或者: from Pixie import create [as 别名]
    def load(self, pSection, prereqs = None):
        """
        This method loads the ParticleSystem Actor from a data section. The
        the particle system resource ID is read from the section name.
        
        It is recommended to call this method with prerequisites passed in, as
        even if the textures referred to by the particle system are already in
        memory, a PyMetaParticleSystem can still take a significant time to
        construct.
        """
        try:
            actor = prereqs.pop(pSection.asString)
        except:
            try:
                actor = Pixie.create(pSection.asString)
            except:
                ERROR_MSG('Could not create particle system', pSection.asString)
                actor = None

        return actor
开发者ID:aevitas,项目名称:wotsdk,代码行数:22,代码来源:actorsparticlesystem.py

示例6: setupTank

# 需要导入模块: import Pixie [as 别名]
# 或者: from Pixie import create [as 别名]
def setupTank(chassisFashion, gunFashion, vehicleDesc, worldMatrix, resources):
    print resources
    tank = resources[vehicleDesc.name]
    tank.matrix = worldMatrix
    tanks.append(tank)
    effect = Pixie.create('particles/Tank/exhaust/large_gas_gear.xml')
    tank.node('HP_gunFire').attach(effect)
    tank.node('HP_gunFire').attach(BigWorld.Model('helpers/models/position_gizmo.model'))
    tank.node('HP_Track_Exhaus_1').attach(BigWorld.Model('helpers/models/unit_cube.model'))
    m = mathUtils.createTranslationMatrix(Vector3(0, 10, 5))
    fakeMatrixes.append(m)
    tank.node('gun').attach(effect.clone(), m)
    BigWorld.addModel(tank)
    recoilDescr = vehicleDesc.gun['recoil']
    recoil = BigWorld.RecoilAnimator(recoilDescr['backoffTime'], recoilDescr['returnTime'], recoilDescr['amplitude'], recoilDescr['lodDist'])
    recoil.basisMatrix = tank.node('G').localMatrix
    recoil = assemblerModule.createGunAnimator(vehicleDesc, tank.node('G').localMatrix)
    recoil.lodSetting = 10
    tank.node('G', recoil)
    gunFashion.gunLocalMatrix = recoil
    recoil.lodLink = DataLinks.createFloatLink(chassisFashion, 'lastLod')
    swingingAnimator = assemblerModule.createSwingingAnimator(vehicleDesc, tank.node('hull').localMatrix, worldMatrix)
    chassisFashion.setupSwinging(swingingAnimator, 'hull')
    swingingAnimator.lodLink = DataLinks.createFloatLink(chassisFashion, 'lastLod')
    tank.setupFashions([chassisFashion,
     None,
     None,
     gunFashion])
    fashions.append(swingingAnimator)
    tank.node('hull', swingingAnimator)
    animMatrix = Math.MatrixAnimation()
    keys = []
    for x in xrange(100):
        angle = math.pi * 0.5 * (1 if x & 1 else -1)
        keys.append((x * 3, mathUtils.createRotationMatrix((angle, 0, 0))))

    animMatrix.keyframes = tuple(keys)
    tank.node('turret', animMatrix)
    return
开发者ID:aevitas,项目名称:wotsdk,代码行数:41,代码来源:clientbenchmark.py

示例7: onEnterWorld

# 需要导入模块: import Pixie [as 别名]
# 或者: from Pixie import create [as 别名]
	def onEnterWorld( self, prereqs ):
		
		Avatar.onEnterWorld( self, prereqs )

		# Set the position/movement filter to correspond to an player avatar
		self.filter = BigWorld.PlayerAvatarFilter()

		# Setup the physics for the Avatar
		self.physics = BigWorld.STANDARD_PHYSICS
		self.physics.velocityMouse = "Direction"
		self.physics.oldStyleCollision = True
		self.physics.collide = True
		self.physics.collideTerrain = True
		self.physics.collideObjects = True
		self.physics.fall = True

		# Spawn
		self.spawnAtRandomLocation()

		# Dust particles
		self.dustTrail = Pixie.create ("particles/dust_trail.xml")
		self.attachDustTrail()
开发者ID:Daan87,项目名称:Portfolio,代码行数:24,代码来源:Avatar.py

示例8: plasmaExplode

# 需要导入模块: import Pixie [as 别名]
# 或者: from Pixie import create [as 别名]
def plasmaExplode(owner, targetModel, delTargetModel):
    m = BigWorld.Model('objects/models/fx/03_pchangs/shockwave.model')
    targetModel.root.attach(m)
    m.Go()
    BigWorld.callback(1.0, partial(targetModel.root.detach, m))
    m = targetModel.root
    m2 = Matrix()
    m2.setScale((5, 5, 5))
    m2.postMultiply(m)
    v1 = Vector4(1.0, 100000, 0, 0)
    v2 = Vector4(0.0, 0, 0, 0)
    v = Vector4Animation()
    v.keyframes = [(0, v1), (0.5, v2)]
    v.duration = 1
    v.time = 0
    try:
        BigWorld.addWarp(0.5, m2, v)
    except:
        pass

    shake(targetModel)
    ps2 = Pixie.create('particles/plasma_blow.xml')
    targetModel.root.attach(ps2)
    ps2.system(0).actions[0].force(1)
    BigWorld.callback(5.0, partial(targetModel.root.detach, ps2))
    if delTargetModel:
        BigWorld.callback(5.0, partial(owner.delModel, targetModel))
    if BigWorld.player().flashBangCount == 0:
        fba = Vector4Animation()
        fba.keyframes = [(0, Vector4(0, 0, 0, 0)), (0.1, Vector4(0.1, 0.1, 0.2, 0.5)), (0.3, Vector4(0, 0, 0, 0))]
        fba.duration = 0.3
        try:
            BigWorld.flashBangAnimation(fba)
        except:
            pass

        BigWorld.callback(fba.duration, partial(BigWorld.flashBangAnimation, None))
    return
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:40,代码来源:projectiles.py


注:本文中的Pixie.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。