private void Update() { if (Input.GetKeyDown(KeyCode.I)) { InventoryDataMgr.AddEquip(200001); InventoryDataMgr.AddItem(100001, 1); } }
public static void AddItem(int id, int num) { InventoryItemData item = new InventoryItemData(); item.ID = id; item.Num = num; data.AddItem(item); InventoryDataMgr.Save(); }
public static void AddEquip(int id) { InventoryEquipData equipData = new InventoryEquipData(); equipData.ID = id; equipData.Num = 1; data.AddItem(equipData); InventoryDataMgr.Save(); }
public override void OnSingletonInit() { PlayerDataMgr playerData = new PlayerDataMgr(); InventoryDataMgr inventoryData = new InventoryDataMgr(); }
public void Init() { PlayerDataMgr.Save(); InventoryDataMgr.Save(); }