Ejemplo n.º 1
0
        //-------------------------------------------------------------------------
        public Item(Entity et_src, ItemData item_data)
        {
            _setup(et_src, item_data.item_id);

            ItemData = item_data;

            IUnitFactory unit_factory = UnitSys.getUnitFactory(TbDataItem.UnitType);
            if (unit_factory != null) UnitLink = unit_factory.createUnit(this, EtSrc, ItemData.map_unit_data);
        }
Ejemplo n.º 2
0
        //-------------------------------------------------------------------------
        public Item(Entity et_src, int item_id, byte overlap_num)
        {
            _setup(et_src, item_id);

            ItemData = new ItemData();
            ItemData.item_objid = Guid.NewGuid().ToString();
            ItemData.item_id = item_id;
            ItemData.n = overlap_num;
            ItemData.map_unit_data = null;

            IUnitFactory unit_factory = UnitSys.getUnitFactory(TbDataItem.UnitType);
            if (unit_factory != null) UnitLink = unit_factory.createUnit(this, EtSrc, ItemData.map_unit_data);
        }