internal GameEventArgument(NativeEventArgs arg)
 {
     this.Name        = arg.Name;
     this.Type        = arg.Type;
     this.ValueInt    = arg.IntVal;
     this.ValueString = arg.StrVal;
     this.ValueBool   = arg.BoolVal;
     this.ValueLong   = arg.LongVal;
     this.ValueFloat  = arg.FloatVal;
 }
        void IPluginManager.RaiseGameEvent(Int64 evtDataPtr, int evtArgsCount, Int64 evtArgsPtr)
        {
            //NativeEventData evtData = new NativeEventData();
            //Marshal.PtrToStructure(new IntPtr(evtDataPtr), evtData);
            NativeEventData evtData = (NativeEventData)Marshal.PtrToStructure(new IntPtr(evtDataPtr), typeof(NativeEventData));

            NativeEventArgs[] args = new NativeEventArgs[evtArgsCount];
            int size = Marshal.SizeOf(typeof(NativeEventArgs));

            for (int i = 0; i < evtArgsCount; i++)
            {
                IntPtr argPtr = new IntPtr(evtArgsPtr + i * size);
                args[i] = (NativeEventArgs)Marshal.PtrToStructure(argPtr, typeof(NativeEventArgs));
            }
            GameEventEventArgs e = new GameEventEventArgs(evtData.Event, args.Select(a => new GameEventArgument(a)).ToArray());

            this.Raise(this.m_engine.RaiseGameEvent, e);
        }