Last active
July 18, 2016 14:30
-
-
Save strich/8af5613e3c71332ccb5bc5a0a7e452e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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