//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()); }