Skip to content

Instantly share code, notes, and snippets.

@strich
Last active July 18, 2016 14:30
Show Gist options
  • Save strich/8af5613e3c71332ccb5bc5a0a7e452e5 to your computer and use it in GitHub Desktop.
Save strich/8af5613e3c71332ccb5bc5a0a7e452e5 to your computer and use it in GitHub Desktop.
[Serializable]
public class PropTemplate : MonoBehaviour
{
public GameObject Create;
public bool Required = false;
public bool Unique = false;
public int SlotWidth = 3;
public int SlotHeight = 3;
public bool OnWall;
public WorkMesh Mesh;
public CureType Type;
}
[Serializable]
public class RoomTemplate : MonoBehaviour
{
public string Name;
public Color Color;
public List<PropTemplate> Props;
public PropTemplate getPropByType(CureType type)
{
for (int i = 0; i < Props.Count; i++)
{
var prop = Props[i];
if (prop && prop.Type == type)
return prop;
}
return null;
}
}
public enum CureType
{
Reception,
GP,
CureAStaff,
CureAPatient,
Research,
Pharmacy,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment