34 lines
723 B
C#
Raw Normal View History

2025-09-24 11:24:38 +05:00
using UnityEngine;
namespace TPSBR
{
public class WeaponPickup : StaticPickup
{
// PUBLIC MEMBERS
public Weapon WeaponPrefab => _weaponPrefab;
// PRIVATE MEMBERS
[SerializeField]
private Weapon _weaponPrefab;
// StaticPickup INTERFACE
protected override bool Consume(GameObject instigator, out string result)
{
if (instigator.TryGetComponent(out Weapons weapons) == false)
{
result = "Not applicable";
return false;
}
result = string.Empty;
return true;
}
protected override string InteractionName => (_weaponPrefab as IDynamicPickupProvider).Name;
protected override string InteractionDescription => (_weaponPrefab as IDynamicPickupProvider).Description;
}
}