public void Start() { GameObject gametime = GameObject.Find("Tilemap"); temp = gametime.GetComponent <spawnResources>(); timeDisplay = GameObject.FindGameObjectWithTag("timeDisplay").GetComponent <Text>(); InvokeRepeating("Tick", 0f, 1f); }
private void Start() { reso = GameObject.FindWithTag("resoman"); woodDisplay = GameObject.FindGameObjectWithTag("woodDisplay").GetComponent <Text>(); woodDisplay.text = "Wood: " + reso.GetComponent <Rm>().getWoodUnits(); GameObject temp = GameObject.Find("Tilemap"); tilemap = temp.GetComponent <Tilemap>(); GameObject temptwo = GameObject.Find("Tilemap"); spawnRes = temptwo.GetComponent <spawnResources>(); }