public MainView() { InitializeComponent(); mainController = new MainController(); this.SetController(mainController); mainModel = new MainModel(); mainController.AddModel(mainModel); mainModel.AttachObserver(this); mapModel = new MapModel(); mainController.AddModel(mapModel); mapModel.AttachObserver(this); MonsterPictureBoxInit(); random = new Random(); Notify(mapModel); Notify(mainModel); monsterCount = mapModel.MapList[mapModel.CurrentMap].monsterList.Count; }
public void SetController(MainController controller) { mainController = controller; }