Пример #1
0
	// Use this for initialization
	void Start ()
    {
        if(audioHandler == null)
        {
			audioHandler = GameObject.Find ("AudioHandler");
           // Debug.Log("Place an audiohandler prefab into the scene and drag it to this object in the inspector");
        }
        handlerScript = audioHandler.GetComponent<CrossFadeControl>();
        
	}
Пример #2
0
    // Use this for initialization
    void Start ()
    {
        player = GameObject.FindGameObjectWithTag("Player").GetComponent<Transform>();
        playerCamera = Camera.main;
        playerCamControl =playerCamera.GetComponent<CameraController>();
        cameraLocation = this.transform.position;
        originalZoomAmount = playerCamera.orthographicSize;
        zoomAmount += playerCamera.orthographicSize;
        cameraLocation.z = playerCamera.transform.position.z;
		audioHandler = GameObject.Find ("AudioHandler").GetComponent<CrossFadeControl> ();
    }
Пример #3
0
 void Start()
 {
     audioScript = audioHandler.GetComponent<CrossFadeControl>();
     doorScript = hubDoor.GetComponent<TrapDoorOpenResponse>();
 }