/// <summary> /// 移除背景 /// </summary> public static Queue <ImageEffect> RemoveBackground() { AnimationBuilder builder = new AnimationBuilder(); UI2DSprite ui = EffectBuilder.backgroundSprite; return(builder.BeginWith(EffectBuilder.ChangeSprite(ui, null)).Get()); }
public static Queue <ImageEffect> ChangeSprite(UI2DSprite uiSprite, Sprite sprite) { AnimationBuilder builder = new AnimationBuilder(); return(builder.BeginWith(EffectBuilder.ChangeSprite(uiSprite, sprite )).Get()); }
//public static Queue<ImageEffect> ChangeFront(string character, Sprite sprite) //{ // ImageManager im = GameObject.Find("GameManager").GetComponent<ImageManager>(); // return ChangeSprite(im.GetFront(character), sprite); //} public static Queue <ImageEffect> ChangeSpriteFade(UI2DSprite ui, Sprite sprite, float fadeout, float fadein) { AnimationBuilder builder = new AnimationBuilder(); return(builder.BeginWith(EffectBuilder.FadeOut(ui, fadeout)) .Then(EffectBuilder.ChangeSprite(ui, sprite)) .Then(EffectBuilder.FadeIn(ui, fadein)) .Get()); }
/// <summary> /// 设置并淡入背景 /// </summary> /// <param name="sprite">图像名</param> /// <param name="time">淡入时间</param> public static Queue <ImageEffect> FadeInBackground(Sprite sprite, float time) { AnimationBuilder builder = new AnimationBuilder(); UI2DSprite ui = EffectBuilder.backgroundSprite; return(builder.BeginWith(EffectBuilder.ChangeSprite(ui, sprite)) .Then(EffectBuilder.FadeIn(ui, time)) .Get()); }