-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTank.h
36 lines (36 loc) · 1.06 KB
/
Tank.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
#pragma once
#include "CoreMinimal.h"
#include "BasePawn.h"
#include "Tank.generated.h"
/**
*
*/
UCLASS()
class TOONTANKS_API ATank : public ABasePawn
{
GENERATED_BODY()
public:
ATank();
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
// Called every frame
virtual void Tick(float DeltaTime) override;
void HandleDestruction();
APlayerController* GetTankPlayerController() const{ return TankPlayerController; }
bool bAlive = true;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
private:
UPROPERTY(VisibleAnywhere, Category = "Components")
class USpringArmComponent* SpringArm;
UPROPERTY(VisibleAnywhere, Category = "Components")
class UCameraComponent* Camera;
UPROPERTY(EditAnywhere, Category = "Movement")
float Speed = 200.f;
UPROPERTY(EditAnywhere, Category = "Movement")
float TurnRate = 45.f;
void Move(float Value);
void Turn(float Value);
APlayerController* TankPlayerController;
};