-
Notifications
You must be signed in to change notification settings - Fork 0
/
CyberAngelRunnerCharacter.h
53 lines (39 loc) · 1.38 KB
/
CyberAngelRunnerCharacter.h
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
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "CyberAngelRunnerCharacter.generated.h"
UCLASS()
class MYVGFINALPROJECT_API ACyberAngelRunnerCharacter : public ACharacter
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere)
class UCameraComponent* SideViewCamera; // Corrected variable name
public:
// Sets default values for this character's properties
ACyberAngelRunnerCharacter();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
protected:
void MoveRight(float value);
public:
class UCameraComponent* GetSideViewCameraComponent() const
{
return SideViewCamera;
}
void RestartLevel();
UFUNCTION()
void OnOverlapBegin(UPrimitiveComponent* OverlappedComp,
AActor* OtherActor, UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
private:
float zPosition;
FVector tempPos = FVector();
bool CanMove;
};