Example #1
0
 public DataFormula(DataFormula orgData)
 {
     Atk        = orgData.Atk;
     Def        = orgData.Def;
     AtkBuff1   = orgData.AtkBuff1;
     DefDeBuff1 = orgData.DefDeBuff1;
 }
Example #2
0
	public DataFormula (DataFormula orgData)
	{
		Atk = orgData.Atk ;
		Def = orgData.Def ;
		AtkBuff1 = orgData.AtkBuff1 ;
		DefDeBuff1 = orgData.DefDeBuff1 ;
	}
Example #3
0
    // 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);
        }
    }
Example #4
0
	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 ;
	}
Example #5
0
	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 ;
	}
Example #6
0
	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 ;
	}
Example #7
0
 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);
 }
Example #8
0
 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);
 }
Example #9
0
 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);
 }
Example #10
0
 void Log(DataFormula result)
 {
     Debug.Log(string.Format("{0}\n{1}\n{2}\n{3}", result.Atk, result.Def, result.AtkBuff1, result.DefDeBuff1));
 }
Example #11
0
 public DataFormula CallFuncFormula(int key, DataFormula result, DataFormula owner, params DataFormula[] other)
 {
     return(result = baseFormulaDic[key](result, owner, other));
 }
Example #12
0
	void Log ( DataFormula result )
	{
		Debug.Log (string.Format("{0}\n{1}\n{2}\n{3}", result.Atk, result.Def, result.AtkBuff1, result.DefDeBuff1));
	}