Exemplo n.º 1
0
    IEnumerator GetVariables()
    {
        yield return new WaitForSeconds(1);

        childCams = GetComponentsInChildren<RCCChildFixedCam>();
        switcher = GameObject.FindObjectOfType<RCCCamManager>();

        foreach(RCCChildFixedCam l in childCams){
            l.enabled = false;
            l.player = player;
        }

        camPositions = new Transform[childCams.Length];
        childDistances = new float[childCams.Length];

        for(int i = 0; i < camPositions.Length; i ++){
            camPositions[i] = childCams[i].transform;
            childDistances[i] = childCams[i].distance;
        }
    }
Exemplo n.º 2
0
    void Start()
    {
        cams = GetComponentsInChildren<Camera>();
        listeners = GetComponentsInChildren<AudioListener>();
        childCams = GetComponentsInChildren<RCCChildFixedCam>();
        switcher = mainCamera.GetComponent<RCCCamManager>();
        mainListener = mainCamera.GetComponent<AudioListener>();
        distances = new float[cams.Length];

        foreach(Camera c in cams){
            c.enabled = false;
        }
        foreach(AudioListener l in listeners){
            l.enabled = false;
        }
        foreach(RCCChildFixedCam l in childCams){
            l.enabled = false;
            l.player = player;
        }
    }
Exemplo n.º 3
0
    IEnumerator GetVariables()
    {
        yield return(new WaitForSeconds(1));

        childCams = GetComponentsInChildren <RCCChildFixedCam>();
        switcher  = GameObject.FindObjectOfType <RCCCamManager>();

        foreach (RCCChildFixedCam l in childCams)
        {
            l.enabled = false;
            l.player  = player;
        }

        camPositions   = new Transform[childCams.Length];
        childDistances = new float[childCams.Length];

        for (int i = 0; i < camPositions.Length; i++)
        {
            camPositions[i]   = childCams[i].transform;
            childDistances[i] = childCams[i].distance;
        }
    }
Exemplo n.º 4
0
    void Start()
    {
        cams         = GetComponentsInChildren <Camera>();
        listeners    = GetComponentsInChildren <AudioListener>();
        childCams    = GetComponentsInChildren <RCCChildFixedCam>();
        switcher     = mainCamera.GetComponent <RCCCamManager>();
        mainListener = mainCamera.GetComponent <AudioListener>();
        distances    = new float[cams.Length];

        foreach (Camera c in cams)
        {
            c.enabled = false;
        }
        foreach (AudioListener l in listeners)
        {
            l.enabled = false;
        }
        foreach (RCCChildFixedCam l in childCams)
        {
            l.enabled = false;
            l.player  = player;
        }
    }