예제 #1
0
        public override void Unload()
        {
            UIs = null;

            OnUnload?.Invoke();
            OnUnload = null;
        }
예제 #2
0
 /// <summary>
 /// Allows you to hide a banner ad, instead of destroying it altogether.
 /// </summary>
 public void Hide(bool destroy = false)
 {
     this.m_showing = false;
     loaded         = false;
     OnHide?.Invoke(this, new HideEventArgs(m_placementId));
     OnUnload?.Invoke(this, new EventArgs());
 }
예제 #3
0
 public void Dispose()
 {
     OnUnload?.Invoke();
     try
     {
         AppDomain.Unload(Domain);
     }
     catch { }
 }
예제 #4
0
 public void UnloadGameEntities()
 {
     foreach (GameEntity ge in gameEntities)
     {
         MapController.UnBind(ge);
     }
     MapController.UnBindAll();
     gameEntities.Clear();
     OnUnload?.Invoke(this, EventArgs.Empty);
 }
예제 #5
0
        internal async Task NotifyUnload()
        {
            await _serverEvents.NotifyUnload();

            var args = new EventArgs();

            OnUnload?.Invoke(this, args);
            await OnUnloadAsync.InvokeAsync(this, args);

            UnloadComplete?.Invoke(this, new EventArgs());
            _sequencer.AbortAll();
        }
예제 #6
0
        public void Run()
        {
            _world.Load();
            _server.Open();
            OnLoad?.Invoke(this);

            double ticksPerFrame = 1d / UpdatesPerSecond * TimeSpan.TicksPerSecond;

            _ticker.Start(TimeSpan.FromTicks((long)ticksPerFrame));

            _server.Close();
            _world.Unload();
            OnUnload?.Invoke(this);
        }
예제 #7
0
파일: OriMod.cs 프로젝트: TwiliChaos/OriMod
        public override void Unload()
        {
            OnUnload?.Invoke();
            OnUnload = null;

            instance = null;

            bashKey    = null;
            dashKey    = null;
            climbKey   = null;
            featherKey = null;
            chargeKey  = null;
            burrowKey  = null;
            //SoulLinkKey = null;
            ConfigClient = null;
        }
예제 #8
0
        private void UnloadInternal(bool invokeUnloadEvent)
        {
            if (invokeUnloadEvent)
            {
                OnUnload?.Invoke(this);
            }

            if (_textures != null)
            {
                for (int i = 0; i < _textures.Length; i++)
                {
                    _textures[i]?.Dispose();
                }
            }

            IsLoaded = false;
        }
예제 #9
0
 public void Unload()
 {
     OnUnload?.Invoke(this);
 }
예제 #10
0
 public void Unload()
 {
     OnUnload?.Invoke();
 }
예제 #11
0
 internal void UnloadInternal()
 {
     OnUnload?.Invoke();
     Unload();
 }
예제 #12
0
 public static void InvokeOnUnload()
 {
     OnUnload?.Invoke();
 }
예제 #13
0
 internal void InvokeOnUnload()
 {
     OnUnload?.Invoke();
 }
예제 #14
0
 public AssemblyLoaderProvider(string name, bool isCollectible) : base(name, isCollectible)
 {
     OnUnload   = delegate { return(Task.CompletedTask); };
     Unloading += _ => Task.Run(() => OnUnload.Invoke(GetName()));
 }
예제 #15
0
 public AssemblyLoaderProvider(string name) : this(name, true)
 {
     OnUnload   = delegate { return(Task.CompletedTask); };
     Unloading += _ => Task.Run(() => OnUnload.Invoke(GetName()));
 }
예제 #16
0
 public void Dispose()
 {
     Task.Run(() => OnUnload.Invoke(Name));
 }
예제 #17
0
 public void NotifyUnload(Event e) => OnUnload?.Invoke(this, e);
예제 #18
0
 /// <inheritdoc/>
 public override void Unload()
 {
     OnUnload?.Invoke();
     OnUnload = null;
     Instance = null;
 }