Exemple #1
0
        /// <summary>
        /// 移动立绘(从设置的坐标开始移动)
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="x_o">移动起点的x轴坐标</param>
        /// <param name="y_o">移动起点的y轴坐标</param>
        /// <param name="x">目标位置的x轴坐标</param>
        /// <param name="y">目标位置的y轴坐标</param>
        /// <param name="time">移动的时间,默认0.5s</param>
        public EffectPiece MoveCharacterSprite(int depth, float x_o, float y_o, float x, float y, float time = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetPostionByDepth(depth, new Vector3(x_o, y_o)));
            effects.Enqueue(NewEffectBuilder.MoveByDepth(depth, new Vector3(x, y), time));
            return(new EffectPiece(id++, effects));
        }
Exemple #2
0
        /// <summary>
        /// 移动背景(指定起点终点)
        /// </summary>
        /// <param name="x_o">移动起点的x轴坐标</param>
        /// <param name="y_o">移动起点的y轴坐标</param>
        /// <param name="x">目标位置的x轴坐标</param>
        /// <param name="y">目标位置的y轴坐标</param>
        /// <param name="time">移动的时间,默认0.5s</param>
        /// <param name="sync">是否等待完成(异步)</param>
        public EffectPiece MoveBackgroundFrom(float x_o, float y_o, float x, float y, float time = 0.5f, bool sync = false)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetPostionByDepth(-1, new Vector3(x_o, y_o)));
            effects.Enqueue(NewEffectBuilder.MoveByDepth(-1, new Vector3(x, y), time, sync));
            return(new EffectPiece(id++, effects));
        }
Exemple #3
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));
        }
Exemple #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));
        }
Exemple #5
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));
        }
Exemple #6
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));
        }
Exemple #7
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));
        }
Exemple #8
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));
        }