Ejemplo n.º 1
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));
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 设置动态背景
        /// </summary>
        /// <param name="spriteName">影片名</param>
        /// <param name="fadein">新图淡入的时间,默认0.3s</param>
        public EffectPiece FadeinMovieBackground(string spriteName, float fadein = 0.5f, bool isLoop = true)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetMovieSprite(-1, spriteName, isLoop));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(-1, 0));
            effects.Enqueue(NewEffectBuilder.FadeInByDepth(-1, fadein));
            return(new EffectPiece(id++, effects));
        }
Ejemplo n.º 4
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));
        }
Ejemplo n.º 5
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));
        }
Ejemplo n.º 6
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));
        }
Ejemplo n.º 7
0
        public EffectPiece SetMovieBackground(string filename, bool isLoop = true, float alpha = 1, int x = 0, int y = 0)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetMovieSprite(-1, filename, isLoop));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(-1, alpha));
            effects.Enqueue(NewEffectBuilder.SetPostionByDepth(-1, new Vector3(x, y)));
            return(new EffectPiece(id++, effects));
        }
Ejemplo n.º 8
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));
        }
Ejemplo n.º 9
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));
        }
Ejemplo n.º 10
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));
        }
Ejemplo n.º 11
0
        public EffectPiece FadeinLive2dSprite(int depth, string modelName, int x = 0, int y = 0, float fadein = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetLive2dSpriteByDepth(depth, modelName));
            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));
        }