using UnityEngine;
using System.Collections.Generic;

[CreateAssetMenu(fileName = "Building01", menuName = "GameData/BuildingData", order = 1)]
public class BuildingData : ScriptableObject
{
    public string buildingName;

    public List<BuildingLevel> levels = new List<BuildingLevel>{
        new BuildingLevel(1,new List<BuildingStat>(), 1000)
    };

    
    public string description;
    public bool collectable;
    public CollectablesData.ResourceType resourceType;
    public float[] productinoRates;
}

public static class CollectablesData{
    public enum ResourceType{
        Metal,
        Oxygen
    }
}

[System.Serializable]
public class BuildingStat{
    public string name;
    public string value;
    

    public BuildingStat(string _name, string _value){
        name= _name;
        value = _value;
        
    }
}

[System.Serializable]
public class BuildingLevel{
    public int level = 0;
    public List<BuildingStat> stats;
    public int price = 1000;
    public int xpGain = 100;
    
    public BuildingLevel(int _level, List<BuildingStat> _stats, int _price){
        level = _level;
        stats = _stats;
        price = _price;
    }
}

