//クロスフェード用のイメージを作成 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); } }
//クロスフェード用のイメージを作成 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); } }
void ReleaseCrossFadeReference() { if (crossFadeReference != null) { Destroy(crossFadeReference); crossFadeReference = null; } }
void ReleaseCrossFadeReference() { if (crossFadeReference != null) { crossFadeReference.RemoveComponentMySelf(); crossFadeReference = null; } }
/* * /// <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; }
/// <summary> /// テクスチャファイルをクリア /// </summary> public void ClearTextureFile() { RawImage.texture = null; AssetFileReference reference = this.GetComponent <AssetFileReference>(); if (reference != null) { Destroy(reference); } this.textureFile = null; }
void ReleaseCrossFadeReference() { if (crossFadeReference != null) { DestroyImmediate(crossFadeReference); crossFadeReference = null; } if (crossFade != null) { crossFade.RemoveComponentMySelf(); } }
protected virtual void ReleaseCrossFadeReference() { if (crossFadeReference != null) { crossFadeReference.RemoveComponentMySelf(); crossFadeReference = null; } if (crossFade != null) { crossFade.RemoveComponentMySelf(); } }
/// <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; }
//前フレームのテクスチャを使ってクロスフェード処理を行う 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(); } ); }
//前フレームのテクスチャを使ってクロスフェード処理を行う 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(); } ); }
public virtual void AddReferenceComponet(GameObject go) { AssetFileReference fileReference = go.AddComponent <AssetFileReference>(); fileReference.Init(this); }