Пример #1
0
        /// <summary>
        /// On start, we store the current offset
        /// </summary>
        protected virtual void Start()
        {
            CurrentParallaxOffset = this;
            if (GetComponent <Renderer>() != null)
            {
                _renderer = GetComponent <Renderer> ();
            }

            if (_renderer == null && GetComponent <RawImage>() != null)
            {
                _rawImage = GetComponent <RawImage> ();
            }
        }
Пример #2
0
 /// <summary>
 /// On start, we store the current offset
 /// </summary>
 protected virtual void Start()
 {
     CurrentParallaxOffset = this;
     yOffset = GetComponent <Renderer>().material.mainTextureOffset.y;
 }
Пример #3
0
 /// <summary>
 /// On start, we store the current offset
 /// </summary>
 protected virtual void Start()
 {
     CurrentParallaxOffset = this;
 }