Select Git revision
test_interface.ipynb
PointOfInterestManager.h 1.78 KiB
#pragma once
#include "CoreMinimal.h"
#include "Components/SplineComponent.h"
#include "PointOfInterestManager.generated.h"
DECLARE_LOG_CATEGORY_EXTERN(POIManagerLog, All, All);
class APointOfInterest;
class FCameraRide;
UCLASS(Blueprintable)
class APointOfInterestManager : public AActor
{
GENERATED_BODY()
public:
APointOfInterestManager();
virtual void TickActor(float DeltaTime, enum ELevelTick TickType, FActorTickFunction& ThisTickFunction) override;
UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
void AddPointOfInterest();
UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
void VisitNextPointOfInterest();
UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
void VisitPreviousPointOfInterest();
UFUNCTION(BlueprintCallable, Category="Point Of Interest Manager")
void VisitPointOfInterestByIndex(int index);
UFUNCTION(BlueprintCallable, Category="Point Of Interest Manager")
void VisitPointOfInterest(APointOfInterest* POI) const;
UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
void StartCameraRide();
UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
void StopCameraRide();
UFUNCTION(BlueprintCallable, Category="Point Of Interest Manager")
int GetPointOfInterestCount();
protected:
UPROPERTY(EditAnywhere)
TArray<APointOfInterest*> POIs;
int CurrentPOIIndex = 0;
private:
UFUNCTION(CallInEditor, BlueprintCallable, Category="Point Of Interest Manager")
void UpdateSpline();
void ProgressCameraRide();
void CameraRideEnded();
USplineComponent* SplineComponent;
UPROPERTY(EditAnywhere, meta=(UIMin = 0.0, UIMax = 500))
float CameraSpeed = 100;
bool IsRidingCamera;
float CameraRideStart, CameraRideEnd;
};