Thinkscroller Version 1.5
Reference Manual / API Documentation
static void ThinksquirrelSoftware.Thinkscroller.Parallax.Scroll ( float  xScrollValue,
float  yScrollValue 
) [static]

Scrolls the parallax manager.

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;
        }
   }   
 All Classes Namespaces Functions Enumerations Properties