1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace Emmet 8 { 9 class Wizard 10 { 11 public Wizard() 12 { 13 this.HP = 1000; 14 } 15 16 public Wizard(int level, int combatValues, int hp) 17 { 18 this.HP = hp; 19 this.Level = level; 20 this.CombatValues = combatValues; 21 } 22 23 public int Level { get; set; } 24 25 public int CombatValues { get; set; } 26 27 public int HP { get; set; } 28 } 29 }
巫师类的重载构造函数
时间: 2024-10-24 19:43:59