Added Reload Text To Weapons When Reloading

This commit is contained in:
MARCEL HARA 2023-10-16 16:14:23 +01:00
parent a3021a2722
commit b239012411
4 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7cfd791337f79a964dbfef919494665648f1ce39168d4f28cd122e2018c4b694
size 61741
oid sha256:1b199cbe84b6c49806f9646990c9c60ff7199214add19091ea0d7a47896daf53
size 64350

View File

@ -216,7 +216,7 @@ void ABaseWeaponClass::WeaponScopedFire()
void ABaseWeaponClass::ReloadTimer()
{
GetWorldTimerManager().SetTimer(reloadTimerHandle, this, &ABaseWeaponClass::WeaponReload, TimeToReload, false);
GLog->Log("ReloadTimer Activated");
ShowReloadingWidget();
}
void ABaseWeaponClass::WeaponReload()
@ -226,6 +226,7 @@ void ABaseWeaponClass::WeaponReload()
UE_LOG(LogTemp, Display, TEXT("Weapon Reloading: mag size: %d"), MagazineSize);
currentAmmoCount = MagazineSize;
endlessVendettaChar->bIsReloading = false;
HideReloadingWidget();
}
}

View File

@ -41,6 +41,12 @@ protected:
float recoilResultPitch = 0;
float recoilResultYaw = 0;
UFUNCTION(BlueprintImplementableEvent)
void ShowReloadingWidget();
UFUNCTION(BlueprintImplementableEvent)
void HideReloadingWidget();
public: