using Chernobyl.Collections.Generic.Event; using Chernobyl.DesignPatterns.Extension; using Chernobyl.Game; using Chernobyl.Graphics.Drawing; namespace Chernobyl.Interface.Game.StateMachine { /// /// An that, when attached to an /// , displays itself when that enters /// into a particular state (decided by the derived type). /// public abstract class StateScreen : Extension { /// /// Initializes a new instance of the class. /// /// The root /// instance that gives and takes services. public StateScreen(IEventCollection services) { OnOffDrawable = new OnOffDrawable(services); } /// /// Attaches this extension to the passed in object so that is can be /// extended. /// /// The object to extend. protected abstract override void AttachTo(IGame extended); /// /// Removes this extension from an object so that it is no longer extended. /// /// The object to remove the extension from. protected abstract override void DetachFrom(IGame extended); /// /// The that can be used to enable/disable /// rendering of the screen. /// protected OnOffDrawable OnOffDrawable { get; private set; } } }