Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Learn1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Player player = new Player();
- player.ShowInfo();
- }
- }
- class Player
- {
- private int _health;
- private int _armor;
- private string _name;
- private int _damage;
- public Player()
- {
- _health = 100;
- _armor = 20;
- _damage = 15;
- _name = "Квадд";
- }
- public void ShowInfo()
- {
- Console.WriteLine($"Имя игрока: {_name}\nЖизни игрока: {_health}\nБроня игрока: {_armor}\nУрон игрока:{_damage}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement