예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Humans human1 = new Humans("Allyse");

            Console.WriteLine(human1.Name);
            Humans human2 = new Humans("Ruben");

            Console.WriteLine(human2.Health);
            Humans human3 = new Humans("Mags");
            Humans human4 = new Humans("Brian");

            human1.Attack(human2);
            Console.WriteLine(human2.Health);
        }
예제 #2
0
파일: Program.cs 프로젝트: jonjschroeder/C-
 public void Attack(Humans enemy)
 {
     enemy.health -= 5 * strength;
 }