/// <summary> /// 预渐变立绘(预设坐标) /// </summary> /// <param name="depth">目标所在的层级</param> /// <param name="spriteName">新显示的图片名</param> /// <param name="position">新图片的位置</param> public EffectPiece PreTransSprite(int depth) { Queue <NewImageEffect> effects = new Queue <NewImageEffect>(); effects.Enqueue(NewEffectBuilder.PreTransByDepth(depth)); return(new EffectPiece(id++, effects)); }
/// <summary> /// 预渐变立绘(xy坐标) /// </summary> /// <param name="depth">目标所在的层级</param> /// <param name="spriteName">新显示的图片名</param> /// <param name="x">x轴坐标</param> /// <param name="y">y轴坐标</param> public EffectPiece PreTransSprite(int depth, string spriteName, float x, float y) { Queue <NewImageEffect> effects = new Queue <NewImageEffect>(); effects.Enqueue(NewEffectBuilder.PreTransByDepth(depth, spriteName, new Vector3(x, y))); return(new EffectPiece(id++, effects)); }
/// <summary> /// 预渐变背景 /// </summary> /// <returns></returns> public EffectPiece PreTransBackground() { Queue <NewImageEffect> effects = new Queue <NewImageEffect>(); effects.Enqueue(NewEffectBuilder.PreTransByDepth(-1)); return(new EffectPiece(id++, effects)); }
/// <summary> /// 预渐变立绘(预设坐标) /// </summary> /// <param name="depth">目标所在的层级</param> /// <param name="spriteName">新显示的图片名</param> /// <param name="position">新图片的位置</param> public EffectPiece PreTransCharacterSprite(int depth, string spriteName, string position = "middle") { Queue <NewImageEffect> effects = new Queue <NewImageEffect>(); effects.Enqueue(NewEffectBuilder.PreTransByDepth(depth, spriteName, position)); return(new EffectPiece(id++, effects)); }
/// <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)); }
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)); }
/// <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)); }
/// <summary> /// 单侧渐变特效 /// </summary> /// <param name="spriteName">新图</param> /// <param name="direction">方向(默认:左)</param> /// <param name="time">持续时长s(默认0.5s)</param> public EffectPiece SideFade(int depth, string spriteName, string direction = "left", float time = 0.5f) { Queue <NewImageEffect> effects = new Queue <NewImageEffect>(); effects.Enqueue(NewEffectBuilder.PreTransByDepth(depth)); effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(-1, spriteName)); effects.Enqueue(NewEffectBuilder.SideFade(spriteName, direction, time)); return(new EffectPiece(id++, effects)); }