GAM456-SpaceInvaders / SpaceInvaders / 0_Input / Observers / StateObserver.cs
StateObserver.cs
Raw
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