using UnityEngine; using System.Collections.Generic; [CreateAssetMenu(fileName = "Building01", menuName = "GameData/BuildingData", order = 1)] public class BuildingData : ScriptableObject { public string buildingName; public List levels = new List{ new BuildingLevel(1,new List(), 1000) }; public string description; public bool collectable; public CollectablesData.ResourceType resourceType; public float[] productinoRates; } public static class CollectablesData{ public enum ResourceType{ Metal, Oxygen, Gold } } [System.Serializable] public class BuildingStat{ public string name; public string value; public Sprite image; public BuildingStat(string _name, string _value, Sprite _image){ name= _name; value = _value; image= _image; } } [System.Serializable] public class BuildingLevel{ public int level = 0; public List stats; public int price = 1000; public int metal_price =0; public int xpGain = 100; public BuildingLevel(int _level, List _stats, int _price, int _metal_price=0){ level = _level; stats = _stats; price = _price; metal_price = _metal_price; } }