NScumm.Scumm.ScummEngine.StopScript C# (CSharp) Метод

StopScript() публичный Метод

public StopScript ( int script ) : void
script int
Результат void
        public void StopScript(int script)
        {
            if (script == 0)
                return;

            for (var i = 0; i < NumScriptSlot; i++)
            {
                if (script == _slots[i].Number && _slots[i].Status != ScriptStatus.Dead &&
                    (_slots[i].Where == WhereIsObject.Global || _slots[i].Where == WhereIsObject.Local))
                {
                    if (_slots[i].CutSceneOverride != 0 && Game.Version >= 5)
                        throw new NotSupportedException(string.Format("Script {0} stopped with active cutscene/override", script));

                    _slots[i].Number = 0;
                    _slots[i].Status = ScriptStatus.Dead;

                    if (CurrentScript == i)
                        CurrentScript = 0xFF;
                }
            }

            for (var i = 0; i < _numNestedScripts; ++i)
            {
                if (_nest[i].Number == script &&
                    (_nest[i].Where == WhereIsObject.Global || _nest[i].Where == WhereIsObject.Local))
                {
                    _nest[i].Number = 0;
                    _nest[i].Slot = 0xFF;
                    _nest[i].Where = WhereIsObject.NotFound;
                }
            }
        }
ScummEngine