blob: 8fa07f89782c91c9ced5a20fa9f64a8909258067 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
using System;
namespace XMainClient
{
internal class XLotteryBoxItem : XItem
{
public static readonly int POOL_SIZE = 8;
public XItem[] itemList = new XItem[XLotteryBoxItem.POOL_SIZE];
public override void Init()
{
base.Init();
for (int i = 0; i < XLotteryBoxItem.POOL_SIZE; i++)
{
XItem xitem = this.itemList[i];
bool flag = xitem == null;
if (flag)
{
xitem = new XNormalItem();
this.itemList[i] = xitem;
}
xitem.itemID = 0;
xitem.itemCount = 0;
}
}
public override void Recycle()
{
base.Recycle();
XDataPool<XLotteryBoxItem>.Recycle(this);
}
}
}
|