public MainPresenter(IMainForm mainForm) { MainForm = mainForm; CreateControls(); PersonPresenter = new PersonPresenter(CreatePersonControl, ProfilPersonControl); MainForm.PersonButtonClick += PersonButtonClick; MainForm.StoryButtonClick += StoryButtonClick; MainForm.FightButtonClick += FightButtonClick; MainForm.AchievementButtonClick += AchievementButtonClick; PersonButtonClick(this, null); BattlePresenter = new BattlePresenter(FightControl); BattlePresenter.Save += PersonPresenter.Save; BattlePresenter.AddAchievement += PersonPresenter.AddAchievement; FightPresenter = new FightPresenter(this, FightChoiceControl, FightControl, BattlePresenter); StoryPresenter = new StoryPresenter(this, StoryControl, FightControl, BattlePresenter); StoryPresenter.AddAchievement += PersonPresenter.AddAchievement; AchievementPresenter = new AchievementPresenter(this, AchievementControl); }
public StoryPresenter(MainPresenter mainPresenter, IStoryControl storyControl, IFightControl fightControl, BattlePresenter battlePresenter) { StoryControl = storyControl; FightControl = fightControl; MainPresenter = mainPresenter; BattlePresenter = battlePresenter; BattlePresenter.DoNextStepStory += BeginStartStory; Enemies = BasePresenter.Load("Enemies"); StoryControl.StartStory += BeginStory; FillInStories(); }
public FightPresenter(MainPresenter mainPresenter, IFightChoiceControl fightChoiceControl, IFightControl fightControl, BattlePresenter battlePresenter) { MainPresenter = mainPresenter; FightChoiceControl = fightChoiceControl; BattlePresenter = battlePresenter; FightChoiceControl.FightButtonClick += FightButtonClick; FightChoiceControl.InformationButtonClick += InformationButtonClick; fightChoiceControl.ChangeButtonClick += ChangeButtonClick; FightControl = fightControl; ChangeButtonClick(); }