예제 #1
0
        protected override void OnDestroy()
        {
            if (this == LoadingIndicator.instance)
            {
                LoadingIndicator.instance = null;
            }

            base.OnDestroy();
        }
예제 #2
0
        protected override void Awake()
        {
            base.Awake();

            LoadingIndicator.instance = this;

            if (this.introOutro && this.introOutro.Animation)
            {
                UICache.OptimizeAnimPairOnetime(this.introOutro);
            }
        }
예제 #3
0
        void Update()
        {
            if (!this.activate)
            {
                return;
            }

            if (this.IsDone)
            {
                LoadingIndicator.SetActiveWithDelay(false, 0);
            }
        }
예제 #4
0
        public static void Close(bool immediate = false)
        {
            var inst = LoadingIndicator.instance;

            if (!inst)
            {
                return;
            }

            inst.list.Clear();

            if (immediate)
            {
                LoadingIndicator.SetActiveWithDelay(false, 0);
            }
        }
예제 #5
0
        public static void On(IsDoneCallback callback, float delay = 0)
        {
            if (null == callback)
            {
                throw new Exception("LOADING_INDICATOR:ON:EXCEPT:BAD_CALLBACK");
            }

            var inst = LoadingIndicator.instance;

            if (!inst)
            {
                return;
            }

            inst.list.AddLast(callback);

            LoadingIndicator.SetActiveWithDelay(true, delay);
        }