コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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);
 }