示例#1
0
        public void CreateAndUseItem(ItemInfoRecord itemRecord, int num = 1)
        {
            ItemInfo itemInfo = new ItemInfo();

            itemInfo.Init(itemRecord.Id, 1);
            itemInfo.Use(num);
        }
示例#2
0
        public void Init(ItemInfoRecord record, int num)
        {
            _ItemRecord = record;
            Num         = num;

            _ItemType = (ItemType_Base)System.Activator.CreateInstance(System.Type.GetType("GameLogic." + record.Type.TableName));
            _ItemType.Init(record.Type.TableName, record.Type.ID);
        }