public void ExecuteNewTurn() // this is the master turn execution function { UpdateTrades(); UpdateAllCivs(); UpdateEmperor(); gDataRef.UpdateGameDate(); // advance the year gDataRef.RequestGraphicRefresh = true; }
private GalaxyData galDataRef; // galaxy data // Use this for initialization void Start() { galDataRef = GameObject.Find("GameManager").GetComponent <GalaxyData>(); gDataRef = GameObject.Find("GameManager").GetComponent <GlobalGameData>(); // run 4 times before first turn to maximize for (int x = 0; x < 4; x++) { foreach (Civilization civ in gDataRef.CivList) { UpdatePlanets(civ); CheckForMigration(civ); // check for intraplanet migration MigratePopsBetweenPlanets(civ); // and if there are any pops who want to leave, check for where } } UpdateTrades(); UpdateEmperor(); gDataRef.UpdateGameDate(); gDataRef.RequestGraphicRefresh = true; }
// Use this for initialization void Start() { galDataRef = GameObject.Find("GameManager").GetComponent<GalaxyData>(); gDataRef = GameObject.Find("GameManager").GetComponent<GlobalGameData>(); // run 4 times before first turn to maximize for (int x = 0; x < 4; x++) { foreach (Civilization civ in gDataRef.CivList) { UpdatePlanets(civ); CheckForMigration(civ); // check for intraplanet migration MigratePopsBetweenPlanets(civ); // and if there are any pops who want to leave, check for where } } UpdateTrades(); UpdateEmperor(); gDataRef.UpdateGameDate(); gDataRef.RequestGraphicRefresh = true; }