Esempio n. 1
0
        //クロスフェード用のイメージを作成
        protected bool TryCreateCrossFadeImage(float time, AdvGraphicInfo graphic)
        {
            if (LastResource == null)
            {
                return(false);
            }

            if (EnableCrossFade(graphic))
            {
                ReleaseCrossFadeReference();
                crossFadeReference = this.gameObject.AddComponent <AssetFileReference>();
                crossFadeReference.Init(LastResource.File);
                UguiCrossFadeDicing crossFade = this.gameObject.GetComponentCreateIfMissing <UguiCrossFadeDicing>();
                crossFade.CrossFade(
                    Dicing.PatternData,
                    Dicing.mainTexture,
                    time,
                    () =>
                {
                    Destroy(crossFade);
                }
                    );
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        //クロスフェード用のイメージを作成
        protected virtual bool TryCreateCrossFadeImage(float time, AdvGraphicInfo graphic)
        {
            if (LastResource == null)
            {
                return(false);
            }

            if (EnableCrossFade(graphic))
            {
                ReleaseCrossFadeReference();
                crossFadeReference = this.gameObject.AddComponent <AssetFileReference>();
                crossFadeReference.Init(LastResource.File);
                crossFade = this.gameObject.AddComponent <UguiCrossFadeDicing>();
                crossFade.Timer.Unscaled = Engine.Time.Unscaled;
                crossFade.CrossFade(
                    Dicing.PatternData,
                    Dicing.mainTexture,
                    time,
                    () =>
                {
                    ReleaseCrossFadeReference();
                }
                    );
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
 void ReleaseCrossFadeReference()
 {
     if (crossFadeReference != null)
     {
         Destroy(crossFadeReference);
         crossFadeReference = null;
     }
 }
Esempio n. 4
0
 void ReleaseCrossFadeReference()
 {
     if (crossFadeReference != null)
     {
         crossFadeReference.RemoveComponentMySelf();
         crossFadeReference = null;
     }
 }
Esempio n. 5
0
/*
 *              /// <summary>
 *              /// テクスチャファイルを設定
 *              /// </summary>
 *              /// <param name="path">ファイルパス</param>
 *              /// <param name="pixelsToUnits">スプライトを作成する際の、座標1.0単位辺りのピクセル数</param>
 *              public void SetTextureFile(string path, float pixelsToUnits)
 *              {
 *                      AssetFile file = AssetFileManager.Load(path, this);
 *                      SetTextureFile(file,pixelsToUnits);
 *                      file.Unuse(this);
 *              }
 *
 *              /// <summary>
 *              /// テクスチャファイルを設定
 *              /// </summary>
 *              /// <param name="path">ファイルパス</param>
 *              /// <param name="pixelsToUnits">スプライトを作成する際の、座標1.0単位辺りのピクセル数</param>
 *              public void SetSprite(TextureInfo spriteInfo, float pixelsToUnits)
 *              {
 *                      throw new System.NotImplementedException();
 *              }
 */
        /// <summary>
        /// テクスチャファイルをクリア
        /// </summary>
        public void ClearTextureFile()
        {
            AssetFileReference reference = this.GetComponent <AssetFileReference>();

            if (reference != null)
            {
                Destroy(reference);
            }
            Sprite = null;
        }
Esempio n. 6
0
        /// <summary>
        /// テクスチャファイルをクリア
        /// </summary>
        public void ClearTextureFile()
        {
            RawImage.texture = null;
            AssetFileReference reference = this.GetComponent <AssetFileReference>();

            if (reference != null)
            {
                Destroy(reference);
            }
            this.textureFile = null;
        }
Esempio n. 7
0
 void ReleaseCrossFadeReference()
 {
     if (crossFadeReference != null)
     {
         DestroyImmediate(crossFadeReference);
         crossFadeReference = null;
     }
     if (crossFade != null)
     {
         crossFade.RemoveComponentMySelf();
     }
 }
Esempio n. 8
0
 protected virtual void ReleaseCrossFadeReference()
 {
     if (crossFadeReference != null)
     {
         crossFadeReference.RemoveComponentMySelf();
         crossFadeReference = null;
     }
     if (crossFade != null)
     {
         crossFade.RemoveComponentMySelf();
     }
 }
Esempio n. 9
0
        /// <summary>
        /// ファイルをクリア
        /// </summary>
        public void ClearFile()
        {
            Destroy(GraphicComponent);
            GraphicComponent = null;
            AssetFileReference reference = this.GetComponent <AssetFileReference>();

            if (reference != null)
            {
                Destroy(reference);
            }
            this.File = null;
            this.Loader.Unload();
            this.GraphicInfo = null;
        }
        public void ClearFile()
        {
            Object.Destroy(this.GraphicComponent);
            this.GraphicComponent = null;
            AssetFileReference component = base.GetComponent <AssetFileReference>();

            if (component != null)
            {
                Object.Destroy(component);
            }
            this.File = null;
            this.Loader.Unload();
            this.GraphicInfo = null;
        }
Esempio n. 11
0
        //前フレームのテクスチャを使ってクロスフェード処理を行う
        internal void StartCrossFadeImage(float time)
        {
            Texture lastTexture = LastResource.File.Texture;

            ReleaseCrossFadeReference();
            crossFadeReference = this.gameObject.AddComponent <AssetFileReference>();
            crossFadeReference.Init(LastResource.File);

            crossFade = this.gameObject.AddComponent <UguiCrossFadeRawImage>();
            crossFade.Timer.Unscaled = Engine.Time.Unscaled;
            crossFade.CrossFade(
                lastTexture,
                time,
                () =>
            {
                ReleaseCrossFadeReference();
            }
                );
        }
Esempio n. 12
0
        //前フレームのテクスチャを使ってクロスフェード処理を行う
        internal void StartCrossFadeImage(float time)
        {
            Texture lastTexture = LastResource.File.Texture;

            ReleaseCrossFadeReference();
            crossFadeReference = this.gameObject.AddComponent <AssetFileReference>();
            crossFadeReference.Init(LastResource.File);
            UguiCrossFadeRawImage crossFade = this.gameObject.GetComponentCreateIfMissing <UguiCrossFadeRawImage>();

            crossFade.CrossFade(
                lastTexture,
                time,
                () =>
            {
                ReleaseCrossFadeReference();
                crossFade.RemoveComponentMySelf();
            }
                );
        }
Esempio n. 13
0
        public virtual void AddReferenceComponet(GameObject go)
        {
            AssetFileReference fileReference = go.AddComponent <AssetFileReference>();

            fileReference.Init(this);
        }