private void Awake() { //gets a reference to the game manager to supply the list of generatable objects GenerationManager = GameObject.FindGameObjectWithTag("GenerationManager").GetComponent <LevelGeneratorManager>(); //Gets all of the lists of prefabs that the manager has baseTileSelection = GenerationManager.ReturnBaseTileList(); endTileSelection = GenerationManager.ReturnEndTileList(); capTileSelection = GenerationManager.ReturnCapTileList(); Rotation = this.transform.rotation; TilePlacementGoAhead = false; }
// Start is called before the first frame update void Awake() { //gets a reference to the game manager to supply the list of generatable objects GenerationManager = GameObject.FindGameObjectWithTag("GenerationManager").GetComponent <LevelGeneratorManager>(); //Gets all of the lists of prefabs that the manager has baseTileSelection = GenerationManager.ReturnBaseTileList(); endTileSelection = GenerationManager.ReturnEndTileList(); capTileSelection = GenerationManager.ReturnCapTileList(); //Gets the Tile Checker script off the parent of this object MyTilePlacementChecker = this.gameObject.GetComponentInParent <TilePlacementChecker>(); //Gets current position and rotation of the generator object Position = new Vector3(transform.position.x, transform.position.y, transform.position.z); Rotation = this.transform.rotation; }