예제 #1
0
 public void NotifyChanged(ModelData data, Event e)
 {
     _playerPosition = data.PlayerPosition;
     _wallPositions = data.WallPositions;
     _paperPosition = data.PaperPosition;
     _data = data;
     Draw();
 }
예제 #2
0
 public void NotifyObserver(Event e)
 {
     foreach (IModelObserver o in _observers)
     {
         var data = new ModelData(GetPlayerPosition(), GetWallPositions(),
             (Room.PaperFound) ? new Point(-1, -1) : GetPaperPosition(), Player.NumLife, _pagesRemaining);
         o.NotifyChanged(data, e);
     }
 }
예제 #3
0
 public void NotifyChanged(ModelData data, Event e)
 {
     Event = e;
     Draw();
 }