Пример #1
0
    public virtual ItemStat GetStatNextLevel(int level)
    {
        if (statConfigCollection == null)
        {
            statConfigCollection = LoadResourceController.GetStatConfigCollection();
        }

        // Get base data from scriptable object
        var      baseValue = statConfigCollection.GetStatConfigData(statType).GetBaseValue(level + 1);
        ItemStat itemStat  = new ItemStat(baseValue, statType);

        return(itemStat);
    }
Пример #2
0
    public virtual ItemStat[] GetItemStats(int level)
    {
        SetStatConfigCollection(LoadResourceController.GetStatConfigCollection());

        List <ItemStat> itemStatList = new List <ItemStat>();

        for (int i = 0; i < statTypes.Length; i++)
        {
            var      baseValue = statConfigCollection.GetStatConfigData(statTypes[i]).GetBaseValue(level);
            ItemStat itemStat  = new ItemStat(baseValue, statTypes[i]);
            itemStatList.Add(itemStat);
        }

        return(itemStatList.ToArray());
    }