Beispiel #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            CentralBuilding c = (CentralBuilding)Base.Buildings.Find(x => x is CentralBuilding);

            if (c.Citizens < c.CitizenCap)
            {
                Citizen cit = Base.Citizen.GetRandomCitizen();
                cit.House = c;
                c.Citizens++;
                Base.Citizen.Citizens.Add(cit);
                Base.Experience += (int)Base.ExperienceCount.CitizenArrived * Base.Level;
                UpdateCitizen();
            }
        }
Beispiel #2
0
 void UpdateInformations()
 {
     UpdateStatsAndResources();
     if (selectedBuilding != null)
     {
         label_info_title.Text = selectedBuilding.Title;
         label_info_text.Text  = selectedBuilding.Text;
         if (selectedBuilding.Id == 1)
         {
             Base.Instructor.UnlockLineAndJumpTo(3);
             label_person.Text = Base.Instructor.CurrentLine();
         }
         if (selectedBuilding is CentralBuilding)
         {
             CentralBuilding c = (CentralBuilding)selectedBuilding;
             label_info_text.Text += "\nCitizens: " + c.Citizens + " / " + c.CitizenCap;
         }
     }
     else
     {
         label_info_title.Text = "";
         label_info_text.Text  = "";
     }
 }