BuildingTemplate.cs 1.2 KB

123456789101112131415161718192021222324252627282930
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using KairoEngine.Stockpiles;
  5. using Sirenix.OdinInspector;
  6. namespace KairoEngine.VoxelBuildingSystem
  7. {
  8. [CreateAssetMenu(fileName = "BuildingTemplate", menuName = "KairoEngine/VoxelBuildingSystem/BuildingTemplate"), HideMonoScript]
  9. public class BuildingTemplate : ScriptableObject
  10. {
  11. [BoxGroup("Properties", showLabel: false)] public string title;
  12. [BoxGroup("Properties")] public Vector3Int size;
  13. [BoxGroup("Properties")] public Transform prefab;
  14. [BoxGroup("Properties")] public Transform visual;
  15. [BoxGroup("Properties")] public Sprite image;
  16. [BoxGroup("Properties")] public Sprite icon;
  17. [BoxGroup("Properties"), TextArea(2, 8), HideLabel, PropertySpace(4, 4)] public string description;
  18. public List<Stockpile> cost = new List<Stockpile>();
  19. public List<VoxelConnectorData> connectors = new List<VoxelConnectorData>();
  20. [BoxGroup("Rules")] public ConditionType rulesetCondition;
  21. [BoxGroup("Rules")] public List<VoxelBuildingRuleset> rulesets = new List<VoxelBuildingRuleset>();
  22. }
  23. }