//For convenience, allow a constructor that just accepts a number, rather than a function public Damage(Chr _chrSource, Chr _chrTarget, int _nBaseDamage, bool _bPiercing = false) { //Copy the fields as they've been passed in GetBase = (Chr __chrSource, Chr __chrTarget) => _nBaseDamage; bPiercing = _bPiercing; //Store the chrSource and apply its power buff SetChrSource(_chrSource); SetChrTarget(_chrTarget); }
public Damage(Damage dmgToCopy) { //Copy over all the attributes of the original Damage instance chrSource = dmgToCopy.chrSource; chrTarget = dmgToCopy.chrTarget; GetBase = dmgToCopy.GetBase; bPiercing = dmgToCopy.bPiercing; //Copy the Power fetch method too GetPower = dmgToCopy.GetPower; }
public void SetBase(FuncBaseDamage _GetBase) { GetBase = _GetBase; }