コード例 #1
0
    private bool Register(my_basic.mb_func_t func)
    {
        if (interp.Register(func))
        {
            editor.AddFunction(func.Method.Name.ToLower());

            return true;
        }

        return false;
    }
コード例 #2
0
        public bool Register(string name, my_basic.mb_func_t func)
        {
            if (!func.Method.IsStatic)
            {
                Debug.LogError("Static function expected.");

                return(false);
            }

            return(my_basic.mb_register_func(bas, name.ToUpper(), func) == my_basic.MB_FUNC_OK);
        }