using System.Collections; using System.Collections.Generic; using UnityEngine; using MuHua; /// /// 物品 - 管理器 /// public class ManagerItem : ModuleSingle { /// 装备列表 public List equipments; protected override void Awake() => NoReplace(false); } /// /// 物品奖励 /// public class ItemReward { /// 物品列表 public List items; public void Settings(List list) where T : InventoryItemConst { items = new List(); list.ForEach(obj => items.Add(obj.To())); } public (InventoryItem, int) Get(int max = 1) { int count = Random.Range(1, max + 1); int index = Random.Range(0, items.Count); return (items[index], count); } }