Пример #1
0
        internal void OnFinishUnloading()
        {
            Debug.Assert(IsUnloading, $"Level: {Name}");
            Debug.Assert(!IsLoading, $"Level: {Name}");
            Debug.Assert(IsLoaded, $"Level: {Name}");

            IsUnloading = false;

            IsLoaded = false;

            OnUnloaded?.Invoke(this);
        }
Пример #2
0
        protected void OnFinishedUnloading()
        {
            if (HUD != null)
            {
                HUD.Retire();
            }

            ActiveState = WIActiveState.Invisible;
            //unloaded just means unloaded, not actually removed
            //so don't tell our stack that we've been removed
            //but do tell the group!
            Group.UnloadChildItem(this);
            //this will call OnRemovedFromGroup
            OnUnloaded.SafeInvoke();
            //now scripts will start unloading their stuff
            var enumerator = mScripts.Values.GetEnumerator();

            while (enumerator.MoveNext())
            {
                //foreach (WIScript script in mScripts.Values) {
                enumerator.Current.enabled = false;
            }
            StopAllCoroutines();
        }
Пример #3
0
 void IMenuNavigationHook.InvokeOnUnloaded(object sender, object args)
 {
     OnUnloaded?.Invoke(sender, args);
 }
Пример #4
0
 private void OnUnloadedHandler(object sender, RoutedEventArgs routedEventArgs)
 {
     OnUnloaded?.Invoke(sender, null);
 }
Пример #5
0
 public MemView()
 {
     InitializeComponent();
     Loaded   += (sender, args) => OnLoaded?.Invoke();
     Unloaded += (sender, args) => OnUnloaded?.Invoke();
 }