Esempio n. 1
0
 void Awake()
 {
     instance = this;
     oldPos   = rectTransform.anchoredPosition;
     //OnMove (rectTransform.anchoredPosition);
     //scrollRect.verticalNormalizedPosition = 0.5f;
     Invoke("setFixHeight", 0.05f);
     //print (Screen.height);
 }
Esempio n. 2
0
    private float XAnchorPos;    //para evitar leer el anchor pos cada frame

    void Start()
    {
        if (rectTransform == null)
        {
            rectTransform = GetComponent <RectTransform> ();
        }
        content                = ParalaxManager.instance;
        content.OnMove        += OnMove;
        content.OnUnsubscribe += OnUnsubscribe;

        if (clamped)
        {
            initialValue = rectTransform.anchoredPosition.y;
        }

        XAnchorPos = rectTransform.anchoredPosition.x;
    }
Esempio n. 3
0
 public void setParalaxManager(ParalaxManager paralaxManager)
 {
     this.paralaxManager = paralaxManager;
 }