Beispiel #1
0
        private void Callback(ManagedLatentCallbackType callbackType, IntPtr thisPtr, IntPtr data)
        {
            try
            {
                switch (callbackType)
                {
                case ManagedLatentCallbackType.FUSharpLatentAction_UpdateOperation:
                    UpdateOperation(new FLatentResponse(data));
                    break;

                case ManagedLatentCallbackType.FUSharpLatentAction_NotifyObjectDestroyed:
                    NotifyObjectDestroyed();
                    break;

                case ManagedLatentCallbackType.FUSharpLatentAction_NotifyActionAborted:
                    NotifyActionAborted();
                    break;

                case ManagedLatentCallbackType.FUSharpLatentAction_GetDescription:
                    GetDescriptionInternal(data);
                    break;

                case ManagedLatentCallbackType.FUSharpLatentAction_Destructor:
                    Destructor();
                    break;

                default:
                    throw new NotImplementedException();
                }
            }
            catch (Exception e)
            {
                FMessage.LogException(e);
            }
        }
Beispiel #2
0
        private static unsafe void Callback(ManagedLatentCallbackType callbackType, IntPtr thisPtr, IntPtr data)
        {
            try
            {
                UUSharpGameplayTask obj = GCHelper.Find <UUSharpGameplayTask>(thisPtr);
                switch (callbackType)
                {
                case ManagedLatentCallbackType.UUSharpGameplayTask_Activate:
                    obj.OnActivate();
                    break;

                case ManagedLatentCallbackType.UUSharpGameplayTask_InitSimulatedTask:
                    obj.OnInitSimulatedTask(GCHelper.Find <UGameplayTasksComponent>(data));
                    break;

                case ManagedLatentCallbackType.UUSharpGameplayTask_TickTask:
                    obj.OnTickTask(*(float *)data);
                    break;

                case ManagedLatentCallbackType.UUSharpGameplayTask_ExternalConfirm:
                    obj.OnExternalConfirm(*(csbool *)data);
                    break;

                case ManagedLatentCallbackType.UUSharpGameplayTask_ExternalCancel:
                    obj.OnExternalCancel();
                    break;

                case ManagedLatentCallbackType.UUSharpGameplayTask_GetDebugString:
                    FStringMarshaler.ToNative(data, obj.OnGetDebugString());
                    break;

                case ManagedLatentCallbackType.UUSharpGameplayTask_OnDestroy:
                    obj.OnDestroy(*(csbool *)data);
                    break;

                case ManagedLatentCallbackType.UUSharpGameplayTask_Pause:
                    obj.OnPause();
                    break;

                case ManagedLatentCallbackType.UUSharpGameplayTask_Resume:
                    obj.OnResume();
                    break;

                case ManagedLatentCallbackType.UUSharpGameplayTask_GenerateDebugDescription:
                    FStringMarshaler.ToNative(data, obj.OnGenerateDebugDescription());
                    break;

                default:
                    throw new NotImplementedException();
                }
            }
            catch (Exception e)
            {
                FMessage.LogException(e);
            }
        }
        private static void Callback(ManagedLatentCallbackType callbackType, IntPtr thisPtr, IntPtr data)
        {
            try
            {
                UUSharpAsyncActionBase obj = GCHelper.Find <UUSharpAsyncActionBase>(thisPtr);
                switch (callbackType)
                {
                case ManagedLatentCallbackType.UUSharpAsyncActionBase_Activate:
                    obj.OnActivate();
                    break;

                case ManagedLatentCallbackType.UUSharpAsyncActionBase_RegisterWithGameInstanceWorldContext:
                    obj.OnRegisterWithGameInstance(GCHelper.Find(data));
                    break;

                case ManagedLatentCallbackType.UUSharpAsyncActionBase_RegisterWithGameInstance:
                    obj.OnRegisterWithGameInstance(GCHelper.Find <UGameInstance>(data));
                    break;

                case ManagedLatentCallbackType.UUSharpAsyncActionBase_SetReadyToDestroy:
                    obj.OnSetReadyToDestroy();
                    break;

                case ManagedLatentCallbackType.UUSharpAsyncActionBase_BeginDestroy:
                    obj.OnBeginDestroy();
                    break;

                default:
                    throw new NotImplementedException();
                }
            }
            catch (Exception e)
            {
                FMessage.LogException(e);
            }
        }
Beispiel #4
0
        private static void Callback(ManagedLatentCallbackType callbackType, IntPtr thisPtr, IntPtr data)
        {
            try
            {
                UUSharpOnlineBlueprintCallProxyBase obj = GCHelper.Find <UUSharpOnlineBlueprintCallProxyBase>(thisPtr);
                switch (callbackType)
                {
                case ManagedLatentCallbackType.UUSharpOnlineBlueprintCallProxyBase_Activate:
                    obj.OnActivate();
                    break;

                case ManagedLatentCallbackType.UUSharpOnlineBlueprintCallProxyBase_BeginDestroy:
                    obj.OnBeginDestroy();
                    break;

                default:
                    throw new NotImplementedException();
                }
            }
            catch (Exception e)
            {
                FMessage.LogException(e);
            }
        }