Пример #1
0
 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
     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)
Пример #2
0
 def __init__(self, dataSec, defaultOffset=None):
     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)
     self.__onChangeControlMode = None
     self.__aimingSystem = None
     self.__curSense = 0
     self.__curScrollSense = 0
     self.__postmortemMode = False
     self.__vehiclesToCollideWith = set()
     self.__focalPointDist = 1.0
     self.__autoUpdateDxDyDz = Vector3(0.0)
     self.__updatedByKeyboard = False
     if defaultOffset is not None:
         self.__defaultAimOffset = defaultOffset
         self.__cam = BigWorld.HomingCamera()
         self.__cam.aimPointClipCoords = defaultOffset
     else:
         self.__defaultAimOffset = Vector2()
         self.__cam = None
     return
    def __init__(self, dataSec, defaultOffset=None):
        super(ArcadeCamera, self).__init__()
        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)
        self.__onChangeControlMode = None
        self.__aimingSystem = None
        self.__curSense = 0
        self.__curScrollSense = 0
        self.__postmortemMode = False
        self.__focalPointDist = 1.0
        self.__autoUpdateDxDyDz = Vector3(0.0)
        self.__updatedByKeyboard = False
        self.__isCamInTransition = False
        if defaultOffset is not None:
            self.__defaultAimOffset = defaultOffset
            self.__cam = BigWorld.HomingCamera(self.__adCfg['enable'])
            if self.__adCfg['enable']:
                self.__cam.initAdvancedCollider(
                    self.__adCfg['fovRatio'], self.__adCfg['rollbackSpeed'],
                    self.__adCfg['minimalCameraDistance'],
                    self.__adCfg['speedThreshold'],
                    self.__adCfg['minimalVolume'])
                for group_name in VOLUME_GROUPS_NAMES:
                    self.__cam.addVolumeGroup(
                        self.__adCfg['volumeGroups'][group_name])

            self.__cam.aimPointClipCoords = defaultOffset
        else:
            self.__defaultAimOffset = Vector2()
            self.__cam = None
        self.__cameraTransition = BigWorld.TransitionCamera()
        return