/// <summary> /// 改变原有立绘(淡出淡入) /// </summary> /// <param name="depth">图像层数</param> /// <param name="sprite">图像名</param> /// <param name="fadeout">原图淡出时间</param> /// <param name="fadein">淡入时间</param> public static Queue <ImageEffect> ChangeCharacterSprite(int depth, Sprite sprite, float fadeout, float fadein) { AnimationBuilder builder = new AnimationBuilder(); if (fadeout == 0) { builder.BeginWith(EffectBuilder.ChangeByDepth(depth, sprite)); } else { builder.BeginWith(EffectBuilder.FadeOutByDepth(depth, fadeout)) .Then(EffectBuilder.SetSpriteByDepth(depth, sprite)); } if (fadein != 0) { return(builder.Then(EffectBuilder.FadeInByDepth(depth, fadein)).Get()); } return(builder.Get()); }