Example #1
0
 public virtual void OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         DetachFromParent(true);
     }
 }
 public virtual void OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         CmdOverlay.RemoveCommands(this);
     }
 }
Example #3
0
 public void OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         GameObj.DisposeLater();
     }
 }
Example #4
0
 public void OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         ClearShapes();
     }
 }
Example #5
0
		void ICmpInitializable.OnShutdown(ShutdownContext context)
		{
			if (context == ShutdownContext.Deactivate || context == ShutdownContext.Saving)
			{
				this.GameObj.Dispose();
			}
		}
		void ICmpInitializable.OnShutdown(ShutdownContext context)
		{
			if (context == ShutdownContext.Deactivate)
			{
				this.GameObj.Parent = null;
			}
		}
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate || context == ShutdownContext.Saving)
     {
         this.GameObj.Dispose();
     }
 }
Example #8
0
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         this.GameObj.Parent = null;
     }
 }
Example #9
0
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate && DualityApp.ExecEnvironment == DualityApp.ExecutionEnvironment.Launcher)
     {
         GuiCore.Context.UnloadDocument(_document);
     }
 }
Example #10
0
 protected override void OnDeactivated(ShutdownContext context)
 {
     if (activeRobot != null)
     {
         activeRobot.Deactivate();
         activeRobot = null;
     }
 }
Example #11
0
 public void OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate && _document != null)
     {
         GuiCore.Context.UnloadDocument(_document);
         _document = null;
     }
 }
Example #12
0
 protected override void OnDeactivated(ShutdownContext context)
 {
     if (sound != null)
     {
         sound.FadeOut(0.8f);
         sound = null;
     }
 }
Example #13
0
 public void OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         DualityApp.Mouse.ButtonDown -= OnButtonDown;
         DualityApp.Mouse.ButtonUp   -= OnButtonUp;
     }
 }
Example #14
0
 protected override void OnDeactivated(ShutdownContext context)
 {
     if (currentMace != null)
     {
         api.RemoveActor(currentMace);
         currentMace = null;
     }
 }
Example #15
0
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         for (int i = this.sources.Count - 1; i >= 0; i--)
             if (this.sources[i].Instance != null) this.sources[i].Instance.Stop();
     }
 }
Example #16
0
 protected override void OnDeactivated(ShutdownContext context)
 {
     if (sound != null)
     {
         sound.Stop();
         sound = null;
     }
 }
 public void OnShutdown(ShutdownContext context)
 {
     if(context == ShutdownContext.RemovingFromGameObject)
     {
         RigidBody body = (RigidBody)GameObj.GetComponent(typeof(RigidBody));
         body.ClearShapes();
     }
 }
            public void OnShutdown(ShutdownContext context)
            {
                if (_deactivateOrder == null)
                {
                    return;
                }

                _deactivateOrder.Add(Id);
            }
Example #19
0
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         Scene last = Scene.Current;
         Scene.SwitchTo(Target);
         this.Switched = (last != Scene.Current && Scene.Current == Target);
     }
 }
Example #20
0
        public void OnShutdown(ShutdownContext context)
        {
            if (context != ShutdownContext.Deactivate)
            {
                return;
            }

            Stop();
        }
Example #21
0
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate && DualityApp.ExecContext == DualityApp.ExecutionContext.Game)
     {
         foreach (GameObject child in this.GameObj.Children)
         {
             child.DisposeLater();
         }
     }
 }
Example #22
0
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         if (this.bgTrack != null)
         {
             this.bgTrack.FadeOut(2.0f);
         }
     }
 }
Example #23
0
 public void OnShutdown(ShutdownContext context)
 {
     Log.Game.Write("Shutting down spaceship");
     if (context == ShutdownContext.Deactivate)
     {
         if (this.m_beamSoundInstance != null)
         {
             this.m_beamSoundInstance.FadeOut(0.1f);
         }
     }
     //throw new NotImplementedException();
 }
Example #24
0
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate || context == ShutdownContext.RemovingFromGameObject)
     {
         for (int i = this.sources.Count - 1; i >= 0; i--)
         {
             if (this.sources[i].Instance != null)
             {
                 this.sources[i].Instance.Stop();
             }
         }
     }
 }
Example #25
0
        protected override void OnDeactivated(ShutdownContext context)
        {
            state = StateWaiting;

            if (shields != null)
            {
                for (int i = 0; i < shields.Length; i++)
                {
                    api.RemoveActor(shields[i]);
                }

                shields = null;
            }
        }
Example #26
0
 private List <HoraMinutos> GetTimesShutdown()
 {
     try
     {
         using (var db = new ShutdownContext(ShutdownServer, ShutdownDatabase))
         {
             var sql = @"select hora as Hora, minutos as Minutos from hora_apagado";
             return(db.Database.SqlQuery <HoraMinutos>(sql).ToList());
         }
     }
     catch (Exception)
     {
         return(new List <HoraMinutos>());
     }
 }
Example #27
0
        public async Task <ResultBase> ShutdownAsync(Guid authenticationToken, int milliseconds, bool isRestart, string message)
        {
            var authentication  = this.peer[authenticationToken];
            var shutdownContext = new ShutdownContext()
            {
                Milliseconds = milliseconds,
                IsRestart    = isRestart,
                Message      = message
            };

            await this.CremaHost.ShutdownAsync(authentication, shutdownContext);

            return(new ResultBase()
            {
                SignatureDate = authentication.SignatureDate
            });
        }
Example #28
0
        protected override async Task OnExecuteAsync(CancellationToken cancellationToken)
        {
            var authentication = this.CommandContext.GetAuthentication(this);

            if (this.IsCancelled == true)
            {
                await this.cremaHost.CancelShutdownAsync(authentication);
            }
            else
            {
                var shutdownContext = new ShutdownContext()
                {
                    Milliseconds = this.Time.Milliseconds,
                    IsRestart    = this.IsRestart,
                    Message      = this.Message
                };
                shutdownContext.ShutdownException += ShutdownContext_ShutdownException;
                await this.cremaHost.ShutdownAsync(authentication, shutdownContext);
            }
        }
Example #29
0
        void ICmpInitializable.OnShutdown(ShutdownContext context)
        {
            if (context == ShutdownContext.RemovingFromGameObject)
            {
                if (this.gameobj.Parent != null)
                {
                    if (this.parentTransform == null)
                    {
                        this.gameobj.Parent.EventComponentAdded -= this.Parent_EventComponentAdded;
                    }
                    else
                    {
                        this.gameobj.Parent.EventComponentRemoving -= this.Parent_EventComponentRemoving;
                    }
                }

                this.parentTransform = null;
                this.UpdateRel();
            }
        }
 public void OnShutdown(ShutdownContext context)
 {
 }
            public void OnShutdown(ShutdownContext context)
            {
                if (_deactivateOrder == null)
                    return;

                _deactivateOrder.Add(Id);
            }
Example #32
0
 public void OnShutdown(ShutdownContext context)
 {
 }
        public void OnShutdown(ShutdownContext context)
        {
            if (context != ShutdownContext.Deactivate)
                return;

            Stop();
        }
Example #34
0
 public void OnShutdown(ShutdownContext context)
 {
     //throw new NotImplementedException();
 }
Example #35
0
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
 }
Example #36
0
			void ICmpInitializable.OnShutdown(ShutdownContext context)
			{
				if (context == ShutdownContext.Deactivate)
				{
					Scene last = Scene.Current;
					Scene.SwitchTo(Target);
					this.Switched = (last != Scene.Current && Scene.Current == Target);
				}
			}
Example #37
0
		void ICmpInitializable.OnShutdown(ShutdownContext context) {}
Example #38
0
        void ICmpInitializable.OnShutdown(ShutdownContext context)
        {
            if (context == ShutdownContext.RemovingFromGameObject)
            {
                this.gameobj.EventParentChanged -= this.gameobj_EventParentChanged;
                if (this.gameobj.Parent != null)
                {
                    if (this.parentTransform == null)
                        this.gameobj.Parent.EventComponentAdded -= this.Parent_EventComponentAdded;
                    else
                        this.gameobj.Parent.EventComponentRemoving -= this.Parent_EventComponentRemoving;
                }

                this.parentTransform = null;
                this.UpdateRel();
            }
        }
Example #39
0
 protected virtual void OnDeactivated(ShutdownContext context)
 {
 }
Example #40
0
		void ICmpInitializable.OnShutdown(ShutdownContext context)
		{
			if (context == ShutdownContext.Deactivate)
				this.Shutdown();
			else if (context == ShutdownContext.Saving)
				this.RemoveDisposedJoints();
		}
Example #41
0
 void ICmpInitializable.OnShutdown(ShutdownContext context)
 {
     DualityApp.Mouse.ButtonDown -= Mouse_ButtonDown;
 }