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); } }
public void OnShutdown(ShutdownContext context) { if (context == ShutdownContext.Deactivate) { GameObj.DisposeLater(); } }
public void OnShutdown(ShutdownContext context) { if (context == ShutdownContext.Deactivate) { ClearShapes(); } }
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 && DualityApp.ExecEnvironment == DualityApp.ExecutionEnvironment.Launcher) { GuiCore.Context.UnloadDocument(_document); } }
protected override void OnDeactivated(ShutdownContext context) { if (activeRobot != null) { activeRobot.Deactivate(); activeRobot = null; } }
public void OnShutdown(ShutdownContext context) { if (context == ShutdownContext.Deactivate && _document != null) { GuiCore.Context.UnloadDocument(_document); _document = null; } }
protected override void OnDeactivated(ShutdownContext context) { if (sound != null) { sound.FadeOut(0.8f); sound = null; } }
public void OnShutdown(ShutdownContext context) { if (context == ShutdownContext.Deactivate) { DualityApp.Mouse.ButtonDown -= OnButtonDown; DualityApp.Mouse.ButtonUp -= OnButtonUp; } }
protected override void OnDeactivated(ShutdownContext context) { if (currentMace != null) { api.RemoveActor(currentMace); currentMace = null; } }
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(); } }
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); }
void ICmpInitializable.OnShutdown(ShutdownContext context) { if (context == ShutdownContext.Deactivate) { Scene last = Scene.Current; Scene.SwitchTo(Target); this.Switched = (last != Scene.Current && Scene.Current == Target); } }
public void OnShutdown(ShutdownContext context) { if (context != ShutdownContext.Deactivate) { return; } Stop(); }
void ICmpInitializable.OnShutdown(ShutdownContext context) { if (context == ShutdownContext.Deactivate && DualityApp.ExecContext == DualityApp.ExecutionContext.Game) { foreach (GameObject child in this.GameObj.Children) { child.DisposeLater(); } } }
void ICmpInitializable.OnShutdown(ShutdownContext context) { if (context == ShutdownContext.Deactivate) { if (this.bgTrack != null) { this.bgTrack.FadeOut(2.0f); } } }
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(); }
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(); } } } }
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; } }
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>()); } }
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 }); }
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); } }
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); }
public void OnShutdown(ShutdownContext context) { if (context != ShutdownContext.Deactivate) return; Stop(); }
public void OnShutdown(ShutdownContext context) { //throw new NotImplementedException(); }
void ICmpInitializable.OnShutdown(ShutdownContext context) { }
void ICmpInitializable.OnShutdown(ShutdownContext context) {}
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(); } }
protected virtual void OnDeactivated(ShutdownContext context) { }
void ICmpInitializable.OnShutdown(ShutdownContext context) { if (context == ShutdownContext.Deactivate) this.Shutdown(); else if (context == ShutdownContext.Saving) this.RemoveDisposedJoints(); }
void ICmpInitializable.OnShutdown(ShutdownContext context) { DualityApp.Mouse.ButtonDown -= Mouse_ButtonDown; }