public Healing(Chr _chrSource, Chr _chrTarget, FuncBaseHeal _GetBase) { //Copy the fields as they've been passed in GetBase = _GetBase; //Store the chrSource and apply its power buff SetChrSource(_chrSource); SetChrTarget(_chrTarget); }
//For convenience, allow a constructor that just accepts a number, rather than a function public Healing(Chr _chrSource, Chr _chrTarget, int _nBase) { //If a simple number is provided, then don't have GetBase depend on consume ChrSource/ChrTarget GetBase = (Chr __chrSource, Chr __chrTarget) => _nBase; //Store the chrSource and apply its power buff SetChrSource(_chrSource); SetChrTarget(_chrTarget); }
public Healing(Healing healToCopy) { //Copy over all the attributes of the original Healing instance chrSource = healToCopy.chrSource; chrTarget = healToCopy.chrTarget; GetBase = healToCopy.GetBase; //Copy the Power fetch method too GetPower = healToCopy.GetPower; }