Made BlueprintReadWrite for weapon actors

This commit is contained in:
MH261677 2024-01-12 18:51:05 +00:00
parent 21cfa4f2c9
commit ab948c5d2f

View File

@ -103,7 +103,9 @@ public:
float WalkSpeed; float WalkSpeed;
float OriginalWalkSpeed; float OriginalWalkSpeed;
UPROPERTY(BlueprintReadWrite)
AActor* PrimaryWeaponActor; AActor* PrimaryWeaponActor;
UPROPERTY(BlueprintReadWrite)
AActor* SecondaryWeaponActor; AActor* SecondaryWeaponActor;
bool bIsPrimaryWeaponCreated = false; bool bIsPrimaryWeaponCreated = false;
bool bIsSecondaryWeaponCreated = false; bool bIsSecondaryWeaponCreated = false;
@ -148,13 +150,15 @@ public:
UFUNCTION(BlueprintCallable, Category = Weapon) UFUNCTION(BlueprintCallable, Category = Weapon)
bool GetHasRifle(); bool GetHasRifle();
UPROPERTY(EditAnywhere, Category = "Weapons") UPROPERTY(EditAnywhere, Category = "Weapons", BlueprintReadWrite)
TSubclassOf<ABaseWeaponClass> PrimaryWeaponClass; TSubclassOf<ABaseWeaponClass> PrimaryWeaponClass;
UPROPERTY(EditAnywhere, Category = "Weapons") UPROPERTY(EditAnywhere, Category = "Weapons", BlueprintReadWrite)
TSubclassOf<ABaseWeaponClass> SecondaryWeaponClass; TSubclassOf<ABaseWeaponClass> SecondaryWeaponClass;
UPROPERTY(BlueprintReadWrite)
ABaseWeaponClass* PrimaryWeapon; ABaseWeaponClass* PrimaryWeapon;
UPROPERTY(BlueprintReadWrite)
ABaseWeaponClass* SecondaryWeapon; ABaseWeaponClass* SecondaryWeapon;
UFUNCTION(BlueprintCallable, Category = "Weapons") UFUNCTION(BlueprintCallable, Category = "Weapons")