Space Plunder
Loading...
Searching...
No Matches
AutoTurret.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/Pawn.h"
8#include "AutoTurret.generated.h"
9
10class UCapsuleComponent;
12
13
14UCLASS()
15class AITOOLKIT_API AAutoTurret : public ADefenseSystemPawn
16{
17 GENERATED_BODY()
18
19public:
21
22protected:
23
24 virtual void BeginPlay() override;
25 virtual void GetActorEyesViewPoint(FVector& OutLocation, FRotator& OutRotation) const override;
26 virtual bool GetIsUpsideDown() const override;
27
28 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "Auto Turret")
29 FName RootBoneName = FName("SK_Prop_Turret_Small_Pivot_Ceiling_01");
30 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "Auto Turret")
31 FName GunBoneName = FName("SK_Prop_Turret_Small_Gun_Ceiling_01");
32
33 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Visual")
34 USkeletalMeshComponent* MeshComponent;
35 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Visual")
36 UCapsuleComponent* CapsuleComponent;
37 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Visual")
38 UChildActorComponent* CurrentWeapon;
39
40 virtual void EnemySeen() override;
41 virtual void LostAllTargets() override;
42
43 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "Auto Turret")
44 float WeaponFireFrequency = 0.1;
45
46 virtual void WeaponFire();
47 UFUNCTION(BlueprintImplementableEvent, Category="Defence")
48 void OnWeaponFire();
49
50 virtual void RotateToTarget() override;
51
52 // virtual USkeletalMeshComponent* GetCharacterMesh() const override{return MeshComponent;};
53
54 virtual void OnDeath(AActor* OwningActor, EDeathType DeathType, AActor* DeathCauser, AController* DeathInstigator) override;
55
56private:
57
58 FTimerHandle WeaponFireTimerHandle;
59
60
61};
EDeathType
Definition BaseData.h:53
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition AutoTurret.h:16
Represents a defense system pawn that can interact with other actors and participate in the generic t...
Definition DefenseSystemPawn.h:28
Definition CharacterInterface.h:20