Пример #1
0
    void Start()
    {
        beatController = GameObject.Find("BeatController").GetComponent <BeatController>();
        beatController.SetCanAttack(canPlayerAttack);

        playerController = GameObject.Find("Player").GetComponent <PlayerController>();
        playerController.SetCanShift(canPlayerShift);

        scroller           = GameObject.Find("RainbowSideScroller").GetComponent <ParallaxController>();
        bScroller          = GameObject.Find("RainbowBottomScroller").GetComponent <ParallaxController>();
        startParallaxSpeed = scroller.GetComponent <ParallaxController>().speed;
        startTime          = Time.time;

        visualizers = GameObject.FindGameObjectsWithTag("AudioCube");
        foreach (var v in visualizers)
        {
            v.GetComponent <RandomColorAudioVisualizer>().SetColorRange(audioMinRed, audioMaxRed, audioMinGreen, audioMaxGreen, audioMinBlue, audioMaxBlue);
        }

        //Camera.main.orthographicSize = cameraSize;
        if (cameraSize != 12f) //TODO not this
        {
            StartCoroutine("ZoomOut");
            GameObject.Find("BoundaryBox").transform.localScale = new Vector3(46f, 35f, 26f);
            GameObject.Find("Player").transform.Find("Spearhead").GetComponent <SpearheadController>().screenSize = 20f;
        }
    }