コード例 #1
0
 private void DrawAtomButton(AtomBase atom)
 {
     if (GUILayout.Button(atom.debugName ?? "[Anonymous]", Styles.LeftButton))
     {
         _selectedAtom = atom;
     }
 }
コード例 #2
0
ファイル: AtomScheduler.cs プロジェクト: hadashiA/UniMob
        internal static void Actualize(AtomBase atom)
        {
            _dirty = true;
            _updatingNextFrame.Enqueue(atom);

            if (ReferenceEquals(_current, null) && Application.isPlaying)
            {
                var go = new GameObject(nameof(AtomScheduler));
                _current = go.AddComponent <AtomScheduler>();
                DontDestroyOnLoad(_current);
            }
        }
コード例 #3
0
        private void DrawSelectedAtom()
        {
            // header
            {
                GUILayout.BeginHorizontal(EditorStyles.toolbar);

                if (GUILayout.Button("< Active Atoms", EditorStyles.toolbarButton))
                {
                    _selectedAtom = null;
                    return;
                }

                GUILayout.FlexibleSpace();

                GUILayout.EndHorizontal();
            }

            var state = _selectedAtom.state == AtomState.Actual ? "Actual"
                : _selectedAtom.state == AtomState.Checking ? "Checking"
                : _selectedAtom.state == AtomState.Pulling ? "Pulling"
                : _selectedAtom.state == AtomState.Obsolete ? "Obsolete"
                : "Unknown";

            GUILayout.Label(_selectedAtom.debugName ?? "[Anonymous]", EditorStyles.largeLabel);
            GUILayout.Label(state, EditorStyles.label);
            //if (_selectedAtom.KeepAlive)
            //{
            //    GUILayout.Label("Keep Alive", EditorStyles.boldLabel);
            //}

            GUILayout.Space(10);

            _selectedAtomScroll = GUILayout.BeginScrollView(_selectedAtomScroll);
            {
                DrawAtomCollection("Used By", _selectedAtom.subscribers, _selectedAtom.subscribersCount, _ => true);
                DrawAtomCollection("Uses", _selectedAtom.children, _selectedAtom.childrenCount, _ => true);
            }
            GUILayout.EndScrollView();
        }
コード例 #4
0
 internal CyclicAtomDependencyException(AtomBase source)
     : base("Cyclic atom dependency of " + source)
 {
 }
コード例 #5
0
 private void OnAtomBecameActive(AtomBase obj)
 {
     RefreshActiveAtoms();
 }
コード例 #6
0
ファイル: AtomScheduler.cs プロジェクト: hadashiA/UniMob
 internal static void Unreap(AtomBase atom)
 {
     atom.Reaping = false;
 }
コード例 #7
0
ファイル: AtomScheduler.cs プロジェクト: hadashiA/UniMob
 internal static void Reap(AtomBase atom)
 {
     _dirty       = true;
     atom.Reaping = true;
     _reaping.Enqueue(atom);
 }
コード例 #8
0
ファイル: Atom.cs プロジェクト: Mefodei/UniMob
 internal WatchScope(AtomBase self)
 {
     _parent        = AtomBase.Stack;
     AtomBase.Stack = self;
 }