public UnitAttribute(string Key, string Name, int Value, UnitAttributeType Type = UnitAttributeType.Other) { this.Key = Key; this.Name = Name; AttributeType = UnitAttributeType.Other; this.Current = Value; this.Max = Value; this.Default = Value; }
//修改属性值 public void ModifyAttribute(UnitAttributeType type, float modifyValue) { if (type == UnitAttributeType.Hp) { attribute_HP.ModifyValue(modifyValue); } else if (type == UnitAttributeType.Stamina) { attribute_Stamina.ModifyValue(modifyValue); } }