예제 #1
0
 void Start()
 {
     resouces = new GameResourcesStorage();
     people   = new People();
     if (isFirstInColony)
     {
         people.AddPeople(50);
         objects.Add(new InBaseMoxie(this));
         objects.Add(new InBaseVaporator(this));
     }
 }
예제 #2
0
파일: Program.cs 프로젝트: GMihalkow/CSharp
        static void Main(string[] args)
        {
            int    peopleCount = int.Parse(Console.ReadLine());
            People AllPeople   = new People();

            for (int index = 0; index < peopleCount; index++)
            {
                string   input      = Console.ReadLine();
                string[] NeededInfo =
                    input
                    .Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries)
                    .ToArray();
                string personName = NeededInfo[0];
                int    personAge  = int.Parse(NeededInfo[1]);

                Person person = new Person(personName, personAge);
                AllPeople.AddPeople(person);
            }

            AllPeople.OldestPeople();
        }