public void Recycle(FUIFallBleed fuiFallBleed)
 {
     fuiFallBleed.self.visible = false;
     this.FuiFallBleedQue.Enqueue(fuiFallBleed);
     this.RunnningFuiFallBleedQue.Dequeue();
     //ETModel.Log.Info($"回收了一个飘字特效,id:{fuiFallBleed.Name}");
 }
Exemplo n.º 2
0
        /// <summary>
        /// 播放飘字特效
        /// </summary>
        /// <param name="targetValue">目标值</param>
        public void Play(float targetValue)
        {
            if (FuiFallBleedQue.Count == 0)
            {
                ETModel.Game.Scene.GetComponent <FUIPackageComponent>().AddPackage(FUIPackage.FUIFallBleed);
                var hotfixui = FUIFallBleed.CreateInstance();
                hotfixui.Name = hotfixui.Id.ToString();
                hotfixui.MakeFullScreen();
                Game.Scene.GetComponent <FUIComponent>().Add(hotfixui, true);
                this.Add(hotfixui);
            }

            FUIFallBleed fuiFallBleed = this.FuiFallBleedQue.Dequeue();

            fuiFallBleed.Tex_ValueToFall.text = targetValue.ToString();
            fuiFallBleed.self.visible         = true;
            fuiFallBleed.FallingBleed.Play(CompleteCallBack);

            this.RunnningFuiFallBleedQue.Enqueue(fuiFallBleed);
            this.completedIdQueue.Enqueue(fuiFallBleed.Name);
            //ETModel.Log.Info($"新建了一个飘字特效,id:{fuiFallBleed.Name}");
        }
 public void Add(FUIFallBleed fuiFallBleed)
 {
     this.FuiFallBleedQue.Enqueue(fuiFallBleed);
 }