martin #21
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/GameBP/Gameplay/BP_TargetSelector.uasset
Normal file
BIN
Content/GameBP/Gameplay/BP_TargetSelector.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -18,7 +18,8 @@ public class LuckyWorldV2 : ModuleRules
|
|||||||
"LuckyTextWrite",
|
"LuckyTextWrite",
|
||||||
"SocketIOClient",
|
"SocketIOClient",
|
||||||
"VaRest",
|
"VaRest",
|
||||||
"SIOJson"
|
"SIOJson",
|
||||||
|
"NavigationSystem"
|
||||||
});
|
});
|
||||||
|
|
||||||
PrivateDependencyModuleNames.AddRange(new string[] { });
|
PrivateDependencyModuleNames.AddRange(new string[] { });
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Gameplay/TargetSelector.h"
|
#include "Gameplay/TargetSelector.h"
|
||||||
|
#include "Kismet/GameplayStatics.h"
|
||||||
|
#include "NavigationSystem.h"
|
||||||
|
|
||||||
// Sets default values
|
// Sets default values
|
||||||
ATargetSelector::ATargetSelector()
|
ATargetSelector::ATargetSelector()
|
||||||
@ -23,5 +25,25 @@ void ATargetSelector::Tick(float DeltaTime)
|
|||||||
{
|
{
|
||||||
Super::Tick(DeltaTime);
|
Super::Tick(DeltaTime);
|
||||||
|
|
||||||
|
if (bIsTracing)
|
||||||
|
{
|
||||||
|
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(this, 0);
|
||||||
|
if (PlayerController)
|
||||||
|
{
|
||||||
|
FHitResult HitResult;
|
||||||
|
PlayerController->GetHitResultUnderCursorByChannel(ETraceTypeQuery::TraceTypeQuery1, true, HitResult);
|
||||||
|
if (HitResult.bBlockingHit)
|
||||||
|
{
|
||||||
|
UNavigationSystemV1* NavSys = FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld());
|
||||||
|
|
||||||
|
if (NavSys)
|
||||||
|
{
|
||||||
|
FNavLocation NavLocation;
|
||||||
|
NavSys->ProjectPointToNavigation(HitResult.Location, NavLocation);
|
||||||
|
SetActorLocation(NavLocation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ void UCaptureSettingsUserWidget::NativeConstruct()
|
|||||||
{
|
{
|
||||||
Super::NativeConstruct();
|
Super::NativeConstruct();
|
||||||
|
|
||||||
|
SetVisibility(ESlateVisibility::Hidden);
|
||||||
|
|
||||||
BPRefreshTaskList();
|
BPRefreshTaskList();
|
||||||
ULuckyRobotsGameInstance* GameInstance = Cast<ULuckyRobotsGameInstance>(GetGameInstance());
|
ULuckyRobotsGameInstance* GameInstance = Cast<ULuckyRobotsGameInstance>(GetGameInstance());
|
||||||
if (GameInstance)
|
if (GameInstance)
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
#include "SharedDef.h"
|
#include "SharedDef.h"
|
||||||
#include "GameUserWidget.generated.h"
|
#include "GameUserWidget.generated.h"
|
||||||
|
|
||||||
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnReset);
|
||||||
|
|
||||||
|
class UCaptureSettingsUserWidget;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -36,6 +39,11 @@ public:
|
|||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
FString DownCountStr;
|
FString DownCountStr;
|
||||||
|
|
||||||
|
public:
|
||||||
|
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category = "Event")
|
||||||
|
FOnReset OnReset;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
void DoWaitSecond();
|
void DoWaitSecond();
|
||||||
@ -50,4 +58,7 @@ public:
|
|||||||
|
|
||||||
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
||||||
void DoAutoConfirm();
|
void DoAutoConfirm();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, BlueprintImplementableEvent)
|
||||||
|
UCaptureSettingsUserWidget* GetCaptureSettingsUserWidget();
|
||||||
};
|
};
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#include "CaptureSettingsUserWidget.generated.h"
|
#include "CaptureSettingsUserWidget.generated.h"
|
||||||
|
|
||||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnOpenMenuStateChanged, bool, Open);
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnOpenMenuStateChanged, bool, Open);
|
||||||
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnStartCapture);
|
||||||
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnStopCapture);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -26,6 +28,12 @@ public:
|
|||||||
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category = "Event")
|
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category = "Event")
|
||||||
FOnOpenMenuStateChanged OnOpenMenuStateChanged;
|
FOnOpenMenuStateChanged OnOpenMenuStateChanged;
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category = "Event")
|
||||||
|
FOnStartCapture OnStartCapture;
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category = "Event")
|
||||||
|
FOnStopCapture OnStopCapture;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
void ToggleMenu();
|
void ToggleMenu();
|
||||||
@ -37,9 +45,15 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
||||||
void BPOnRandomMeshesUpdated();
|
void BPOnRandomMeshesUpdated();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
||||||
|
void BPSaveSettings();
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
||||||
void BPLoadSettings();
|
void BPLoadSettings();
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
||||||
void ToggleMenuDisplay();
|
void ToggleMenuDisplay();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
||||||
|
void BPChangeCaptureState();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user