Files
Deroc_Virtual_3D/Assets/FPS/Scripts/Gameplay/JetpackPickup.cs
T
Alex38Lyon 878ea46cac update
2025-06-03 12:00:47 +02:00

18 lines
435 B
C#

namespace Unity.FPS.Gameplay
{
public class JetpackPickup : Pickup
{
protected override void OnPicked(PlayerCharacterController byPlayer)
{
var jetpack = byPlayer.GetComponent<Jetpack>();
if (!jetpack)
return;
if (jetpack.TryUnlock())
{
PlayPickupFeedback();
Destroy(gameObject);
}
}
}
}