// Start is called before the first frame update void Start() { gt = GameObject.FindGameObjectWithTag("GridController").GetComponent <GridTester>(); tileList = gt.GetComponent <TileLists>(); profList = gt.GetComponent <ProfessionList>(); population = new List <Man>(); spawnPos = transform.position; spawnPos.y -= 1.25f; SetTile(); //tileObject.transform.localScale = ControlFactors.isometricScale; //Testing Purposes: Fills in Grid: //stage = Stage.one; //SetTile(); }
void Awake() { // Because all Awake's happen in the main Unity thread, no lock is needed. if (TileLists == null) { TileLists = new Dictionary <int, List <TeleportTile> >(); } usedKey = Key; List <TeleportTile> tileList; if (!TileLists.TryGetValue(usedKey, out tileList)) { tileList = new List <TeleportTile>(); TileLists[usedKey] = tileList; } TileLists[usedKey].Add(this); Cooldown = 0.0f; }