Add Upgrades to Pentagram
This commit is contained in:
parent
488387767b
commit
a1ed800b60
BIN
Content/Weapons/Pentagram/BP_PentagramWeapon.uasset
(Stored with Git LFS)
BIN
Content/Weapons/Pentagram/BP_PentagramWeapon.uasset
(Stored with Git LFS)
Binary file not shown.
@ -62,6 +62,42 @@ void APentagramWeapon::FireWeaponAction_Implementation()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool APentagramWeapon::UpgradeWeapon_Implementation()
|
||||||
|
{
|
||||||
|
if (!Super::UpgradeWeapon_Implementation()) return false;
|
||||||
|
|
||||||
|
switch (CurrentLevel)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
WeaponCooldown -= 5.0f;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
WeaponCooldown -= 5.0f;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
WeaponCooldown -= 5.0f;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
WeaponCooldown -= 5.0f;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
WeaponCooldown -= 5.0f;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
WeaponCooldown -= 2.5f;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
WeaponCooldown -= 2.5f;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ResetWeaponTimer();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void APentagramWeapon::OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
void APentagramWeapon::OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
||||||
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep,
|
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep,
|
||||||
const FHitResult& SweepResult)
|
const FHitResult& SweepResult)
|
||||||
|
@ -35,6 +35,8 @@ protected:
|
|||||||
public:
|
public:
|
||||||
virtual void FireWeaponAction_Implementation() override;
|
virtual void FireWeaponAction_Implementation() override;
|
||||||
|
|
||||||
|
bool UpgradeWeapon_Implementation() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
void OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
void OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user