void ICmpInitializable.OnShutdown(Component.ShutdownContext context) { if (context == ShutdownContext.Deactivate) { this.NotifyEvent(EventType.Deactivate); } else if (context == ShutdownContext.Saving) { this.NotifyEvent(EventType.Saving); } }
void ICmpInitializable.OnShutdown(Component.ShutdownContext context) { switch (context) { case ShutdownContext.Deactivate: this.receivedEvents |= EventFlag.Deactivate; break; case ShutdownContext.RemovingFromGameObject: this.receivedEvents |= EventFlag.RemovingFromGameObject; break; case ShutdownContext.Saving: this.receivedEvents |= EventFlag.Saving; break; } }
void ICmpInitializable.OnShutdown(Component.ShutdownContext context) { if (context == ShutdownContext.Deactivate) { // Clean up the temporary friction joint we have created if (this.frictionJoint != null) { this.frictionJoint.ParentBody.RemoveJoint(this.frictionJoint); this.frictionJoint = null; } } }
void ICmpInitializable.OnShutdown(Component.ShutdownContext context) { if (context == ShutdownContext.Deactivate) { DualityApp.Mouse.ButtonDown -= _mouseDownEventHandler; DualityApp.Mouse.ButtonUp -= _mouseUpEventHandler; DualityApp.Mouse.Move -= _mouseMoveEventHandler; DualityApp.Mouse.WheelChanged -= _mouseWheelEventHandler; DualityApp.Keyboard.KeyDown -= _keyDownEventHandler; DualityApp.Keyboard.KeyUp -= _keyUpEventHandler; } }
void ICmpInitializable.OnShutdown(Component.ShutdownContext context) { if (context == ShutdownContext.Deactivate && DualityApp.ExecContext != DualityApp.ExecutionContext.Editor) { DualityApp.Keyboard.KeyDown -= this.Keyboard_KeyDown; // Save highscore list to Duality MetaData. Could also use a custom file or modified Duality UserData for (int i = 0; i < this.highscore.Count; i++) { DualityApp.MetaData.WriteValue("Asteroids/Highscore/Entry" + i, this.highscore[i].Name + '\t' + this.highscore[i].ScoreString); } DualityApp.SaveMetaData(); } }
void ICmpInitializable.OnShutdown(Component.ShutdownContext context) { if (context == ShutdownContext.Deactivate) { // Fade out playing loop sounds, if there are any. Clean up! if (this.moveSoundLoop != null) { this.moveSoundLoop.FadeOut(0.5f); this.moveSoundLoop = null; } if (this.dangerSoundLoop != null) { this.dangerSoundLoop.FadeOut(0.5f); this.dangerSoundLoop = null; } } }
void ICmpInitializable.OnShutdown(Component.ShutdownContext context) { }
public void OnShutdown(Component.ShutdownContext context) { }
public void OnShutdown(Component.ShutdownContext context) { throw new NotImplementedException(); }
void ICmpInitializable.OnShutdown(Component.ShutdownContext context) { Console.WriteLine("Placeholder code."); }
public void OnShutdown(Component.ShutdownContext context) { // nothing to do here }