Пример #1
0
 public AnimationBuilder BeginWith(ImageEffect e)
 {
     animation = new Queue <ImageEffect>();
     animation.Enqueue(EffectBuilder.BlockClick(false));
     animation.Enqueue(e);
     return(this);
 }
Пример #2
0
        /// <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);
        }
Пример #3
0
        /// <summary>
        /// 淡出所有立绘
        /// </summary>
        /// <param name="time">淡出时间</param>
        //public static Queue<ImageEffect> FadeOutAllChara(float time)
        //{
        //    AnimationBuilder builder = new AnimationBuilder();
        //    List<int> charanums = EffectBuilder.GetDepthNum();
        //    Queue<ImageEffect> animation = new Queue<ImageEffect>();
        //    animation.Enqueue(EffectBuilder.BlockClick(false));
        //    foreach (int x in charanums)
        //    {
        //        animation.Enqueue(EffectBuilder.FadeOutByDepth(x, time));
        //    }
        //    return animation;
        //}

        ///// <summary>
        ///// 移除所有立绘
        ///// </summary>
        //public static Queue<ImageEffect> RemoveAllChara()
        //{
        //    AnimationBuilder builder = new AnimationBuilder();
        //    List<int> charanums = EffectBuilder.GetDepthNum();
        //    Queue<ImageEffect> animation = new Queue<ImageEffect>();
        //    animation.Enqueue(EffectBuilder.BlockClick(false));
        //    foreach (int x in charanums)
        //    {
        //        animation.Enqueue(EffectBuilder.DeleteSpriteByDepth(x));
        //    }
        //    animation.Enqueue(EffectBuilder.BlockClick(true));
        //    return animation;
        //}

        ///// <summary>
        ///// 淡出所有图片(包括背景)
        ///// </summary>
        ///// <param name="time">淡出时间</param>
        //public static Queue<ImageEffect> FadeOutAllPic(float time)
        //{
        //    AnimationBuilder builder = new AnimationBuilder();
        //    List<int> charanums = EffectBuilder.GetDepthNum();
        //    Queue<ImageEffect> animation = new Queue<ImageEffect>();
        //    animation.Enqueue(EffectBuilder.BlockClick(false));
        //    foreach (int x in charanums)
        //    {
        //        animation.Enqueue(EffectBuilder.FadeOutByDepth(x, time));
        //    }
        //    animation.Enqueue(EffectBuilder.FadeOut(EffectBuilder.backgroundSprite, time));
        //    return animation;
        //}
        #endregion

        #region 新增同步特效 所有图片
        /// <summary>
        /// 淡出所有
        /// </summary>
        /// <param name="back">是否包含背景</param>
        /// <param name="dialog">是否包含对话框</param>
        /// <param name="time">淡出时间</param>
        public static Queue <ImageEffect> FadeOutAll(bool back, bool dialog, float time)
        {
            List <int>          charanums = EffectBuilder.GetDepthNum();
            Queue <ImageEffect> animation = new Queue <ImageEffect>();

            animation.Enqueue(EffectBuilder.BlockClick(false));
            if (dialog)
            {
                animation.Enqueue(EffectBuilder.FadeOutDialog(time));
            }
            foreach (int x in charanums)
            {
                animation.Enqueue(EffectBuilder.FadeOutByDepth(x, time));
            }
            if (back)
            {
                animation.Enqueue(EffectBuilder.FadeOut(EffectBuilder.backgroundSprite, time));
            }
            return(animation);
        }
Пример #4
0
 public Queue <ImageEffect> Get()
 {
     animation.Enqueue(EffectBuilder.BlockClick(true));
     return(animation);
 }