Пример #1
0
        /// <summary>
        /// 移除背景
        /// </summary>
        public static Queue <ImageEffect> RemoveBackground()
        {
            AnimationBuilder builder = new AnimationBuilder();
            UI2DSprite       ui      = EffectBuilder.backgroundSprite;

            return(builder.BeginWith(EffectBuilder.ChangeSprite(ui, null)).Get());
        }
Пример #2
0
        public static Queue <ImageEffect> ChangeSprite(UI2DSprite uiSprite, Sprite sprite)
        {
            AnimationBuilder builder = new AnimationBuilder();

            return(builder.BeginWith(EffectBuilder.ChangeSprite(uiSprite, sprite
                                                                )).Get());
        }
Пример #3
0
        //public static Queue<ImageEffect> ChangeFront(string character, Sprite sprite)
        //{
        //    ImageManager im = GameObject.Find("GameManager").GetComponent<ImageManager>();
        //    return ChangeSprite(im.GetFront(character), sprite);
        //}

        public static Queue <ImageEffect> ChangeSpriteFade(UI2DSprite ui, Sprite sprite, float fadeout, float fadein)
        {
            AnimationBuilder builder = new AnimationBuilder();

            return(builder.BeginWith(EffectBuilder.FadeOut(ui, fadeout))
                   .Then(EffectBuilder.ChangeSprite(ui, sprite))
                   .Then(EffectBuilder.FadeIn(ui, fadein))
                   .Get());
        }
Пример #4
0
        /// <summary>
        /// 设置并淡入背景
        /// </summary>
        /// <param name="sprite">图像名</param>
        /// <param name="time">淡入时间</param>
        public static Queue <ImageEffect> FadeInBackground(Sprite sprite, float time)
        {
            AnimationBuilder builder = new AnimationBuilder();
            UI2DSprite       ui      = EffectBuilder.backgroundSprite;

            return(builder.BeginWith(EffectBuilder.ChangeSprite(ui, sprite))
                   .Then(EffectBuilder.FadeIn(ui, time))
                   .Get());
        }