首次提交
This commit is contained in:
22
Assets/Scripts/Common/Data/AwardData.cs
Normal file
22
Assets/Scripts/Common/Data/AwardData.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace NBF
|
||||
{
|
||||
public class AwardData
|
||||
{
|
||||
public int Id;
|
||||
public int Amount;
|
||||
|
||||
public AwardData(string str)
|
||||
{
|
||||
string[] parts = str.Split('|');
|
||||
Id = int.Parse(parts[0]);
|
||||
if (parts.Length > 1)
|
||||
{
|
||||
Amount = int.Parse(parts[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Amount = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Common/Data/AwardData.cs.meta
Normal file
3
Assets/Scripts/Common/Data/AwardData.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a62ec00b6df5428ca380168860d73a58
|
||||
timeCreated: 1763900506
|
||||
18
Assets/Scripts/Common/Data/ItemInfo.cs
Normal file
18
Assets/Scripts/Common/Data/ItemInfo.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using NBF;
|
||||
using NBF.Utils;
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
public partial class ItemInfo
|
||||
{
|
||||
private cfg.Item _config;
|
||||
|
||||
public cfg.Item Config
|
||||
{
|
||||
get { return _config ??= Game.Tables.TbItem.Get((int)ConfigId); }
|
||||
}
|
||||
|
||||
public ItemType ItemType => ConfigId.GetItemType();
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Common/Data/ItemInfo.cs.meta
Normal file
3
Assets/Scripts/Common/Data/ItemInfo.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdc07f3a841e4cba821c2ae2b82b2697
|
||||
timeCreated: 1761057852
|
||||
17
Assets/Scripts/Common/Data/ShopItemInfo.cs
Normal file
17
Assets/Scripts/Common/Data/ShopItemInfo.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using NBF;
|
||||
using NBF.Utils;
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
public partial class ShopItemInfo
|
||||
{
|
||||
private cfg.Item _config;
|
||||
|
||||
public cfg.Item Config
|
||||
{
|
||||
get { return _config ??= Game.Tables.TbItem.Get((int)ConfigId); }
|
||||
}
|
||||
|
||||
public ItemType ItemType => ConfigId.GetItemType();
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Common/Data/ShopItemInfo.cs.meta
Normal file
3
Assets/Scripts/Common/Data/ShopItemInfo.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 016ac941a6d84e699041f87740b9f550
|
||||
timeCreated: 1771306262
|
||||
21
Assets/Scripts/Common/Data/TabListData.cs
Normal file
21
Assets/Scripts/Common/Data/TabListData.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class TabItemData
|
||||
{
|
||||
public int Id;
|
||||
public string Key;
|
||||
public string Icon;
|
||||
public bool IsAll;
|
||||
public string Name;
|
||||
|
||||
// 条目可以是任意对象类型
|
||||
public List<object> Items = new List<object>();
|
||||
|
||||
// 子菜单
|
||||
public List<TabItemData> Children = new List<TabItemData>();
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Common/Data/TabListData.cs.meta
Normal file
3
Assets/Scripts/Common/Data/TabListData.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47a09808fe3440d59857224bdc01a91f
|
||||
timeCreated: 1747970638
|
||||
Reference in New Issue
Block a user