18 lines
435 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
} |