Esempio n. 1
0
 // finds the gameobjects connected to the camera and the camera's components
 private void Awake()
 {
     singleton       = this;
     thisTransform   = transform;
     defaultPosition = cameraTransform.localPosition.z;
     ignoreLayers    = ~(1 << 8 | 1 << 9 | 1 << 10);
 }
        // handles the collision scripts that have to do with the player
        private void FixedUpdate()
        {
            float delta = Time.fixedDeltaTime;

            if (iscameraHandlerNotNull)
            {
                cameraHandler.FollowTarget(delta);
                cameraHandler.HandleCameraRotation(delta, inputHandler.mouseX, inputHandler.mouseY);
            }
            else
            {
                cameraHandler          = CameraHandler.singleton;
                iscameraHandlerNotNull = cameraHandler != null;
            }
        }
 // finds the camera handler script so that the camera can be controller
 private void Awake()
 {
     cameraHandler          = CameraHandler.singleton;
     iscameraHandlerNotNull = cameraHandler != null;
 }