using System; using System.Diagnostics; namespace SpaceInvaders { public class StateObserver : InputObserver { //------------------------------------------------------------------- // FIELDS //------------------------------------------------------------------- private State pState; //------------------------------------------------------------------- // CONSTRUCTION //------------------------------------------------------------------- public StateObserver(State currState) { this.pState = currState; } //------------------------------------------------------------------- // PUBLIC METHODS //------------------------------------------------------------------- public override void Notify() { this.pState.Handle(); } } //end class } // end namespace