Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        cam          = GetComponent <Camera>();
        scaledWidth  = (int)(Screen.width * scaleFactor);
        scaledHeight = (int)(Screen.height * scaleFactor);

        cam.cullingMask      = ~(1 << LayerMask.NameToLayer("Distortion"));
        cam.depthTextureMode = DepthTextureMode.Depth;

        maskCam            = new GameObject("Distort Mask Cam").AddComponent <Camera>();
        maskCam.enabled    = false;
        maskCam.clearFlags = CameraClearFlags.Nothing;

        musicTest = GameObject.FindGameObjectWithTag("Audio").GetComponent <MusicTest>();
    }
Beispiel #2
0
 private void Awake()
 {
     instance = this;
 }