Add ringpulse effect to EMP
This commit is contained in:
parent
d07932771c
commit
656b81a62e
BIN
Content/Weapons/Garlic/BP_GarlicWeapon.uasset
(Stored with Git LFS)
BIN
Content/Weapons/Garlic/BP_GarlicWeapon.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Weapons/Garlic/M_RingPulse.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Weapons/Garlic/M_RingPulse.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -17,6 +17,11 @@ AGarlicWeapon::AGarlicWeapon()
|
||||
|
||||
Damage = 51.0f;
|
||||
Range = SphereComponent->GetScaledSphereRadius();
|
||||
|
||||
VisualEffectMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Visual Layout Mesh Component"));
|
||||
VisualEffectMeshComponent->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
|
||||
VisualEffectMeshComponent->SetWorldScale3D(FVector(3.0f, 3.0f, 3.0f)); // This is to match the size of our sphere component
|
||||
VisualEffectMeshComponent->SetCollisionProfileName("NoCollision");
|
||||
}
|
||||
|
||||
void AGarlicWeapon::BeginPlay()
|
||||
@ -105,6 +110,7 @@ bool AGarlicWeapon::UpgradeWeapon_Implementation()
|
||||
Range *= 1.4f;
|
||||
SphereComponent->SetSphereRadius(Range);
|
||||
Damage += 2.0f;
|
||||
VisualEffectMeshComponent->SetWorldScale3D(VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.4f);
|
||||
break;
|
||||
case 2:
|
||||
WeaponCooldown -= 0.1f;
|
||||
@ -114,6 +120,7 @@ bool AGarlicWeapon::UpgradeWeapon_Implementation()
|
||||
Range *= 1.2f;
|
||||
SphereComponent->SetSphereRadius(Range);
|
||||
Damage += 1.0f;
|
||||
VisualEffectMeshComponent->SetWorldScale3D(VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.2f);
|
||||
break;
|
||||
case 4:
|
||||
WeaponCooldown -= 0.1f;
|
||||
@ -123,6 +130,7 @@ bool AGarlicWeapon::UpgradeWeapon_Implementation()
|
||||
Range *= 1.2f;
|
||||
SphereComponent->SetSphereRadius(Range);
|
||||
Damage += 1.0f;
|
||||
VisualEffectMeshComponent->SetWorldScale3D(VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.2f);
|
||||
break;
|
||||
case 6:
|
||||
WeaponCooldown -= 0.1f;
|
||||
@ -132,6 +140,7 @@ bool AGarlicWeapon::UpgradeWeapon_Implementation()
|
||||
Range *= 1.2f;
|
||||
SphereComponent->SetSphereRadius(Range);
|
||||
Damage += 1.0f;
|
||||
VisualEffectMeshComponent->SetWorldScale3D(VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.2f);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
@ -33,6 +33,9 @@ public:
|
||||
|
||||
TArray<FOverlappedEnemy> GarlicOverlappedEnemies;
|
||||
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
|
||||
TObjectPtr<UStaticMeshComponent> VisualEffectMeshComponent;
|
||||
|
||||
private:
|
||||
float Range;
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user