// Use this for initialization void Awake() { seedGenerator = mapManager.GetComponent<SeedGenerator> (); generate_map = GenerateMap.GetComponent<Generate_map> (); hexsizevariables = mapManager.GetComponent<HexsixeVariables> (); int columnAmount = seedGenerator.columnAmount; int rowAmount = seedGenerator.RowAmount; biome = seedGenerator.biome; if (biome == 4) { GetComponent<Renderer> ().material.color = Color.blue; } if (biome == 1) { GetComponent<Renderer> ().material.color = Color.green; } if (biome == 3) { GetComponent<Renderer> ().material.color = Color.white; } if (biome == 2) { GetComponent<Renderer> ().material.color = Color.red; } if (biome == 0) { GetComponent<Renderer> ().material.color = Color.yellow; } //Debug.Log (biome); }
// Use this for initialization void Start() { hexSizeVariables = mapManager.GetComponent<HexsixeVariables> (); seedgenerator = mapManager.GetComponent<SeedGenerator> (); columnAmount = seedgenerator.columnAmount; RowAmount = seedgenerator.RowAmount; Hexsize = hexSizeVariables.hexsize; // Debug.Log (Hexsize); temp = new Vector3 (startingX, 0, startingY); temp = transform.position; temp.x = startingX; temp.z = startingY; Debug.Log ("Rowamount = " + RowAmount); }