Ejemplo n.º 1
0
        /// <summary>
        /// 直接渐变立绘(预设坐标)
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="spriteName">新显示的图片名</param>
        /// <param name="position">新图片的位置,默认middle</param>
        /// <param name="transtime">渐变时间,默认0.5s</param>
        public EffectPiece TransCharacterSprite(int depth, float transtime = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.TransByDepth(depth, transtime));
            return(new EffectPiece(id++, effects));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 直接渐变立绘(xy坐标)
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="spriteName">新显示的图片名</param>
        /// <param name="x">x轴坐标</param>
        /// <param name="y">y轴坐标</param>
        /// <param name="transtime">渐变时间,默认0.5s</param>
        public EffectPiece TransCharacterSprite(int depth, string spriteName, float x, float y, float transtime = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.PreTransByDepth(depth, spriteName, new Vector3(x, y)));
            effects.Enqueue(NewEffectBuilder.TransByDepth(depth, transtime));
            return(new EffectPiece(id++, effects));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 渐变
        /// </summary>
        /// <param name="transtime">转换时间</param>
        public EffectPiece TransBackground(float transtime = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            //effects.Enqueue(NewEffectBuilder.PreTransBackSprite(spriteName));
            effects.Enqueue(NewEffectBuilder.TransByDepth(-1, transtime));
            return(new EffectPiece(id++, effects));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 直接渐变立绘(预设坐标)
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="spriteName">新显示的图片名</param>
        /// <param name="position">新图片的位置,默认middle</param>
        /// <param name="transtime">渐变时间,默认0.5s</param>
        public EffectPiece TransCharacterSprite(int depth, string spriteName, string position = "middle", float transtime = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.PreTransByDepth(depth, spriteName, position));
            effects.Enqueue(NewEffectBuilder.TransByDepth(depth, transtime));
            return(new EffectPiece(id++, effects));
        }
Ejemplo n.º 5
0
        public EffectPiece TransBackgroundToMovie(string spriteName, float transtime = 0.5f, bool isLoop = true)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.PreTransByDepth(-1));
            effects.Enqueue(NewEffectBuilder.SetMovieSprite(-1, spriteName, isLoop));
            effects.Enqueue(NewEffectBuilder.TransByDepth(-1, transtime));
            return(new EffectPiece(id++, effects));
        }