Пример #1
0
 // Start is called before the first frame update
 void Start()
 {
     Cursor.lockState = CursorLockMode.Locked;
     _povScript       = GetComponent <ChangePOV>();
     _uiControllerRef = GameObject.Find("UIController");
     _inventoryScript = _uiControllerRef.GetComponent <ToggleInventory>();
 }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        _controller    = GetComponent <CharacterController>();
        _gravityScript = GetComponent <CharacterGravity>();
        _cameraScript  = GetComponent <PlayerCamera>();
        _povScript     = GetComponent <ChangePOV>();

        _playerRef         = transform.Find("Player");
        _thirdPersonCamera = _cameraScript.ThirdPersonCamera;

        StopMovement();
    }
Пример #3
0
    void Start()
    {
        SetCameraTarget(target);

        vOrbitInput = hOrbitInput = zoomInput = hOrbitSnapInput = mouseOrbitInput = vMouseOrbitInput = 0;

        MoveToTarget();

        collision.Initialize(Camera.main);
        collision.UpdateCameraClipPoints(transform.position, transform.rotation, ref collision.ajustedCameraClipPoints);
        collision.UpdateCameraClipPoints(destination, transform.rotation, ref collision.desiredCameraClipPoints);

        transform.position = destination;

        previosMousePos = currentMousePos = Input.mousePosition;

        ChangePOV changePOV = new ChangePOV();
    }