|
@@ -9,6 +9,7 @@
|
|
|
|
|
|
class USpringArmComponent;
|
|
|
class UCameraComponent;
|
|
|
+class UEzAbilityComponent;
|
|
|
class UInputMappingContext;
|
|
|
class UInputAction;
|
|
|
struct FInputActionValue;
|
|
@@ -27,6 +28,9 @@ class AAbilityCharacter : public ACharacter
|
|
|
/** Follow camera */
|
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
|
|
|
UCameraComponent* FollowCamera;
|
|
|
+
|
|
|
+ UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Ability, meta = (AllowPrivateAccess = "true"))
|
|
|
+ TObjectPtr<UEzAbilityComponent> AbilityComponent;
|
|
|
|
|
|
/** MappingContext */
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
|
|
@@ -44,12 +48,18 @@ class AAbilityCharacter : public ACharacter
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
|
|
|
UInputAction* LookAction;
|
|
|
|
|
|
+ /** Attack Input Action */
|
|
|
+ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
|
|
|
+ UInputAction* AttackAction;
|
|
|
public:
|
|
|
AAbilityCharacter();
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
+ void OnAttackPress();
|
|
|
+ void OnAttackRelease();
|
|
|
+
|
|
|
/** Called for movement input */
|
|
|
void Move(const FInputActionValue& Value);
|
|
|
|
|
@@ -62,12 +72,13 @@ protected:
|
|
|
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
|
|
|
|
|
// To add mapping context
|
|
|
- virtual void BeginPlay();
|
|
|
+ virtual void BeginPlay() override;
|
|
|
|
|
|
public:
|
|
|
/** Returns CameraBoom subobject **/
|
|
|
FORCEINLINE class USpringArmComponent* GetCameraBoom() const { return CameraBoom; }
|
|
|
/** Returns FollowCamera subobject **/
|
|
|
FORCEINLINE class UCameraComponent* GetFollowCamera() const { return FollowCamera; }
|
|
|
+ FORCEINLINE class UEzAbilityComponent* GetAbilityComponent() const { return AbilityComponent; }
|
|
|
};
|
|
|
|