Exemple #1
0
        public void AddExpString(ICompilableExp op, string strExp)
        {
            int idx = _reqs.Count;
            // Note: Use "{{" to denote a single "{"
            string sourceCode = string.Format(
                "public static class Func" + idx + "{{ public static void func(ISkAttribs caster, ISkAttribs target, ISkAttribsModPara para){{ {0};}}}}",
                strExp);

            _reqs.Add(op);
            _srcCode += sourceCode;
        }
Exemple #2
0
        public void AddExpString(ICompilableExp op, string strExp)
        {
            string sourceCode = "new System.Action<ISkAttribs, ISkAttribs, ISkAttribsModPara>((caster, target, para) => { " + strExp + "; }),";

            try{
                _reqers.Add(op);
                _progs.Add(sourceCode);
            }
            catch (Exception e)
            {
                Debug.LogError("Failed to add exp string:" + sourceCode + e);
            }
        }