Example #1
0
        /// <summary>
        /// 删除立绘
        /// </summary>
        /// <param name="depth">目标所在的层级</param>
        /// <param name="fadeout">淡出的时间,默认0.3s</param>
        public EffectPiece FadeoutCharacterSprite(int depth, float fadeout = 0.3f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.FadeOutByDepth(depth, fadeout));
            return(new EffectPiece(id++, effects));
        }
Example #2
0
        /// <summary>
        /// 移除背景(淡出)
        /// </summary>
        /// <param name="fadeout">原图淡出的时间,默认0.3s</param>
        public EffectPiece FadeoutBackground(float fadeout = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.FadeOutByDepth(-1, fadeout));
            return(new EffectPiece(id++, effects));
        }
Example #3
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));
        }
Example #4
0
        /// <summary>
        /// 变更背景(淡出旧背景+淡入新背景)
        /// </summary>
        /// <param name="spriteName">需要更改的背景图片名</param>
        /// <param name="fadeout">原图淡出的时间,默认0.3s</param>
        /// <param name="fadein">新图淡入的时间,默认0.3s</param>
        public EffectPiece ChangeBackground(string spriteName, float fadeout = 0.5f, float fadein = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.FadeOutByDepth(-1, fadeout));
            effects.Enqueue(NewEffectBuilder.SetSpriteByDepth(-1, spriteName));
            effects.Enqueue(NewEffectBuilder.SetAlphaByDepth(-1, 0));
            effects.Enqueue(NewEffectBuilder.FadeInByDepth(-1, fadein));
            return(new EffectPiece(id++, effects));
        }