diff --git a/Content/Characters/Creature1/BP_Creature1.uasset b/Content/Characters/Creature1/BP_Creature1.uasset index 867bd3c..0cf3af8 100644 Binary files a/Content/Characters/Creature1/BP_Creature1.uasset and b/Content/Characters/Creature1/BP_Creature1.uasset differ diff --git a/Content/Characters/Creature2/BP_Creature2.uasset b/Content/Characters/Creature2/BP_Creature2.uasset index e9ea70f..d04bb41 100644 Binary files a/Content/Characters/Creature2/BP_Creature2.uasset and b/Content/Characters/Creature2/BP_Creature2.uasset differ diff --git a/Content/Characters/Hero1/Abilities/Shoot/AM_Hero1_Shoot.uasset b/Content/Characters/Hero1/Abilities/Shoot/AM_Hero1_Shoot.uasset index c600066..9e6fd4f 100644 Binary files a/Content/Characters/Hero1/Abilities/Shoot/AM_Hero1_Shoot.uasset and b/Content/Characters/Hero1/Abilities/Shoot/AM_Hero1_Shoot.uasset differ diff --git a/Content/Characters/Hero1/Abilities/Shoot/BP_Hero1_Shoot_Projectile.uasset b/Content/Characters/Hero1/Abilities/Shoot/BP_Hero1_Shoot_Projectile.uasset index f6d8044..25cb99c 100644 Binary files a/Content/Characters/Hero1/Abilities/Shoot/BP_Hero1_Shoot_Projectile.uasset and b/Content/Characters/Hero1/Abilities/Shoot/BP_Hero1_Shoot_Projectile.uasset differ diff --git a/Content/Characters/Hero1/Abilities/Shoot/ENUM_RangeAbilityAimingMode.uasset b/Content/Characters/Hero1/Abilities/Shoot/ENUM_RangeAbilityAimingMode.uasset new file mode 100644 index 0000000..85d15fe Binary files /dev/null and b/Content/Characters/Hero1/Abilities/Shoot/ENUM_RangeAbilityAimingMode.uasset differ diff --git a/Content/Characters/Hero1/Abilities/Shoot/GA_Hero1_Shoot.uasset b/Content/Characters/Hero1/Abilities/Shoot/GA_Hero1_Shoot.uasset index e902344..0e2ba7a 100644 Binary files a/Content/Characters/Hero1/Abilities/Shoot/GA_Hero1_Shoot.uasset and b/Content/Characters/Hero1/Abilities/Shoot/GA_Hero1_Shoot.uasset differ diff --git a/Content/Characters/Hero1/Abilities/Shoot/T_Hero1_Shoot.uasset b/Content/Characters/Hero1/Abilities/Shoot/T_Hero1_Shoot.uasset index e6f024a..b36eb7c 100644 Binary files a/Content/Characters/Hero1/Abilities/Shoot/T_Hero1_Shoot.uasset and b/Content/Characters/Hero1/Abilities/Shoot/T_Hero1_Shoot.uasset differ diff --git a/Content/Characters/Hero1/BP_Hero1.uasset b/Content/Characters/Hero1/BP_Hero1.uasset index 17eb638..dd17129 100644 Binary files a/Content/Characters/Hero1/BP_Hero1.uasset and b/Content/Characters/Hero1/BP_Hero1.uasset differ diff --git a/Content/Characters/_Shared_/Abilities/Jump/GA_Character_Jump.uasset b/Content/Characters/_Shared_/Abilities/Jump/GA_Character_Jump.uasset index b197530..a86f676 100644 Binary files a/Content/Characters/_Shared_/Abilities/Jump/GA_Character_Jump.uasset and b/Content/Characters/_Shared_/Abilities/Jump/GA_Character_Jump.uasset differ diff --git a/Content/Characters/_Shared_/BP_Character.uasset b/Content/Characters/_Shared_/BP_Character.uasset index 349e65d..6c96f99 100644 Binary files a/Content/Characters/_Shared_/BP_Character.uasset and b/Content/Characters/_Shared_/BP_Character.uasset differ diff --git a/Content/Characters/_Shared_/BP_Creature.uasset b/Content/Characters/_Shared_/BP_Creature.uasset index 6d90474..14f5387 100644 Binary files a/Content/Characters/_Shared_/BP_Creature.uasset and b/Content/Characters/_Shared_/BP_Creature.uasset differ diff --git a/Content/Characters/_Shared_/Effects/GE_Aiming.uasset b/Content/Characters/_Shared_/Effects/GE_Aiming.uasset new file mode 100644 index 0000000..1805970 Binary files /dev/null and b/Content/Characters/_Shared_/Effects/GE_Aiming.uasset differ diff --git a/Content/Core/Hud/WBP_Crosshair.uasset b/Content/Core/Hud/WBP_Crosshair.uasset new file mode 100644 index 0000000..e39223d Binary files /dev/null and b/Content/Core/Hud/WBP_Crosshair.uasset differ diff --git a/Content/Core/Hud/WBP_Hud.uasset b/Content/Core/Hud/WBP_Hud.uasset index 2875f02..c558ea2 100644 Binary files a/Content/Core/Hud/WBP_Hud.uasset and b/Content/Core/Hud/WBP_Hud.uasset differ diff --git a/Content/Core/Input/IMC_Default.uasset b/Content/Core/Input/IMC_Default.uasset index 2381323..809ad9f 100644 Binary files a/Content/Core/Input/IMC_Default.uasset and b/Content/Core/Input/IMC_Default.uasset differ diff --git a/Content/Core/Textures/T_Crosshair.uasset b/Content/Core/Textures/T_Crosshair.uasset new file mode 100644 index 0000000..1719f24 Binary files /dev/null and b/Content/Core/Textures/T_Crosshair.uasset differ diff --git a/Content/__ExternalActors__/Maps/L_Default/2/KZ/3Y4PAKEW3L97J087BUDMVI.uasset b/Content/__ExternalActors__/Maps/L_Default/2/KZ/3Y4PAKEW3L97J087BUDMVI.uasset index 6846dbd..f5aa833 100644 Binary files a/Content/__ExternalActors__/Maps/L_Default/2/KZ/3Y4PAKEW3L97J087BUDMVI.uasset and b/Content/__ExternalActors__/Maps/L_Default/2/KZ/3Y4PAKEW3L97J087BUDMVI.uasset differ diff --git a/Content/__ExternalActors__/Maps/L_Default/5/88/NDHUEK1ROBM2RCW7ZU51MM.uasset b/Content/__ExternalActors__/Maps/L_Default/5/88/NDHUEK1ROBM2RCW7ZU51MM.uasset index a777a24..d4149b4 100644 Binary files a/Content/__ExternalActors__/Maps/L_Default/5/88/NDHUEK1ROBM2RCW7ZU51MM.uasset and b/Content/__ExternalActors__/Maps/L_Default/5/88/NDHUEK1ROBM2RCW7ZU51MM.uasset differ diff --git a/Content/__ExternalActors__/Maps/L_Default/6/U3/6O7DJ03I0JB041XHH0L21L.uasset b/Content/__ExternalActors__/Maps/L_Default/6/U3/6O7DJ03I0JB041XHH0L21L.uasset index 7b09c01..39feb88 100644 Binary files a/Content/__ExternalActors__/Maps/L_Default/6/U3/6O7DJ03I0JB041XHH0L21L.uasset and b/Content/__ExternalActors__/Maps/L_Default/6/U3/6O7DJ03I0JB041XHH0L21L.uasset differ diff --git a/RawAssets/T_Crosshair.PNG b/RawAssets/T_Crosshair.PNG new file mode 100644 index 0000000..10e19a6 Binary files /dev/null and b/RawAssets/T_Crosshair.PNG differ diff --git a/RawAssets/T_Crosshair.afphoto b/RawAssets/T_Crosshair.afphoto new file mode 100644 index 0000000..aa30668 Binary files /dev/null and b/RawAssets/T_Crosshair.afphoto differ diff --git a/RawAssets/T_Hero1_Shoot.PNG b/RawAssets/T_Hero1_Shoot.PNG new file mode 100644 index 0000000..c59b671 Binary files /dev/null and b/RawAssets/T_Hero1_Shoot.PNG differ diff --git a/RawAssets/T_Hero1_Shoot.afphoto b/RawAssets/T_Hero1_Shoot.afphoto new file mode 100644 index 0000000..5ae3b25 Binary files /dev/null and b/RawAssets/T_Hero1_Shoot.afphoto differ diff --git a/Source/CogSample/CogSampleAbilitySystemComponent.h b/Source/CogSample/CogSampleAbilitySystemComponent.h index f996dff..2934653 100644 --- a/Source/CogSample/CogSampleAbilitySystemComponent.h +++ b/Source/CogSample/CogSampleAbilitySystemComponent.h @@ -19,6 +19,4 @@ public: UFUNCTION(BlueprintCallable, Category = "GameplayCue", Meta = (AutoCreateRefTerm = "GameplayCueParameters", GameplayTagFilter = "GameplayCue")) void RemoveGameplayCueLocal(const FGameplayTag GameplayCueTag, const FGameplayCueParameters& GameplayCueParameters) const; - - }; diff --git a/Source/CogSample/CogSampleCharacter.cpp b/Source/CogSample/CogSampleCharacter.cpp index c0485cd..1f1fe62 100644 --- a/Source/CogSample/CogSampleCharacter.cpp +++ b/Source/CogSample/CogSampleCharacter.cpp @@ -294,6 +294,8 @@ void ACogSampleCharacter::InitializeAbilitySystem() //-------------------------------------------------------------------------------------------------------------------------- void ACogSampleCharacter::RegisterToAbilitySystemEvents() { + GameplayTagPropertyMap.Initialize(this, AbilitySystem); + //---------------------------------------- // Register to Tag change events //---------------------------------------- @@ -858,4 +860,17 @@ bool ACogSampleCharacter::GetMontage(FName MontageName, UAnimMontage*& Montage, Montage = Row->Montage; return Montage != nullptr; -} \ No newline at end of file +} + +//-------------------------------------------------------------------------------------------------------------------------- +void ACogSampleCharacter::SetIsAiming(bool Value) +{ + if (bIsAiming == Value) + { + return; + } + + bIsAiming = Value; + OnAimingChanged.Broadcast(this, bIsAiming); +} + diff --git a/Source/CogSample/CogSampleCharacter.h b/Source/CogSample/CogSampleCharacter.h index fe4e54e..a9f6300 100644 --- a/Source/CogSample/CogSampleCharacter.h +++ b/Source/CogSample/CogSampleCharacter.h @@ -1,5 +1,7 @@ #pragma once +#include "CoreMinimal.h" + #include "AbilitySystemInterface.h" #include "ActiveGameplayEffectHandle.h" #include "AttributeSet.h" @@ -10,11 +12,12 @@ #include "CogSampleProgressionLevelInterface.h" #include "CogSampleTargetableInterface.h" #include "CogSampleTeamInterface.h" -#include "CoreMinimal.h" #include "GameFramework/Character.h" #include "GameplayAbilitySpecHandle.h" +#include "GameplayEffectTypes.h" #include "GameplayTagContainer.h" #include "InputActionValue.h" + #include "CogSampleCharacter.generated.h" class UCameraComponent; @@ -74,6 +77,7 @@ public: //-------------------------------------------------------------------------------------------------------------------------- DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FCogSampleCharacterEventDelegate, ACogSampleCharacter*, Character); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FCogSampleAimingChangedEventDelegate, ACogSampleCharacter*, Character, bool, IsAiming); //-------------------------------------------------------------------------------------------------------------------------- UCLASS(config=Game) @@ -144,6 +148,19 @@ public: virtual bool IsDead() const override; + //---------------------------------------------------------------------------------------------------------------------- + // Aiming + //---------------------------------------------------------------------------------------------------------------------- + + UFUNCTION(BlueprintCallable) + virtual void SetIsAiming(bool Value); + + UFUNCTION(BlueprintPure) + virtual bool GetIsAiming() const { return bIsAiming; } + + UPROPERTY(BlueprintAssignable) + FCogSampleAimingChangedEventDelegate OnAimingChanged; + //---------------------------------------------------------------------------------------------------------------------- // Team //---------------------------------------------------------------------------------------------------------------------- @@ -166,6 +183,7 @@ public: //---------------------------------------------------------------------------------------------------------------------- // Camera //---------------------------------------------------------------------------------------------------------------------- + USpringArmComponent* GetCameraBoom() const { return CameraBoom; } UCameraComponent* GetFollowCamera() const { return FollowCamera; } @@ -179,6 +197,7 @@ public: //---------------------------------------------------------------------------------------------------------------------- // Input //---------------------------------------------------------------------------------------------------------------------- + FVector TransformInputInWorldSpace(const FVector& Input) const; FVector GetMoveInput() const { return MoveInput; } @@ -280,6 +299,9 @@ protected: UPROPERTY() AController* InitialController = nullptr; + UPROPERTY(EditDefaultsOnly, Category = "GameplayTags") + FGameplayTagBlueprintPropertyMap GameplayTagPropertyMap; + //---------------------------------------------------------------------------------------------------------------------- // Inputs //---------------------------------------------------------------------------------------------------------------------- @@ -358,5 +380,12 @@ protected: void Client_ApplyRootMotion(const FCogSampleRootMotionParams& Params); uint16 ApplyRootMotionShared(const FCogSampleRootMotionParams& Params); + + //---------------------------------------------------------------------------------------------------------------------- + // Aiming + //---------------------------------------------------------------------------------------------------------------------- + + bool bIsAiming = false; + };