Exemplo n.º 1
0
 public override void OnAddedToContainer()
 {
     if (MyAPIGateway.Utilities.IsDedicated)
     {
         return;
     }
     _reactor = (MyReactor)Entity;
     _reactor.IsWorkingChanged += Reactor_IsWorkingChanged;
     Reactor_IsWorkingChanged(_reactor);
 }
Exemplo n.º 2
0
 public override void OnBeforeRemovedFromContainer()
 {
     if (MyAPIGateway.Utilities.IsDedicated)
     {
         return;
     }
     _reactor.IsWorkingChanged -= Reactor_IsWorkingChanged;
     _reactor = null;
     _effect?.Stop();
     if (_effect != null)
     {
         MyParticlesManager.RemoveParticleEffect(_effect);
     }
 }