/// <summary> /// 淡出并移除立绘 /// </summary> /// <param name="depth">图像层数</param> /// <param name="time">淡出时间</param> public static Queue <ImageEffect> RemoveCharacterSprite(int depth, float time) { AnimationBuilder builder = new AnimationBuilder(); return(builder.BeginWith(EffectBuilder.FadeOutByDepth(depth, time)) .Then(EffectBuilder.DeleteSpriteByDepth(depth)) .Get()); }
/// <summary> /// 删除所有 /// </summary> /// <param name="back">是否包含背景</param> public static Queue <ImageEffect> RemoveAll(bool back) { List <int> charanums = EffectBuilder.GetDepthNum(); Queue <ImageEffect> animation = new Queue <ImageEffect>(); animation.Enqueue(EffectBuilder.BlockClick(false)); foreach (int x in charanums) { //Debug.Log(x); animation.Enqueue(EffectBuilder.DeleteSpriteByDepth(x)); } //if (back) animation.Enqueue(EffectBuilder.RemoveSprite(EffectBuilder.backgroundSprite)); animation.Enqueue(EffectBuilder.BlockClick(true)); return(animation); }