Ejemplo n.º 1
0
        /// <summary>
        /// 设置背景(不带有转换特效)
        /// </summary>
        /// <param name="spriteName">需要更改的背景图片名</param>
        public EffectPiece SetBackground(string spriteName)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetBackSprite(spriteName));
            effects.Enqueue(NewEffectBuilder.SetAlphaBackSprite(1));
            return(new EffectPiece(id++, effects));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 设置背景(从0淡入)
        /// </summary>
        /// <param name="fadein">新图淡入的时间,默认0.3s</param>
        public EffectPiece FadeinBackground(string spriteName, float fadein = 0.5f)
        {
            Queue <NewImageEffect> effects = new Queue <NewImageEffect>();

            effects.Enqueue(NewEffectBuilder.SetAlphaBackSprite(0));
            effects.Enqueue(NewEffectBuilder.SetBackSprite(spriteName));
            effects.Enqueue(NewEffectBuilder.FadeInBackSprite(fadein));
            return(new EffectPiece(id++, effects));
        }