public Level3(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g,v) { CostPrice = 800; IsActivated = false; _selected = _jobs.Cooker; _owner = v; }
internal Whitewash(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 100; IsActivated = false; _selected = _jobs.Cooker; _owner = v; }
public Scarecrow(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 500; IsActivated = false; _selected = _jobs.Farmer; _owner = v; }
internal Pulley(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 200; IsActivated = false; _selected = _jobs.Construction_Worker; _owner = v; }
public Fertilizer(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 1000; IsActivated = false; _selected = _jobs.Farmer; _owner = v; }
internal Saw(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 600; IsActivated = false; _selected = _jobs.Blacksmith; _owner = v; }
public Plow(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g,v) { CostPrice = 1000; IsActivated = false; _selected = _jobs.Blacksmith; _owner = v; _jobsList = _jobs; }
public ApothecaryOffice(Village v, JobsModel job) : base(v) { Name = "Pharmacie"; _name = Name; Hp = MaxHp = 50; _job = job; this.CostPrice = 200; }
/// <summary> /// Create family with no mother and no father but with jobs /// </summary> /// <param name="mothersJob"></param> /// <param name="fathersJob"></param> /// <returns></returns> public Family CreateFamilyFromScratch(JobsModel mothersJob, JobsModel fathersJob) { Debug.Assert(Game != null, @"(village, CreateFamilyFromScratch2) Game is null"); // Create family var name = Game.NameList.NextName; Villager VillagerAM = new Villager(Game, Genders.MALE, Game.FirstNameList.NextName); Villager VillagerAF = new Villager(Game, Genders.FEMALE, Game.FirstNameList.NextName); var newFamily = new Family(Game, VillagerAF, VillagerAM, name); // Add family into families house _familiesList.Add(newFamily); // Remove villager into job worker list if (VillagerAF.Job != null) VillagerAF.Job.RemovePerson(VillagerAF); if (VillagerAM.Job != null) VillagerAM.Job.RemovePerson(VillagerAM); // Add villager into job worker list mothersJob.AddPerson(VillagerAF); fathersJob.AddPerson(VillagerAM); // Create new house Buildings.House house = new Buildings.House(this); // Add family into house and house in family house.Family = newFamily; newFamily.House = house; return newFamily; }
internal void setJob(JobsModel NewJob) { _job = NewJob; }
public bool AddToJob(JobsModel job) { if (_job != null) _job.RemovePerson2(this); return job.AddPerson2(this); }
private void ListOfJobs_SelectedValueChanged(object sender, EventArgs e) { if (ListOfJobs.SelectedValue != null) _job = (JobsModel)ListOfJobs.SelectedValue; else _job = null; }
internal void ShowWorkersInJob(JobsModel job) { if (passed == false) { passed = true; ListOfVillagersToShow = new List<VillagerBannerUC>(); } DestroyVillagerList(); for (int i = 0; i < job.Workers.Count; i++) { VillagerBannerUC tmp = new VillagerBannerUC(job.Workers[i]); // Set VillagerBannerUC tmp.Location = new System.Drawing.Point(positionX, positionY); // Add VillagerBannerUC to lists and show it this.VillagerList.Controls.Add(tmp); ListOfVillagersToShow.Add(tmp); tmp.Show(); // Set position for next VillagerBannerUC positionY += 62; } }
internal void SetJobInfo(JobsModel job, Image buildingImage) { if (job != null) { this.SuspendLayout(); // Background this.BackgroundImage = GamePages.Properties.Resources.InformationBox_job_background; // BuildingImage buildingIcon.BackgroundImage = buildingImage; buildingIcon.Visible = true; #region InfoBox Infos // Title Title.Location = new Point(positionX, positionY); Title.Text = job.Building.Name; Title.Visible = true; // Object ElementName.Visible = true; ElementName.Text = job.Name; objectName.Visible = true; // Hidden Infos goldIcon.Visible = false; Gold.Visible = false; faithIcon.Visible = false; Faith.Visible = false; happinessIcon.Visible = false; Happiness.Visible = false; // Members membersIcon.Visible = true; NbMembers.Text = job.Workers.Count.ToString(); NbMembers.Visible = true; // Building buildingHealthIcon.Visible = true; buildingLife.Visible = true; buildingLife.Text = job.Building.Hp.ToString(); this.ResumeLayout(); #endregion // Action Tab infos _page.ActionMenu.Visible = false; _page.ActionMenu.SuspendLayout(); _page.ActionMenu.ShowWorkersInJob(job); _page.ActionMenu.ResumeLayout(); _page.ActionMenu.Visible = true; // Meetings Details GodMeeting.Visible = false; GodMeeting.Enabled = false; StopMeeting.Visible = false; StopMeeting.Enabled = false; ActionsButton.Visible = false; ActionsButton.Enabled = false; } else SetError(); }