예제 #1
0
        /// <summary>
        /// 设置背景(不带有转换特效)
        /// </summary>
        /// <param name="spriteName">需要更改的背景图片名</param>
        public EffectPiece SetBackground(string spriteName)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetBackSprite(spriteName));
            return(new EffectPiece(id++, effects));
        }
예제 #2
0
        /// <summary>
        /// 设置背景(淡入)
        /// </summary>
        /// <param name="fadein">新图淡入的时间,默认0.3s</param>
        public EffectPiece FadeinBackground(string spriteName, float fadein = 0.3f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetBackSprite(spriteName));
            effects.Enqueue(NewEffectBuilder.FadeInBackSprite(fadein));
            return(new EffectPiece(id++, effects));
        }
예제 #3
0
        /// <summary>
        /// 百叶窗特效
        /// </summary>
        /// <param name="spriteName">新图</param>
        /// <param name="direction">方向(默认:左)</param>
        /// <param name="time">持续时长s(默认0.5s)</param>
        public EffectPiece Shutter(string spriteName, string direction = "left", float time = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.Shutter(spriteName, direction, time));
            effects.Enqueue(NewEffectBuilder.SetBackSprite(spriteName));
            return(new EffectPiece(id++, effects));
        }
예제 #4
0
        /// <summary>
        /// 蒙版特效
        /// </summary>
        /// <param name="spriteName">新图</param>
        /// <param name="direction">方向(默认:左)</param>
        /// <param name="time">持续时长s(默认0.5s)</param>
        public EffectPiece Mask(string spriteName, string maskName, float time = 1.0f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.Mask(spriteName, maskName, time));
            effects.Enqueue(NewEffectBuilder.SetBackSprite(spriteName));
            return(new EffectPiece(id++, effects));
        }
예제 #5
0
        /// <summary>
        /// 圆形展开特效(由内而外)
        /// </summary>
        /// <param name="spriteName">新图</param>
        /// <param name="inverse">是否逆向(默认否)</param>
        /// <param name="time">持续时长s(默认0.5s)</param>
        public EffectPiece Circle(string spriteName, bool inverse = false, float time = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.Circle(spriteName, inverse, time));
            effects.Enqueue(NewEffectBuilder.SetBackSprite(spriteName));
            return(new EffectPiece(id++, effects));
        }
예제 #6
0
        /// <summary>
        /// 卷动特效
        /// </summary>
        /// <param name="spriteName">新图</param>
        /// <param name="direction">方向(默认:左)</param>
        /// <param name="isBoth">是否两图同时卷动</param>
        /// <param name="time">持续时长s(默认0.5s)</param>
        public EffectPiece Scroll(string spriteName, string direction = "left", bool isBoth = false, float time = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            if (isBoth)
            {
                effects.Enqueue(NewEffectBuilder.ScrollBoth(spriteName, direction, time));
            }
            else
            {
                effects.Enqueue(NewEffectBuilder.Scroll(spriteName, direction, time));
            }
            effects.Enqueue(NewEffectBuilder.SetBackSprite(spriteName));
            return(new EffectPiece(id++, effects));
        }