Garloon

5.1

Sep 5th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _3._3
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Player player = new Player(100, 25, 50);
  14.             player.ShowPlayer();
  15.         }
  16.     }
  17.  
  18.     class Player
  19.     {
  20.         public int Health;
  21.         public int Armor;
  22.         public int Damage;
  23.  
  24.         public Player(int health, int armor, int damage)
  25.         {
  26.             Health = health;
  27.             Armor = armor;
  28.             Damage = damage;
  29.         }
  30.  
  31.         public void ShowPlayer()
  32.         {
  33.             Console.WriteLine("У вашего игрока: " +
  34.                 "\nЗдоровья: " + Health +
  35.                 "\nБрони: " + Armor +
  36.                 "\nУрона: " + Damage);
  37.         }
  38.  
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment