private void Start() { _tileTypes = FindObjectOfType <TileTypesManager>(); _allowedTileName = _tileTypes.basicRoad.name; _map = FindObjectOfType <Grid>().transform.GetChild(0).GetComponent <Tilemap>(); _visitedTiles = new List <Vector3Int>(); StartCoroutine(nameof(GoToNextTile)); }
private void Start() { _previewGreen.a = 0.5f; _previewRed.a = 0.5f; _tileTypes = FindObjectOfType <TileTypesManager>(); _playerValues = FindObjectOfType <PlayerValues>(); var grid = GameObject.Find("Grid"); _baseMap = grid.transform.GetChild(0).GetComponent <Tilemap>(); _buildingPreviewMap = grid.transform.GetChild(1).GetComponent <Tilemap>(); _buildingMap = grid.transform.GetChild(2).GetComponent <Tilemap>(); _mainCamera = Camera.main; }