Пример #1
0
 def Run(self, *etc):
     CameraClient.Run(self, *etc)
     self.cameraStack = [cameras.AvatarCamera()]
     self.sharedCameras = {'Default Startup Camera': self.cameraStack[0]}
     self.entityLoop = None
     self.invertYAxis = False
     self.mouseSmooth = True
     self.mouseLookSpeed = cameras.MOUSE_LOOK_SPEED
     self.desiredDeltaX = 0
     self.desiredDeltaY = 0
     self.lastDeltaX = 0
     self.lastDeltaY = 0
     self.currAverageDeltaX = 0
     self.currAverageDeltaY = 0
     self.skipMouseFrameCount = 0
     self.mouseDeltaHistory = []
     self.mouseInput.RegisterCallback(const.INPUT_TYPE_MOUSEDOWN,
                                      self.OnMouseDown)
     self.mouseInput.RegisterCallback(const.INPUT_TYPE_MOUSEUP,
                                      self.OnMouseUp)
     self.mouseInput.RegisterCallback(const.INPUT_TYPE_MOUSEMOVE,
                                      self.OnMouseMove)
     self.mouseInput.RegisterCallback(const.INPUT_TYPE_MOUSEWHEEL,
                                      self.OnMouseWheel)
Пример #2
0
 def Enable(self):
     CameraClient.Enable(self)
     self.ResetLayerInfo()
     self.StartCamera()
     self.enabled = True
Пример #3
0
 def _PushNewCamera(self, camera):
     CameraClient._PushNewCamera(self, camera)
     uicore.uilib.centerMouse = False
Пример #4
0
 def Disable(self):
     CameraClient.Disable(self)
     self.StopCamera()
     uicore.uilib.centerMouse = False
     self.enabled = False