Advertisement
Guest User

5.1

a guest
Aug 24th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 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 ConsoleApp1
  8. {
  9.     class Program
  10.     {
  11.         static void Main()
  12.         {
  13.             Player player1 = new Player("Isosiska", 10, 8000, 1000, 200);
  14.             player1.ShowInfo();
  15.         }
  16.     }
  17.     class Player
  18.     {
  19.         public string Nick;
  20.         public int Level;
  21.         public int Exp;
  22.         public int Hp;
  23.         public int Mana;
  24.         public Player(string nick, int level, int exp, int hp, int mana)
  25.         {
  26.             Nick = nick;
  27.             Level = level;
  28.             Exp = exp;
  29.             Hp = hp;
  30.             Mana = mana;
  31.         }
  32.         public void ShowInfo()
  33.         {
  34.             Console.WriteLine("Ник игрока: " + Nick + "\nУровень: " + Level + "\nОпыт: " + Exp +"\nМаксимальное здоровье: " + Hp + "\nМаксимальная мана: " + Mana);
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement