First commit for private source control. Older commits available on Github.

This commit is contained in:
2026-03-26 12:52:52 +00:00
parent a04c602626
commit 2d449c4a17
2176 changed files with 408185 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace BriarQueen.Framework.Managers.Player.Data.Inventory
{
public class Backpack
{
private readonly List<ItemDataSo> _items = new();
public IReadOnlyList<ItemDataSo> Items => _items;
public void AddItem(ItemDataSo item)
{
if (_items.Any(x => x.UniqueID == item.UniqueID))
return;
Debug.Log($"Adding item {item.UniqueID}");
_items.Add(item);
}
public void RemoveItem(ItemDataSo item)
{
if (_items.All(x => x.UniqueID != item.UniqueID)) return;
_items.Remove(item);
}
public void RemoveItem(string uniqueID)
{
var item = _items.FirstOrDefault(x => x.UniqueID == uniqueID);
if (item) _items.Remove(item);
}
public void ClearItems()
{
_items.Clear();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 855a4eee12334e29938a4b6c564aa157
timeCreated: 1769701500