Exemple #1
0
 public SmoothCameraMovement getCameraController()
 {
     if (cameraController == null)
     {
         cameraController = mainCamera.GetComponent <SmoothCameraMovement>();
     }
     return(cameraController);
 }
Exemple #2
0
        void Awake()
        {
            pm = Player.PlayerManager.instance;
            UpdatePlayerGoldText();

            SwitchTab(0);

            scm = FindObjectOfType <SmoothCameraMovement>();
            cs  = FindObjectsOfType <ContainerSystem>();
        }
Exemple #3
0
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player") && !isTurning)
        {
            playerObject  = other.transform;
            player        = playerObject.GetComponent <PlayerMachine>();
            camera        = player.gameManager.mainCamera.GetComponent <SmoothCameraMovement>();
            input         = player.gameManager.controller;
            startRotation = playerObject.rotation.eulerAngles;

            isTurning = true;
            StartCoroutine(turnPlayer(targetRotation, false));
        }
    }