コード例 #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);
        }