コード例 #1
0
ファイル: ParallaxOffset.cs プロジェクト: dqtoy/KoalaRescue
        /// <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;
 }