public override void AddHumans() { if (charCount < 3) { foreach (var Worker in Main.Char) { if (Worker.IsWork == false) { foreach (var zone in Main.Zone) { if (zone.gameObject.GetComponent <Closed>().closed == false) { Worker.Work(target, Working.TypeWork.Inelligence); Humans.Add(Worker); charCount++; if (charCount == 1) { StartCoroutine(PlusCount()); } break; } } break; } } } }
private void GetHumans() { Humans.Add(new Character() { personName = "Homem de Ferro", name = "Howard Stark", universe = "Terra 999", image = "howard_stark_background" }); Humans.Add(new Character() { personName = "Homem-Aranha", name = "Mary Jane", universe = "Terra 999", image = "mary_jane_background" }); Humans.Add(new Character() { personName = "Homem de ferro", name = "Happy Hogan", universe = "Terra 999", image = "happy_hogan_background" }); }
public void SetHumansOrZombies <T>(List <T> objects) { var isHumans = false; if (typeof(T) == typeof(Human)) { isHumans = true; Humans = new List <Human>(); } else if (typeof(T) == typeof(Zombie)) { Zombies = new List <Zombie>(); } foreach (T obj in objects) { if (isHumans) { Humans.Add(new Human((obj as Human))); } else { Zombies.Add(new Zombie((obj as Zombie))); } } }
public override void AddHumans() { if (charCount < 3) { foreach (var Worker in Main.Char) { if (Worker.IsWork == false) { foreach (var metal in Main.Metall) { if (metal.GetComponent <Closed>().closed == false) { Worker.Work(target, Working.TypeWork.Claymoremith); Humans.Add(Worker); charCount++; if (charCount == 1) { StartCoroutine(PlusCount()); } break; } } break; } } } }
public void MakeChildren() { List <Child> temp = new List <Child>(); Child tempChild; foreach (Adult adult in Humans.Where(x => x.IsAdult)) { if (adult.HasPartner) { tempChild = Couple.MakeChild(adult, 5); if (tempChild != null) { temp.Add(tempChild); } } } if (temp.Count > 0) { for (int i = 0; i < temp.Count; i++) { Announcements.Add($"{temp[i].Name} has been born!"); Births++; Humans.Add(temp[i]); } } }
public override void AddHumans() { if (charCount < 3) { foreach (var Worker in Main.Char) { if (Worker.IsWork == false) { foreach (var wood in Main.Tree) { if (wood.GetComponent <Closed>().closed == false) { Worker.Work(target, Working.TypeWork.Wood); Humans.Add(Worker); charCount++; if (charCount == 1) { StartCoroutine(PlusCount()); } break; } } break; } } } }
public Humans CreateHumans() { var humans = new Humans(); for (int i = 0; i < _size; i++) { humans.Add(new Human()); } return(humans); }
/// <summary> /// Sets the amount of cleaners and how many HTE it takes to clean a room /// </summary> /// <param name="amount">amount of cleaners</param> /// <param name="cleaningTime">amount of HTE it takes to clean a room</param> public void SetCleaners(int amount, int cleaningTime) { CleanDuration = cleaningTime; for (int i = 1; i <= amount; i++) { HFactory = new HumanFactory(); Human cleaner = HFactory.CreateHuman("cleaner"); cleaner.Name = "Cleaner" + i; Humans.Add(cleaner); } }
public void GenerateHumans() { while (CurrentHumans <= MaxHumans) { Position x = GetFreeRandomField(); Graphics.UpdateGenerationStatistic(CurrentHumans, MaxHumans); Humans.Add(new Human(x.Column, x.Row)); //Graphics.Draw(x.Row, x.Column, Graphics.Status.Dead); CurrentHumans++; } int index = Generator.Next(0, Humans.Count); Humans[index].Infect(); DrawHumans(); }
public void SetHumansOrZombies <T>(List <T> objects) { if (typeof(T) == typeof(Human)) { Humans = new List <Human>(); } if (typeof(T) == typeof(Zombie)) { Zombies = new List <Zombie>(); } foreach (T obj in objects) { if (obj is Human) { Humans.Add(new Human((obj as Human))); } if (obj is Zombie) { Zombies.Add(new Zombie((obj as Zombie))); } } }
public void AddHuman(Human human) { Humans.Add(human); }