예제 #1
0
 void Start()
 {
     if (parallaxCamera == null)
         parallaxCamera = Camera.main.GetComponent<ParallaxCamera>();
     if (parallaxCamera != null)
         parallaxCamera.onCameraTranslate += Move;
     SetLayers();
 }
예제 #2
0
 void Start()
 {
     if (parallaxCamera == null)
     {
         parallaxCamera = Camera.main.GetComponent <ParallaxCamera>();
     }
     if (parallaxCamera != null)
     {
         parallaxCamera.onCameraTranslate += Move;
     }
     SetLayers();
 }
예제 #3
0
 void Start()
 {
     if (parallaxCamera == null)
     {
         parallaxCamera = GameManager.instance.camera.GetComponent <ParallaxCamera>();
     }
     if (parallaxCamera != null)
     {
         parallaxCamera.onCameraTranslate += Move;
     }
     SetLayers();
 }
예제 #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);
    }
예제 #5
0
    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;
 }