vampires/Source/vampires/Weapon.h

41 lines
855 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Weapon.generated.h"
UCLASS()
class VAMPIRES_API AWeapon : public AActor
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float WeaponCooldown = 1.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Properties")
float Damage;
private:
FTimerHandle WeaponTimerHandle;
public:
// Sets default values for this actor's properties
AWeapon();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
UFUNCTION(BlueprintNativeEvent)
void FireWeaponAction();
virtual void FireWeaponAction_Implementation();
UFUNCTION()
virtual void UpgradeWeapon(int newLevel);
};