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


Python AimingSystems.IAimingSystem类代码示例

本文整理汇总了Python中AvatarInputHandler.AimingSystems.IAimingSystem的典型用法代码示例。如果您正苦于以下问题:Python IAimingSystem类的具体用法?Python IAimingSystem怎么用?Python IAimingSystem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: enable

 def enable(self, targetPos):
     player = BigWorld.player()
     self.__vehicleTypeDescriptor = player.vehicleTypeDescriptor
     self.__vehicleMProv = player.getOwnVehicleStabilisedMatrix()
     self.__vehiclePrevMat = Matrix(self.__vehicleMProv)
     IAimingSystem.enable(self, targetPos)
     self.__yawLimits = self.__vehicleTypeDescriptor.gun['turretYawLimits']
     self.__pitchLimits = self.__vehicleTypeDescriptor.gun['pitchLimits']
     self.__idealYaw, self.__idealPitch = AimingSystems.getTurretYawGunPitch(self.__vehicleTypeDescriptor, self.__vehicleMProv, targetPos, True)
     self.__idealYaw, self.__idealPitch = self.__clampToLimits(self.__idealYaw, self.__idealPitch)
     currentGunMat = AimingSystems.getPlayerGunMat(self.__idealYaw, self.__idealPitch)
     self.__g_curYaw = currentGunMat.yaw
     self.__g_curPitch = (targetPos - currentGunMat.translation).pitch
     self._matrix.set(currentGunMat)
     self.__idealYaw, self.__idealPitch = self.__worldYawPitchToTurret(self.__g_curYaw, self.__g_curPitch)
     self.__idealYaw, self.__idealPitch = self.__clampToLimits(self.__idealYaw, self.__idealPitch)
     self.__oscillator.reset()
     self.__pitchfilter.reset(currentGunMat.pitch)
     SniperAimingSystem.__activeSystem = self
     vehicle = player.getVehicleAttached()
     if vehicle is not None:
         if not vehicle.filter.placingOnGround:
             vehicle.filter.calcPlacedMatrix(True)
             self.__baseMatrix = vehicle.filter.placingMatrix
         else:
             self.__baseMatrix = vehicle.matrix
     return
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:27,代码来源:sniperaimingsystem.py

示例2: __init__

 def __init__(self, vehicleMProv, heightAboveTarget, focusRadius, aimMatrix, anglesRange, enableSmartShotPointCalc = True):
     IAimingSystem.__init__(self)
     self.__aimMatrix = aimMatrix
     self.__vehicleMProv = vehicleMProv
     self.__anglesRange = anglesRange
     self.__cursor = BigWorld.ThirdPersonProvider()
     self.__cursor.base = vehicleMProv
     self.__cursor.heightAboveBase = heightAboveTarget
     self.__cursor.focusRadius = focusRadius
     self.__shotPointCalculator = ShotPointCalculatorPlanar() if enableSmartShotPointCalc else None
开发者ID:kblw,项目名称:wot_client,代码行数:10,代码来源:arcadeaimingsystem.py

示例3: __init__

 def __init__(self):
     IAimingSystem.__init__(self)
     self.__idealTurretYaw = 0.0
     self.__idealGunPitch = 0.0
     self.__worldYaw = 0.0
     self.__worldPitch = 0.0
     self.__vehicleTypeDescriptor = None
     self.__vehicleMProv = None
     self.__vehiclePrevMat = None
     self.__yprDeviationConstraints = Vector3(math.pi * 2.1, math.pi / 2 * 0.95, 0.0)
     self.__oscillator = Oscillator(1.0, Vector3(0.0, 0.0, 15.0), Vector3(0.0, 0.0, 3.5), self.__yprDeviationConstraints)
开发者ID:wotmods,项目名称:WOTDecompiled,代码行数:11,代码来源:sniperaimingsystem.py

示例4: __init__

 def __init__(self, dataSec):
     IAimingSystem.__init__(self)
     self.__idealYaw = 0.0
     self.__idealPitch = 0.0
     self.__g_curPitch = 0.0
     self.__g_curYaw = 0.0
     self.__vehicleTypeDescriptor = None
     self.__vehicleMProv = None
     self.__vehiclePrevMat = None
     self.__yprDeviationConstraints = Vector3(math.pi * 2.1, math.pi / 2.0 * 0.95, 0.0)
     self.__oscillator = Oscillator(1.0, Vector3(0.0, 0.0, 15.0), Vector3(0.0, 0.0, 3.5), self.__yprDeviationConstraints)
     self.__dInputPitch = 0.0
     self.__dInputYaw = 0.0
     self.__pitchfilter = InputFilter()
     self.reloadConfig(dataSec)
开发者ID:kblw,项目名称:wot_client,代码行数:15,代码来源:sniperaimingsystem.py

示例5: enable

 def enable(self, targetPos):
     player = BigWorld.player()
     self.__vehicleTypeDescriptor = player.vehicleTypeDescriptor
     self.__vehicleMProv = player.getOwnVehicleMatrix()
     self.__vehiclePrevMat = Matrix(self.__vehicleMProv)
     IAimingSystem.enable(self, targetPos)
     self.__yawLimits = self.__vehicleTypeDescriptor.gun['turretYawLimits']
     self.__pitchLimits = self.__vehicleTypeDescriptor.gun['pitchLimits']
     self.__idealTurretYaw, self.__idealGunPitch = AimingSystems.getTurretYawGunPitch(self.__vehicleTypeDescriptor, player.getOwnVehicleMatrix(), targetPos, True)
     self.__idealTurretYaw, self.__idealGunPitch = self.__clampToLimits(self.__idealTurretYaw, self.__idealGunPitch)
     currentGunMat = AimingSystems.getPlayerGunMat(self.__idealTurretYaw, self.__idealGunPitch)
     self.__worldYaw = currentGunMat.yaw
     self.__worldPitch = (targetPos - currentGunMat.translation).pitch
     self._matrix.set(currentGunMat)
     self.__idealTurretYaw, self.__idealGunPitch = self.__worldYawPitchToTurret(self.__worldYaw, self.__worldPitch)
     self.__idealTurretYaw, self.__idealGunPitch = self.__clampToLimits(self.__idealTurretYaw, self.__idealGunPitch)
     self.__oscillator.reset()
     SniperAimingSystem.__activeSystem = self
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:18,代码来源:sniperaimingsystem.py

示例6: enable

 def enable(self, targetPos):
     player = BigWorld.player()
     self.__vehicleTypeDescriptor = player.vehicleTypeDescriptor
     self.__vehicleMProv = player.getOwnVehicleMatrix()
     self.__vehiclePrevMat = Matrix(self.__vehicleMProv)
     IAimingSystem.enable(self, targetPos)
     player = BigWorld.player()
     desc = player.vehicleTypeDescriptor
     self.__yawLimits = desc.gun['turretYawLimits']
     self.__idealTurretYaw, self.__idealGunPitch = getShotAngles(desc, player.getOwnVehicleMatrix(), (0, 0), targetPos, False)
     self.__idealTurretYaw, self.__idealGunPitch = self.__clampToLimits(self.__idealTurretYaw, self.__idealGunPitch)
     currentGunMat = AimingSystems.getPlayerGunMat(self.__idealTurretYaw, self.__idealGunPitch)
     self.__worldYaw = currentGunMat.yaw
     self.__worldPitch = (targetPos - currentGunMat.translation).pitch
     self._matrix.set(currentGunMat)
     self.__idealTurretYaw, self.__idealGunPitch = self.__worldYawPitchToTurret(self.__worldYaw, self.__worldPitch)
     self.__idealTurretYaw, self.__idealGunPitch = self.__clampToLimits(self.__idealTurretYaw, self.__idealGunPitch)
     self.__oscillator.reset()
开发者ID:19colt87,项目名称:WOTDecompiled,代码行数:18,代码来源:sniperaimingsystem.py

示例7: destroy

 def destroy(self):
     IAimingSystem.destroy(self)
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:2,代码来源:arcadeaimingsystem.py

示例8: destroy

 def destroy(self):
     IAimingSystem.destroy(self)
     SniperAimingSystem.__activeSystem = None
     return
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:4,代码来源:sniperaimingsystem.py


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