--------------------------------------角色类--------------------------------------

 1 using System;
 2 using System.Collections.Generic;
 3 using System.Linq;
 4 using System.Text;
 5 using System.Threading.Tasks;
 6 
 7 namespace J5.entity
 8 {
 9     class Role
10     {
11         public Role(int live)
12         {
13             this.Live = live;
14             Console.WriteLine("创建成功,血量:" + live);
15         }
16         public Role(int level, int power, int live)
17         {
18             this.Live = live;
19             this.Level = level;
20             this.Power = power;
21             Console.WriteLine("创建成功,等级:{0},战斗力{1}:,血量:{2}",level,power, live);
22         }
23         public string Name { get; set; }
24         public int Level { get; set; }
25         public int Power { get; set; }
26         public int Live { get; set; }
27     }
28 }
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案