-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObservationPlayerCameraManager.h
More file actions
66 lines (42 loc) · 1.36 KB
/
ObservationPlayerCameraManager.h
File metadata and controls
66 lines (42 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Camera/PlayerCameraManager.h"
#include "Camera/CameraActor.h"
#include "GameFramework/PlayerController.h"
#include "ObservationPlayerCameraManager.generated.h"
/**
*
*/
UCLASS()
class OBSERVATION2_API AObservationPlayerCameraManager : public APlayerCameraManager
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AObservationPlayerCameraManager(const FObjectInitializer& ObjectInitializer);
UFUNCTION(BlueprintCallable, Category = "Camera")
void SwitchToNextCamera();
UFUNCTION(BlueprintCallable, Category = "Camera")
void SwitchToPreviousCamera();
void SwitchToCamera(int32 CameraIndex);
// Called when the game starts or when spawned
virtual void BeginPlay() override;
float CurrentCamera();
UPROPERTY()
APlayerController* PlayerController;
UPROPERTY(BlueprintReadOnly)
bool IsCameraSwitched;
//
FVector2D GetMousePosition2D() const;
private:
// 카메라 저장 배열
UPROPERTY(EditAnywhere)
TArray<AActor*> Cameras;
int32 CurrentCameraIndex;
UPROPERTY(EditDefaultsOnly, Category = "Components")
class USoundBase* CameraSwitchSound;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};