Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public void SetController(MainController controller)
 {
     mainController = controller;
 }