mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 17:15:55 +00:00
Autopickup for player
This commit is contained in:
parent
acc61f9a0e
commit
8d52b49e57
6 changed files with 242 additions and 62 deletions
|
|
@ -107,10 +107,16 @@ public partial class ItemPickup3D : Interactable3D
|
|||
QueueFree();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Auto-pickup items are handled exclusively by <c>AutoPickupModule3D</c>.
|
||||
/// Returning <c>false</c> here prevents them from entering the normal
|
||||
/// interaction selector, so they cannot be manually activated by the player.
|
||||
/// </summary>
|
||||
public override bool CanActivate() => !_autoPickup;
|
||||
|
||||
public void Collect()
|
||||
{
|
||||
AddItemsToInventory();
|
||||
|
||||
}
|
||||
|
||||
public void SetSprite(Texture2D sprite)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue