uurha

Untitled

Oct 14th, 2021
731
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using UnityEngine;
  3.  
  4. namespace DefaultNamespace
  5. {
  6.     [CreateAssetMenu(fileName = "StructureData", menuName = "Create Data/Structure", order = 0)]
  7.     public class Data : ScriptableObject
  8.     {
  9.         [SerializeField] private string structureName;
  10.         [SerializeField] private StructureData data;
  11.     }
  12.    
  13.     [Serializable]
  14.     public class StructureData {
  15.         [SerializeField] private int level;
  16.         [SerializeField] private Parameters parameters;
  17.         [SerializeField] private StructuresResources resources;
  18.  
  19.         public Parameters Parameters => parameters;
  20.         public StructuresResources Resources => resources;
  21.         public int Level => level;
  22.     }
  23.  
  24.     [Serializable]
  25.     public class Parameters{
  26.         [SerializeField] private int hp;
  27.         [SerializeField] private int damage;
  28.  
  29.         public int HP => hp;
  30.         public int Damage => damage;
  31.     }
  32.  
  33.     [Serializable]
  34.     public class StructuresResources{
  35.         [SerializeField] private int gold;
  36.         [SerializeField] private int food;
  37.         [SerializeField] private int stone;
  38.         [SerializeField] private int wood;
  39.  
  40.         public int Gold => gold;
  41.         public int Food => food;
  42.         public int Stone => stone;
  43.         public int Wood => wood;
  44.     }
  45. }
  46.  
RAW Paste Data