首次提交
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user