Пример #1
0
        /// <summary>
        /// 淡出并移除背景
        /// </summary>
        /// <param name="time">淡出时间</param>
        public static Queue <ImageEffect> FadeOutBackground(float time)
        {
            AnimationBuilder builder = new AnimationBuilder();
            UI2DSprite       ui      = EffectBuilder.backgroundSprite;

            return(builder.BeginWith(EffectBuilder.FadeOut(ui, time)).Then(EffectBuilder.RemoveSprite(ui)).Get());
        }
Пример #2
0
        //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());
        }
Пример #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);
        }