Exemple #1
0
Fichier : CPU.cs Projet : silky/KOS
        private void PopContext()
        {
            UnityEngine.Debug.Log("kOS: Popping context " + _contexts.Count);
            if (_contexts.Any())
            {
                // remove the last context
                var contextRemove = _contexts.Last();
                _contexts.Remove(contextRemove);
                contextRemove.DisableActiveFlyByWire(_shared.BindingMgr);
                UnityEngine.Debug.Log("kOS: Removed Context " + contextRemove.GetCodeFragment(1).FirstOrDefault());

                if (_contexts.Any())
                {
                    _currentContext = _contexts.Last();
                    _currentContext.EnableActiveFlyByWire(_shared.BindingMgr);
                    UnityEngine.Debug.Log("kOS: New current context " + _currentContext.GetCodeFragment(1).FirstOrDefault());
                }
                else
                {
                    _currentContext = null;
                }

                if (_contexts.Count == 1)
                {
                    _shared.Interpreter.SetInputLock(false);
                }
            }
        }
Exemple #2
0
        private void PopContext()
        {
            SafeHouse.Logger.Log("Popping context " + contexts.Count);
            if (contexts.Any())
            {
                // remove the last context
                var contextRemove = contexts.Last();
                contexts.Remove(contextRemove);
                contextRemove.DisableActiveFlyByWire(shared.BindingMgr);
                SafeHouse.Logger.Log("Removed Context " + contextRemove.GetCodeFragment(0).FirstOrDefault());

                if (contexts.Any())
                {
                    currentContext = contexts.Last();
                    currentContext.EnableActiveFlyByWire(shared.BindingMgr);
                    RestorePointers();
                    SafeHouse.Logger.Log("New current context " + currentContext.GetCodeFragment(0).FirstOrDefault());
                }
                else
                {
                    currentContext = null;
                }

                if (contexts.Count == 1)
                {
                    shared.Interpreter.SetInputLock(false);
                }
            }
        }
Exemple #3
0
        private void PopContext()
        {
            UnityEngine.Debug.Log("kOS: Popping context " + contexts.Count);
            if (contexts.Any())
            {
                // remove the last context
                var contextRemove = contexts.Last();
                contexts.Remove(contextRemove);
                contextRemove.DisableActiveFlyByWire(shared.BindingMgr);
                UnityEngine.Debug.Log("kOS: Removed Context " + contextRemove.GetCodeFragment(0).FirstOrDefault());

                if (contexts.Any())
                {
                    currentContext = contexts.Last();
                    currentContext.EnableActiveFlyByWire(shared.BindingMgr);
                    RestorePointers();
                    UnityEngine.Debug.Log("kOS: New current context " + currentContext.GetCodeFragment(0).FirstOrDefault());
                }
                else
                {
                    currentContext = null;
                }

                if (contexts.Count == 1)
                {
                    shared.Interpreter.SetInputLock(false);
                }
            }
        }