예제 #1
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.SetSpriteByDepth(-1, spriteName));
            return(new EffectPiece(id++, effects));
        }
예제 #2
0
        /// <summary>
        /// 通用渐变过渡
        /// </summary>
        /// <param name="spriteName">新图</param>
        /// <param name="ruleName">渐变图</param>
        /// <param name="time">持续时间s(默认0.5)</param>
        public EffectPiece Universial(string spriteName, string ruleName, float time = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.Universial(spriteName, ruleName, time));
            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(-1, spriteName));
            return(new EffectPiece(id++, effects));
        }
예제 #3
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.SetSpriteByDepth(-1, spriteName));
            return(new EffectPiece(id++, effects));
        }
예제 #4
0
        /// <summary>
        /// 更改立绘douyu.com
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="spriteName">需要更改的背景图片名</param>
        /// <param name="fadeout">原图淡出的时间,默认0.5s</param>
        /// <param name="fadein">淡入的时间,默认0.5s</param>
        public EffectPiece ChangeCharacterSprite(int depth, string spriteName, float fadeout = 0.15f, float fadein = 0.15f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.FadeOutByDepth(depth, fadeout));
            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(depth, spriteName));
            effects.Enqueue(NewEffectBuilder.FadeInByDepth(depth, fadein));
            return(new EffectPiece(id++, effects));
        }
예제 #5
0
        public EffectPiece FadeinVideoSprite(int depth, string filename, float fadein = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(depth, filename, true));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(depth, 0));
            effects.Enqueue(NewEffectBuilder.FadeInByDepth(depth, fadein));
            return(new EffectPiece(id++, effects));
        }
예제 #6
0
        /// <summary>
        /// 设置动态背景
        /// </summary>
        /// <param name="spriteName">图片名</param>
        /// <param name="fadein">新图淡入的时间,默认0.5s</param>
        public EffectPiece FadeinBackground(string spriteName, float fadein = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(-1, spriteName));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(-1, 0));
            effects.Enqueue(NewEffectBuilder.FadeInByDepth(-1, fadein));
            return(new EffectPiece(id++, effects));
        }
예제 #7
0
        public EffectPiece SetVideoSprite(int depth, string filename, float alpha = 1)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(depth, filename, true));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(depth, alpha));
            effects.Enqueue(NewEffectBuilder.SetPostionByDepth(depth, new Vector3(0, 0)));
            return(new EffectPiece(id++, effects));
        }
예제 #8
0
        /// <summary>
        /// 设置立绘(带坐标)
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="spriteName">需要更改的背景图片名</param>
        /// <param name="x">x轴坐标</param>
        /// <param name="y">y轴坐标</param>
        public EffectPiece SetSprite(int depth, string spriteName, float alpha = 1, int x = 0, int y = 0)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(depth, spriteName));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(depth, alpha));
            effects.Enqueue(NewEffectBuilder.SetPostionByDepth(depth, new Vector3(x, y)));
            return(new EffectPiece(id++, effects));
        }
예제 #9
0
        /// <summary>
        /// 设置立绘(预设位置:左 中 右)
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="spriteName">需要更改的背景图片名</param>
        /// <param name="position">left | middle | right 左中右</param>
        public EffectPiece SetSprite(int depth, string spriteName, string position, float alpha = 1)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(depth, spriteName));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(depth, alpha));
            effects.Enqueue(NewEffectBuilder.SetDefaultPostionByDepth(depth, position));
            return(new EffectPiece(id++, effects));
        }
예제 #10
0
        /// <summary>
        /// 渐变到新的背景
        /// </summary>
        /// <param name="spriteName">目标图片名</param>
        /// <param name="transtime">转换时间</param>
        public EffectPiece TransBackgroundToImage(string spriteName, float transtime = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.PreTransByDepth(-1));
            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(-1, spriteName));
            effects.Enqueue(NewEffectBuilder.TransByDepth(-1, transtime));
            return(new EffectPiece(id++, effects));
        }
예제 #11
0
        /// <summary>
        /// 设置立绘(预设位置:左 中 右)
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="spriteName">需要更改的背景图片名</param>
        /// <param name="position">left | middle | right 左中右</param>
        public EffectPiece SetCharacterSprite(int depth, string spriteName, string position = "middle")
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(depth, spriteName));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(depth, 1));
            effects.Enqueue(NewEffectBuilder.SetDefaultPostionByDepth(depth, position));
            return(new EffectPiece(id++, effects));
        }
예제 #12
0
        /// <summary>
        /// 设置立绘(带坐标淡入)
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="spriteName">需要更改的背景图片名</param>
        /// <param name="x">x轴坐标</param>
        /// <param name="y">y轴坐标</param>
        /// <param name="fadein">淡入的时间,默认0.3s</param>
        public EffectPiece SetCharacterSprite(int depth, string spriteName, float x, float y, float fadein = 0.3f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(depth, spriteName));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(depth, 0));
            effects.Enqueue(NewEffectBuilder.SetPostionByDepth(depth, new Vector3(x, y)));
            effects.Enqueue(NewEffectBuilder.FadeInByDepth(depth, fadein));
            return(new EffectPiece(id++, effects));
        }
예제 #13
0
        public EffectPiece SetMovieCG(string spriteName, bool isLoop = true, float alpha = 1, int x = 0, int y = 0)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(-1, spriteName));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(-1, alpha));
            effects.Enqueue(NewEffectBuilder.SetPostionByDepth(-1, new Vector3(x, y)));
            effects.Enqueue(NewEffectBuilder.UnlockGallery(spriteName));
            return(new EffectPiece(id++, effects));
        }
예제 #14
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.SetSpriteByDepth(-1, spriteName));
            return(new EffectPiece(id++, effects));
        }