Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     Julia          = GameObject.Find("Julia").GetComponent <Astral>();
     prisonerCamera = GameObject.Find("Prisoner Camera Rig").GetComponent <FreeLookCam>();
     prisonerCamera.GetComponent <FreeLookCam>().enabled = true;
     prisonerCamera.GetComponent <ProtectCameraFromWallClip>().enabled = false;
     prisonerInventory = new List <Prisoner>();
     canSwap           = true;
     //we are starting in a prisoner
     if (startingPosPrisoner != null)
     {
         StartCoroutine(possesionStart(true));
         //we are staring in Julia
     }
     else
     {
         StartCoroutine(possesionStart(false));
     }
 }
    public void CreateCameraToPlayer()
    {
        var cameraInstantiate = Instantiate(Cameras, transform.position, Quaternion.identity);

        FreeLookCam freeLookCam = cameraInstantiate.transform.Find("FreeLookCameraRig").GetComponent <FreeLookCam>();

        GetComponent <PlayerController>().SetCurrentCameraTranform(freeLookCam.GetComponent <Transform>());
        freeLookCam.SetTarget(this.gameObject.transform);


        Transform  ThirdCameraObj = GameObject.FindWithTag("ThirdCamera").GetComponent <Transform>();
        GameObject objectgoot;

        objectgoot = ThirdCameraObj.gameObject;
        CameraControllerPlayer.SetThirdCamera(objectgoot);
    }