Thinkscroller Version 1.5
Reference Manual / API Documentation
void ThinksquirrelSoftware.Thinkscroller.Parallax.DoScroll ( float  xScrollValue,
float  yScrollValue 
)

Scrolls the parallax manager.

Can also be accessed statically (Parallax.Scroll()). This function controls the global scroll value and is updated every LateUpdate().

   using UnityEngine;
   using System.Collections;
   using ThinksquirrelSoftware.Thinkscroller;

   public class ScrollWithTransform : MonoBehaviour {
        private Transform myTransform;
        private Vector3 oldPosition;
        private Vector3 scrollVector;

        void Start () {
                myTransform = transform;
        }

        void Update () {
                scrollVector = myTransform.position - oldPosition;
                Parallax.Scroll(scrollVector.x, scrollVector.y);
                oldPosition = myTransform.position;
        }
   }   

Implements ThinksquirrelSoftware.Thinkscroller.IParallax.

 All Classes Namespaces Functions Enumerations Properties