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


Python EffectsListPlayer.stop方法代码示例

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


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

示例1: _CTFResourcePointModel

# 需要导入模块: from helpers.EffectsList import EffectsListPlayer [as 别名]
# 或者: from helpers.EffectsList.EffectsListPlayer import stop [as 别名]
class _CTFResourcePointModel():

    def __init__(self, pointModelName, effectsSectionName):
        self.__modelFile = None
        self.__model = None
        self.__effectsTimeLine = None
        self.__effectsPlayer = None
        self.__loadTask = None
        self.__hideListener = None
        g_ctfManager.registerResourcePointModel(self)
        modelParams = _g_ctfConfig.readModelParams(pointModelName)
        if modelParams is not None:
            self.__modelFile = modelParams.get('file')
        if self.__modelFile is None:
            LOG_ERROR('%s: can\'t find the "%s" model.' % (_g_ctfConfig.name, pointModelName))
        effectsSection = _g_ctfConfig.readFirstLvlSection(effectsSectionName)
        if effectsSection is not None:
            self.__effectsTimeLine = effectsFromSection(effectsSection)
        return

    def __del__(self):
        self.__hideListener = None
        if self.__loadTask is not None:
            _g_resLoader.stopLoadTask(self.__loadTask)
            self.__loadTask = None
        g_ctfManager.unregisterResourcePointModel(self)
        if self.__effectsPlayer is not None:
            self.stopEffect()
            self.__effectsPlayer = None
        self.__effectsTimeLine = None
        if self.__model is not None:
            BigWorld.delModel(self.__model)
            self.__model = None
        self.__modelFile = None
        return

    def _createPoint(self):
        if g_ctfManager.isNeedHideAll:
            return
        else:
            raise self.__modelFile is not None or AssertionError
            self.__loadTask = _g_resLoader.startLoadTask((self.__modelFile,), self.__onModelLoaded)
            return

    def __onModelLoaded(self, resourceRefs):
        if resourceRefs.failedIDs:
            LOG_ERROR('Failed to load model %s' % (resourceRefs.failedIDs,))
        else:
            model = resourceRefs[self.__modelFile]
            if not model is not None:
                raise AssertionError
                model.position = self.position
                roll, pitch, yaw = self.direction
                model.rotate(roll, (0.0, 0.0, 1.0))
                model.rotate(pitch, (1.0, 0.0, 0.0))
                model.rotate(yaw, (0.0, 1.0, 0.0))
                BigWorld.addModel(model, BigWorld.player().spaceID)
                BigWorld.wg_applyOverlayToModel(model, False)
                self.__model = model
                g_ctfManager.updateRegisteredResourcePointModel(self)
                g_ctfManager.isNeedHideAll and self.__hideResPointFlag()
            else:
                self.__hideListener = _GlobalHideListener(self.__hideResPointFlag)
        return

    def __hideResPointFlag(self):
        if self.__model is not None:
            self.__model.visible = False
        self.stopEffect()
        return

    def playEffect(self):
        if self.__effectsPlayer is not None:
            return
        elif self.__model is None:
            return
        else:
            if self.__effectsTimeLine is not None:
                self.__effectsPlayer = EffectsListPlayer(self.__effectsTimeLine.effectsList, self.__effectsTimeLine.keyPoints)
                self.__effectsPlayer.play(self.__model)
            return

    def stopEffect(self):
        if self.__effectsPlayer is None:
            return
        else:
            self.__effectsPlayer.stop()
            self.__effectsPlayer = None
            return
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:91,代码来源:ctfmanager.py

示例2: CompoundAppearance

# 需要导入模块: from helpers.EffectsList import EffectsListPlayer [as 别名]
# 或者: from helpers.EffectsList.EffectsListPlayer import stop [as 别名]

#.........这里部分代码省略.........
            self.__linkCompound()
            self.__chassisShadowForwardDecal.attach(self.__typeDesc, self.__compoundModel)
            if not isObserver:
                self.__chassisOcclusionDecal.attach(self.__typeDesc, self.__compoundModel)
            self.__createStickers()
            if self.__currentDamageState.isCurrentModelDamaged:
                self.__attachStickers(items.vehicles.g_cache.commonConfig['miscParams']['damageStickerAlpha'], True)
            else:
                self.__startSystems()
                self.__attachStickers()
                self.setupGunMatrixTargets()
                if not isObserver:
                    self.__vehicle.filter.enableLagDetection(True)
            self.onModelChanged()
            if self.lodCalculator is not None:
                self.lodCalculator.setupPosition(DataLinks.linkMatrixTranslation(self.__compoundModel.matrix))
            if hasattr(self.filter, 'placingCompensationMatrix') and self.swingingAnimator is not None:
                self.swingingAnimator.placingCompensationMatrix = self.filter.placingCompensationMatrix
                self.swingingAnimator.worldMatrix = self.__compoundModel.matrix
            if self.__periodicTimerID is not None:
                BigWorld.cancelCallback(self.__periodicTimerID)
            self.__periodicTimerID = BigWorld.callback(_PERIODIC_TIME, self.__onPeriodicTimer)
            self.__activated = True
            if 'observer' in self.__vehicle.typeDescriptor.type.tags:
                self.__compoundModel.visible = False
            if self.__currentDamageState.isCurrentModelDamaged:
                if not self.__wasDeactivated:
                    if not self.__vehicle.isPlayerVehicle:
                        self.setupGunMatrixTargets()
                    else:
                        self.setupGunMatrixTargets(self.__vehicle.filter)
            return

    def deactivate(self, stopEffects = True):
        if not self.__activated:
            return
        else:
            self.__activated = False
            self.__wasDeactivated = True
            self.__stopSystems()
            super(CompoundAppearance, self).deactivate()
            self.__chassisOcclusionDecal.detach()
            self.__chassisShadowForwardDecal.detach()
            self.__vibrationsCtrl = None
            if self.__vehicle.isPlayerVehicle:
                BigWorld.setSpeedTreeCollisionBody(None)
            BigWorld.player().inputHandler.removeVehicleFromCameraCollider(self.__vehicle)
            self.__vehicle.filter.enableLagDetection(False)
            self.turretMatrix.setStaticTransform(self.turretMatrix)
            self.turretMatrix.target = None
            self.gunMatrix.setStaticTransform(self.gunMatrix)
            self.gunMatrix.target = None
            self.__vehicle.filter = self.__originalFilter
            self.__filter = None
            self.__originalFilter = None
            self.__vehicleStickers.detach()
            if stopEffects:
                self.__stopEffects()
                self.__boundEffects.stop()
            self.__vehicle.model = None
            self.__compoundModel.matrix = Math.Matrix()
            self.__vehicle = None
            self.__vehicleMatrixProv = None
            if self.__crashedTracksCtrl is not None:
                self.__crashedTracksCtrl.deactivate()
            return
开发者ID:aevitas,项目名称:wotsdk,代码行数:70,代码来源:vehicle_systemscompoundappearance.py


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