-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Fill out your copyright notice in the Description page of Project Settings. | ||
|
||
|
||
#include "Input/AuraInputConfig.h" | ||
|
||
const UInputAction* UAuraInputConfig::FindAbilityInputActionForTag(const FGameplayTag& InputTag,bool bLogNotFound) const | ||
{ | ||
for(const FAuraInputAction& Action :AbilityInputActions) | ||
{ | ||
if(Action.InputAction && Action.InputTag==InputTag) //nullchk, 일치하는 태그발견시 | ||
{ | ||
return Action.InputAction; //그때 인풋액션 리턴 | ||
} | ||
} | ||
if(bLogNotFound) | ||
{ | ||
UE_LOG(LogTemp,Error,TEXT("Can`t find AbilityInputAction for Input Tag [%s], on InputConfig [%s]"),*InputTag.ToString(),*GetNameSafe(this)) | ||
//그때 태그, 클래스이름 출력 | ||
} | ||
return nullptr; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Fill out your copyright notice in the Description page of Project Settings. | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "GameplayTagContainer.h" | ||
#include "Engine/DataAsset.h" | ||
#include "AuraInputConfig.generated.h" | ||
|
||
|
||
USTRUCT(BlueprintType) | ||
struct FAuraInputAction | ||
{ | ||
GENERATED_BODY() | ||
|
||
UPROPERTY(EditDefaultsOnly) | ||
const class UInputAction* InputAction = nullptr; | ||
|
||
UPROPERTY(EditDefaultsOnly) | ||
FGameplayTag InputTag = FGameplayTag(); //포인터아님 -> 헤더인클루드해야함 | ||
}; | ||
|
||
/** | ||
* | ||
*/ | ||
UCLASS() | ||
class AURA_API UAuraInputConfig : public UDataAsset | ||
{ | ||
GENERATED_BODY() | ||
public: | ||
|
||
const UInputAction* FindAbilityInputActionForTag(const FGameplayTag& InputTag, bool bLogNotFound=false) const; | ||
|
||
UPROPERTY(EditDefaultsOnly,BlueprintReadOnly) | ||
TArray<FAuraInputAction> AbilityInputActions; | ||
|
||
}; |