C++23课时

mac2024-10-31  12

bool ULocalMPGameViewportClient::InputKey(const FInputKeyEventArgs& EventArgs){        if (IgnoreInput())    {        //UE_LOG(LogTemp, Warning, TEXT("Tick On Editor 111 "));        return Super::InputKey(EventArgs);    }    else    {        UEngine* const Engine = GetOuterUEngine();        int32 const NumPlayers = Engine ? Engine->GetNumGamePlayers(this) : 0;         bool bRetVal = true;        for (int32 i = 0; i < NumPlayers; i++)        {            //bRetVal= Super::InputKey(Viewport, i, Key, Event, AmountDepressed, bGamepad)&&bRetVal;            //bRetVal = Super::InputKey(EventArgs.Viewport, i, EventArgs.Key, EventArgs.Event, EventArgs.AmountDepressed, EventArgs.IsGamepad()) && bRetVal;            FInputKeyEventArgs tmpEventArgs = EventArgs;            tmpEventArgs.ControllerId = i;            bRetVal = Super::InputKey(tmpEventArgs) && bRetVal;            UE_LOG(LogTemp, Warning, TEXT("EventArgs.ControllerId is %d"), tmpEventArgs.ControllerId);        }        return bRetVal;    }}
最新回复(0)