示例#1
0
    //데이터 동기화
    public void SyncData()
    {
        money   = new cGold();
        rock    = new cRock();
        dia     = new cDia();
        jewerly = new cJewerly[inventory.GetJewerly().Count];
        for (byte i = 0; i < jewerly.Length; i++)
        {
            jewerly[i] = new cJewerly();
        }
        soul = new cSoul[inventory.GetSoul().Count];
        for (byte i = 0; i < soul.Length; i++)
        {
            soul[i] = new cSoul();
        }

        money.value = inventory.GetMoney().value;
        rock.value  = inventory.GetRock().value;
        dia.value   = inventory.GetDia().value;
        for (byte i = 0; i < jewerly.Length; i++)
        {
            jewerly[i].value = inventory.GetJewerly()[i].value;
        }
        for (byte i = 0; i < soul.Length; i++)
        {
            soul[i].value = inventory.GetSoul()[i].value;
        }

        item_equip = new cItem_equip[inventory.GetItemEquip().Count];
        for (byte i = 0; i < inventory.GetItemEquip().Count; i++)
        {
            item_equip[i] = new cItem_equip(inventory.GetItemEquip()[i]);
        }

        item_use = new cItem_use[inventory.GetItemUse().Count];
        for (byte i = 0; i < inventory.GetItemUse().Count; i++)
        {
            item_use[i] = new cItem_use(inventory.GetItemUse()[i]);
        }

        item_etc = new cItem_etc[inventory.GetItemEtc().Count];
        for (byte i = 0; i < inventory.GetItemEtc().Count; i++)
        {
            item_etc[i] = new cItem_etc(inventory.GetItemEtc()[i]);
        }
    }
示例#2
0
 public cItem_use(cItem_use pIu)
     : base(pIu._name, pIu.desc, pIu.price, pIu.kind)
 {
     this.amount = pIu.amount;
 }