void Start()
 {
     if (parallaxCamera == null)
         parallaxCamera = Camera.main.GetComponent<ParallaxCamera>();
     if (parallaxCamera != null)
         parallaxCamera.onCameraTranslate += Move;
     SetLayers();
 }
 void Start()
 {
     if (parallaxCamera == null)
     {
         parallaxCamera = Camera.main.GetComponent <ParallaxCamera>();
     }
     if (parallaxCamera != null)
     {
         parallaxCamera.onCameraTranslate += Move;
     }
     SetLayers();
 }
 void Start()
 {
     if (parallaxCamera == null)
     {
         parallaxCamera = GameManager.instance.camera.GetComponent <ParallaxCamera>();
     }
     if (parallaxCamera != null)
     {
         parallaxCamera.onCameraTranslate += Move;
     }
     SetLayers();
 }
Beispiel #4
0
    /*
     * ================
     * === INTERNAL ===
     * ================
     */

    private void Start()
    {
        if (parallaxCamera == null)
        {
            parallaxCamera = Camera.main.GetComponent <ParallaxCamera>();
        }
        else
        {
            parallaxCamera.onCameraTranslate += moveLayers;
        }

        setLayers();

        Log.Print($"Initialized parallax background on element '{gameObject.name}'.", this);
    }
    void Start()
    {
        if (parallaxCamera == null)
        {
            parallaxCamera = Camera.main.GetComponent <ParallaxCamera>();
        }
        if (parallaxCamera != null)
        {
            parallaxCamera.onCameraTranslate += Move;
        }

        GameManager.Instance.OnPlaying += SetLayers;

        SetLayers();
    }
 private void Awake()
 {
     _options = (ParallaxCamera)target;
 }