55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
// Amasson
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "AbilitySystem/Abilities/AuraGameplayAbility.h"
|
|
#include "AuraSummonAbility.generated.h"
|
|
|
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSpawnedCharactersChangeSignature, UAuraSummonAbility*, SummonAbility);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class AURA_API UAuraSummonAbility : public UAuraGameplayAbility
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
UAuraSummonAbility();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Summon")
|
|
ACharacter* SummonCharacter(TSubclassOf<ACharacter> Class, const FVector& Location, float YawOffset = 0);
|
|
|
|
UFUNCTION()
|
|
void SummonDestroyed(AActor* DestroyedActor);
|
|
|
|
/* Spawn Locations */
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
TArray<FVector> GetSpawnLocations();
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "SummonLocation")
|
|
int32 SpawnCount = 3;
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "SummonLocation")
|
|
float SpawnMinDistance = 100.0f;
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "SummonLocation")
|
|
float SpawnMaxDistance = 200.0f;
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "SummonLocation")
|
|
float SpawnSpreadAngle = 80.0f;
|
|
|
|
/* Spawned Characters */
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "State")
|
|
TArray<TObjectPtr<ACharacter>> SpawnedCharacters;
|
|
|
|
UPROPERTY(BlueprintAssignable)
|
|
FSpawnedCharactersChangeSignature OnSpawnedCharactersChange;
|
|
|
|
};
|