Files
OnlyNPC/Assets/FPS/Scripts/Gameplay/JetpackPickup.cs

18 lines
435 B
C#
Raw Normal View History

2026-05-26 09:46:57 +07:00
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);
}
}
}
}