public DataFormula(DataFormula orgData) { Atk = orgData.Atk; Def = orgData.Def; AtkBuff1 = orgData.AtkBuff1; DefDeBuff1 = orgData.DefDeBuff1; }
public DataFormula (DataFormula orgData) { Atk = orgData.Atk ; Def = orgData.Def ; AtkBuff1 = orgData.AtkBuff1 ; DefDeBuff1 = orgData.DefDeBuff1 ; }
// Update is called once per frame void Update() { if (action) { action = false; DataFormula resultData = null; resultData = FormulaMgr.Instance.CallFuncFormula((int)formulaType, resultData, ownerData, otherData); Log(resultData); } }
public static DataFormula Formula_1 ( DataFormula result, DataFormula owner, params DataFormula[] other ) { result = new DataFormula(owner) ; result.Atk = owner.Atk-other[0].Def ; return result ; }
public static DataFormula Formula_3 ( DataFormula result, DataFormula owner, params DataFormula[] other ) { result = new DataFormula(owner) ; result.Def = owner.Def/(other[0].DefDeBuff1+1) ; return result ; }
public static DataFormula Formula_2 ( DataFormula result, DataFormula owner, params DataFormula[] other ) { result = new DataFormula(owner) ; result.Atk = owner.Atk*(other[0].AtkBuff1+1) ; return result ; }
public static DataFormula Formula_1(DataFormula result, DataFormula owner, params DataFormula[] other) { result = new DataFormula(owner); result.Atk = owner.Atk - other[0].Def; return(result); }
public static DataFormula Formula_3(DataFormula result, DataFormula owner, params DataFormula[] other) { result = new DataFormula(owner); result.Def = owner.Def / (other[0].DefDeBuff1 + 1); return(result); }
public static DataFormula Formula_2(DataFormula result, DataFormula owner, params DataFormula[] other) { result = new DataFormula(owner); result.Atk = owner.Atk * (other[0].AtkBuff1 + 1); return(result); }
void Log(DataFormula result) { Debug.Log(string.Format("{0}\n{1}\n{2}\n{3}", result.Atk, result.Def, result.AtkBuff1, result.DefDeBuff1)); }
public DataFormula CallFuncFormula(int key, DataFormula result, DataFormula owner, params DataFormula[] other) { return(result = baseFormulaDic[key](result, owner, other)); }
void Log ( DataFormula result ) { Debug.Log (string.Format("{0}\n{1}\n{2}\n{3}", result.Atk, result.Def, result.AtkBuff1, result.DefDeBuff1)); }