-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tower.h
38 lines (27 loc) · 706 Bytes
/
Tower.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
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "BasePawn.h"
#include "Tower.generated.h"
/**
*
*/
UCLASS()
class TOONTANKS_API ATower : public ABasePawn
{
GENERATED_BODY()
public:
virtual void Tick(float DeltaTime) override;
void HandleDestruction();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
private:
class ATank* Tank;
UPROPERTY(EditAnywhere, Category = "Combat")
float FireRange = 300.f;
FTimerHandle FireRateTimerHandle;
float FireRate = 2.f;
void CheckFireCondition();
bool InFireRange();
};