// Simply gets the needed references. private void ManagerSetProperties() { mg = GetComponent <MapGenerator>(); drawer = GetComponent <MapDrawer>(); playerSpawner = GetComponent <SpawnPlayer>(); dfs = GetComponent <SpaceDFS>(); spawner = GetComponent <SpawnObjects>(); scaler = statScaler.GetComponent <Scaler>(); }
public void PlayerSpawn(GameObject player) { dfs = GetComponent <SpaceDFS>(); Tile spawnTile = dfs.GetSpawnTile(); // print ("x, y"); // print ( spawnTile.GetX() ); // print (spawnTile.GetY()); Vector3 position = new Vector3(spawnTile.GetX() * 0.32f, spawnTile.GetY() * 0.32f, 0); player.transform.position = position; spawnTile.SetIsBusy(); }