public StructureDefinition GetDefinitionForType(StructureDefinition.StructureType type)
        {
            var def = StructureDefinitions.FirstOrDefault(s => s.Type == type);

            if (def == null)
            {
                Debug.LogError($"Type not found {type}");
                throw new KeyNotFoundException(type.ToString());
            }
            return(def);
        }
Пример #2
0
 public override string ToString()
 {
     return(_structureType.ToString().Substring(0, 1));
 }
Пример #3
0
 public void RecyleItem(StructureDefinition.StructureType type, GameObject gameObject)
 {
     RecyleItem(type.ToString(), gameObject);
 }