Ejemplo n.º 1
0
        public static string CallFunctionDelegate(IntPtr nameSpace, IntPtr name, IntPtr argv, int argc, out bool result)
        {
            string _nameSpace = Marshal.PtrToStringAnsi(nameSpace);
            string _name      = Marshal.PtrToStringAnsi(name);

            if (_name == "pushDialog")
            {
                Debugger.Break();
            }
            string[] strings = null;
            if (argv != IntPtr.Zero)
            {
                strings = StringMarshal.IntPtrToStringArray(argv, argc);
            }
            return(EngineCallbacks.CallScriptFunction(_nameSpace, _name, strings, out result));
        }
Ejemplo n.º 2
0
        public static string CallMethodDelegate(IntPtr className, IntPtr classNamespace, uint obj, IntPtr name, IntPtr argv, int argc,
                                                out bool result)
        {
            string _className      = Marshal.PtrToStringAnsi(className);
            string _classNamespace = Marshal.PtrToStringAnsi(classNamespace);
            string _name           = Marshal.PtrToStringAnsi(name);

            if (_className == "ClientServer")
            {
                Debugger.Break();
            }

            SimObject objectWrapper = Sim.FindObjectById <SimObject>(obj);

            string[] strings = { };
            if (argv != IntPtr.Zero)
            {
                strings = StringMarshal.IntPtrToStringArray(argv, argc);
            }
            string strRes = EngineCallbacks.CallScriptMethod(_className, _classNamespace, objectWrapper, _name, strings, out result);

            return(strRes);
        }