Exemplo n.º 1
0
 public Cleric(int hitdice, int str, int dex, int con, int intel, int wis, int cha, IWeaponable weapon) : base(hitdice, str, dex, con, intel, wis, cha)
 {
     Weapon = weapon;
 }
Exemplo n.º 2
0
 // 动态地给角色更换武器
 public void ChangeWeapon(IWeaponable newWeapon)
 {
     Console.WriteLine("我将更换武器...");
     WeaponBehavior = newWeapon;
 }