/// <summary> /// Called when the object is closed. /// </summary> protected virtual void Close(GameContext context, GameObjectBase opener) { IsOpen = false; context.AddSoundEffect(this, SoundEffects.DoorClosed); context.UpdateObject(this); }
/// <summary> /// Called when the object is opened. /// </summary> protected virtual void Open(GameContext context, GameObjectBase opener) { IsOpen = true; context.AddSoundEffect(this, SoundEffects.DoorOpened); context.UpdateObject(this); }