/// <summary>
        /// タスクを実行します
        /// </summary>
        public void Play(string text, Action onCompleted)
        {
            m_name = text;

            OnStartParent?.Invoke(m_name);
            m_task.Play
            (
                () =>
            {
                OnFinishParent?.Invoke(m_name);
                onCompleted?.Invoke();
            }
            );
        }
        /// <summary>
        /// タスクを実行します
        /// </summary>
        public void Play(string text, Action onCompleted)
        {
            m_name = text;

            OnStartParent?.Invoke(m_name);
            var startTime = Time.realtimeSinceStartup;

            m_task.Play
            (
                () =>
            {
                OnFinishParent?.Invoke(m_name, Time.realtimeSinceStartup - startTime);
                onCompleted?.Invoke();
            }
            );
        }
Beispiel #3
0
        /// <summary>
        /// タスクを実行します
        /// </summary>
        public void Play(string text, Action onCompleted)
        {
            m_name = text;

            OnStartParent?.Invoke(m_name);
            var startTime = Time.realtimeSinceStartup;
            var gcWatcher = new GCWatcher();

            gcWatcher.Start();
            m_task.Play
            (
                () =>
            {
                gcWatcher.Stop();
                OnFinishParent?.Invoke(m_name, Time.realtimeSinceStartup - startTime, gcWatcher.Count);
                onCompleted?.Invoke();
            }
            );
        }