本文整理汇总了Python中AvatarInputHandler.CallbackDelayer.CallbackDelayer类的典型用法代码示例。如果您正苦于以下问题:Python CallbackDelayer类的具体用法?Python CallbackDelayer怎么用?Python CallbackDelayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CallbackDelayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: destroy
def destroy(self):
CallbackDelayer.destroy(self)
if self.__manualSound is not None:
self.__manualSound.stop()
if self.__gearSound is not None:
self.__gearSound.stop()
self.__stateTable = None
示例2: destroy
def destroy(self):
CallbackDelayer.destroy(self)
self.__cam = None
if self.__aim is not None:
self.__aim.destroy()
self.__aim = None
return
示例3: __init__
def __init__(self, updatePeriod=0.0):
CallbackDelayer.__init__(self)
TimeDeltaMeter.__init__(self)
self.__updatePeriod = updatePeriod
self.__turretSound = None
self.__prevTurretYaw = None
return
示例4: __init__
def __init__(self, updatePeriod = 0.0):
CallbackDelayer.__init__(self)
self.__updatePeriod = updatePeriod
self.__currentSpeedState = self.__SPEED_IDLE
self.__keyOffCalled = False
self.__manualSound = None
self.__gearSound = None
self.__gearDamagedParam = None
self.__manGearDamagedParam = None
self.__gearKeyOffParam = None
self.__stateTable = ((None,
self.__startManualSound,
self.__initHighSpeed,
None),
(self.__stopManualSound,
None,
self.__initHighSpeed,
None),
(self.__stopManualSound,
self.__startManualSoundFromFast,
None,
None),
(self.__stopGearSoundPlaying,
self.__startManualSoundFromFast,
None,
self.__checkGearSound))
return
示例5: __init__
def __init__(self):
CallbackDelayer.__init__(self)
self.__alwaysShowAim = False
self.__alwaysShowAimKey = None
self.__showMarkersKey = None
sec = self._readCfg()
self.onCameraChanged = Event()
self.onPostmortemVehicleChanged = Event()
self.onSetReloading = Event()
self.onSetReloadingPercents = Event()
self.__isArenaStarted = False
self.__isStarted = False
self.__targeting = _Targeting()
self.__vertScreenshotCamera = _VertScreenshotCamera()
self.__ctrls = dict()
self.__killerVehicleID = None
self.__isAutorotation = True
self.__prevModeAutorotation = None
self.__isSPG = False
self.__isATSPG = False
self.__setupCtrls(sec)
self.__curCtrl = self.__ctrls[_CTRLS_FIRST]
self.__eMode = _CTRLS_FIRST
self.__detachCount = 0
return
示例6: __init__
def __init__(self, dataSec, aim, binoculars):
CallbackDelayer.__init__(self)
self.__impulseOscillator = None
self.__movementOscillator = None
self.__noiseOscillator = None
self.__dynamicCfg = CameraDynamicConfig()
self.__accelerationSmoother = None
self.__readCfg(dataSec)
if aim is None or binoculars is None:
return
else:
self.__cam = BigWorld.FreeCamera()
self.__zoom = self.__cfg['zoom']
self.__curSense = 0
self.__curScrollSense = 0
self.__waitVehicleCallbackId = None
self.__onChangeControlMode = None
self.__aimingSystem = SniperAimingSystem(dataSec)
self.__aim = weakref.proxy(aim)
self.__binoculars = binoculars
self.__defaultAimOffset = self.__aim.offset()
self.__defaultAimOffset = (self.__defaultAimOffset[0], self.__defaultAimOffset[1])
self.__crosshairMatrix = createCrosshairMatrix(offsetFromNearPlane=self.__dynamicCfg['aimMarkerDistance'])
self.__prevTime = BigWorld.time()
self.__autoUpdateDxDyDz = Vector3(0, 0, 0)
return
示例7: destroy
def destroy(self):
CallbackDelayer.destroy(self)
self.disable()
self.__activeSelector = None
self.__cam.destroy()
self.__aih = None
return
示例8: __init__
def __init__(self, configDataSec):
CallbackDelayer.__init__(self)
TimeDeltaMeter.__init__(self)
self.__cam = BigWorld.FreeCamera()
self.__cam.invViewProvider = Math.MatrixProduct()
self.__ypr = Math.Vector3()
self.__position = Math.Vector3()
self.__defaultFov = BigWorld.projection().fov
self.__velocity = Math.Vector3()
self.__isVerticalVelocitySeparated = False
self.__yprVelocity = Math.Vector3()
self.__zoomVelocity = 0.0
self.__inertiaEnabled = False
self.__movementInertia = None
self.__rotationInertia = None
self.__movementSensor = None
self.__verticalMovementSensor = None
self.__rotationSensor = None
self.__zoomSensor = None
self.__targetRadiusSensor = None
self.__mouseSensitivity = 0.0
self.__scrollSensitivity = 0.0
self.__rotateAroundPointEnabled = False
self.__rotationRadius = 40.0
self.__alignerToLand = _AlignerToLand()
self.__predefinedVelocities = {}
self.__predefinedVerticalVelocities = {}
self.__keySwitches = {}
self.__readCfg(configDataSec)
self.__aim = None
self.__basisMProv = _VehicleBounder()
self.__entityPicker = _VehiclePicker()
return
示例9: __init__
def __init__(self, dataSec, aim):
CallbackDelayer.__init__(self)
TimeDeltaMeter.__init__(self)
self.__shiftKeySensor = None
self.__movementOscillator = None
self.__impulseOscillator = None
self.__noiseOscillator = None
self.__dynamicCfg = CameraDynamicConfig()
self.__accelerationSmoother = None
self.__readCfg(dataSec)
if aim is None:
return
else:
self.__aim = weakref.proxy(aim)
self.__cam = BigWorld.HomingCamera()
aimOffset = self.__aim.offset()
self.__cam.aimPointClipCoords = Vector2(aimOffset)
self.__curSense = 0
self.__curScrollSense = 0
self.__defaultAimOffset = (aimOffset[0], aimOffset[1])
self.__postmortemMode = False
self.__modelsToCollideWith = []
self.__onChangeControlMode = None
self.__aimingSystem = None
self.__focalPointDist = 1.0
self.__autoUpdateDxDyDz = Vector3(0.0)
return
示例10: destroy
def destroy(self):
_SPGFlashGunMarker.destroy(self)
CallbackDelayer.destroy(self)
self.__desiredShotInfoFunc = None
self.__trajectoryDrawer.visible = False
self.__trajectoryDrawer = None
return
示例11: destroy
def destroy(self):
CallbackDelayer.destroy(self)
self.disable()
self.__onChangeControlMode = None
self.__cam = None
self._writeUserPreferences()
self.__aimingSystem.destroy()
self.__aimingSystem = None
示例12: enable
def enable(self, enableSound):
if enableSound:
self.delayCallback(self.__updatePeriod, self.__update)
else:
CallbackDelayer.destroy(self)
if self.__manualSound is not None:
self.__manualSound.stop()
if self.__gearSound is not None:
self.__gearSound.stop()
示例13: __init__
def __init__(self, dataSection, avatarInputHandler):
CallbackDelayer.__init__(self)
self.__preferredPos = Vector3(0, 0, 0)
self.__aih = weakref.proxy(avatarInputHandler)
self.__cam = StrategicCamera.StrategicCamera(dataSection["camera"], None)
self.__isEnabled = False
self.__updateInterval = 0.1
self.__activeSelector = _DefaultStrikeSelector(Vector3(0, 0, 0), None)
self.__equipmentID = None
self.__aimingMode = 0
MapCaseControlMode.prevCtlMode = [Vector3(0, 0, 0), "", 0]
示例14: __init__
def __init__(self):
BigWorld.Entity.__init__(self)
FlockLike.__init__(self)
CallbackDelayer.__init__(self)
self.flightAngleMin = math.radians(self.flightAngleMin)
self.flightAngleMax = math.radians(self.flightAngleMax)
if self.flightAngleMin < 0:
self.flightAngleMin += math.ceil(abs(self.flightAngleMin) / (math.pi * 2)) * math.pi * 2
elif self.flightAngleMin > math.pi * 2:
self.flightAngleMin -= math.floor(self.flightAngleMin / (math.pi * 2)) * math.pi * 2
self.__isTriggered = False
示例15: __init__
def __init__(self, beginExplosionPos, endExplosionPos, areaWidth, velocity):
CallbackDelayer.__init__(self)
self.model = BigWorld.Model('helpers/models/unit_cube.model')
BigWorld.addModel(self.model)
self.model.position = beginExplosionPos
linearHomer = BigWorld.LinearHomer()
self.model.addMotor(linearHomer)
linearHomer.align = mathUtils.createSRTMatrix((areaWidth, 5, 1), (0.0, 0, 0), Vector3(0, 0, 0))
linearHomer.acceleration = 0
linearHomer.velocity = velocity
linearHomer.target = mathUtils.createTranslationMatrix(endExplosionPos)
linearHomer.proximityCallback = self.__onDeath