/// <summary> /// Updates the State and manages Maps /// </summary> /// <param name="rWindow">Needed to Calculate MousePosition from its origin</param> /// <returns>gTargetState</returns> public override eGameState Update(RenderWindow rWindow) { switch (eCurrentMap) { case eMapState.ssMain: InitializeState(mMainMap); eTargetMap = mMainMap.Update(rWindow); DisposeState(mMainMap); break; } if (Player.GetHealth() <= 0) { gTargetState = eGameState.gsGameOver; } return(gTargetState); }