// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "BulletHitInterface.h" #include "GameFramework/Character.h" #include "Enemy.generated.h" class UParticleSystem; class USoundCue; UCLASS() class SHOOTER_API AEnemy : public ACharacter, public IBulletHitInterface { GENERATED_BODY() public: // Sets default values for this character's properties AEnemy(); protected: // Called when the game starts or when spawned virtual void BeginPlay() override; /** Particles to spawn when hit by bullets */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true)) UParticleSystem* ImpactParticles; /** Sound to play when hit by bullets */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true)) USoundCue* ImpactSound; public: // Called every frame virtual void Tick(float DeltaTime) override; // Called to bind functionality to input virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; virtual void BulletHit_Implementation(FHitResult HitResult) override; };