Esempio n. 1
0
 unsafe public void Init(NBagInfo info)
 {
     this.Info     = info;
     this.Unlocked = info.Unlocked;
     Items         = new BagItem[this.Unlocked];
     if (info.Items != null && info.Items.Length >= this.Unlocked)
     {
         Analyze(info.Items);
     }
     else
     {
         Info.Items = new byte[sizeof(BagItem) * this.Unlocked];
         Reset();
     }
 }
Esempio n. 2
0
 unsafe public void Init(NBagInfo info)
 {
     this.info = info;
     Debug.LogFormat("     ------------info.items:{0}                    type[{1}]", info.Items, info.Items.GetType());
     this.Unlocked      = info.Unlocked;
     ;            Items = new BagItem[this.Unlocked];
     if (info.Items != null && info.Items.Length >= this.Unlocked)
     {
         Analyze(info.Items);
     }
     else
     {
         info.Items = new byte[sizeof(BagItem) * this.Unlocked];
         Reset();
     }
 }
 public unsafe void Init(NBagInfo info)
 {
     this.Info     = info;
     this.Unlocked = info.Unlocked;
     Items         = new BagItem[Unlocked];
     if (info.Items != null && info.Items.Length >= Unlocked)
     {
         Anlyze(info.Items);
         Reset();
     }
     else
     {
         info.Items = new byte[sizeof(BagItem) * this.Unlocked];
         Reset();
     }
     Debug.Log("BagManagerInit");
 }
Esempio n. 4
0
    unsafe public void Init(NBagInfo bag)
    {
        mSize     = bag.Size;
        this.info = bag;

        Items = new BagItem[mSize];

        if (bag.Items != null && bag.Items.Length > mSize)
        {
            UnpackBagItem();
        }
        else
        {
            info.Items = new byte[sizeof(BagItem) * mSize];
            SortBagItem();
        }
    }