public void Awake() { grid = FindObjectOfType <GridR>();//TODO replace mapData = new GridDataChunk[mapSize, mapSize]; for (int i = 0; i < mapSize; i++) { for (int j = 0; j < mapSize; j++) { mapData[i, j] = new GridDataChunk(FlowGrid.gridResolution, i, j); } } navGraph = generateGraph(); pathfinding = new AStarPathfinding(); }
// Start is called before the first frame update void Start() { buildPlacer = FindObjectOfType <BuildingPlacer>(); grid = buildPlacer.GetComponent <GridR>(); request = gameObject.GetComponent <Requester>(); mesh = gameObject.GetComponent <MeshRenderer>(); notConstructed = buildPlacer.notConstructed; finishedConstructing = buildPlacer.finishedConstructing; children = new List <Transform>(); foreach (Transform child in gameObject.transform) { children.Add(child); } changeMesh(notConstructed); RoundManager.OnRoundTick += onTick; //Get a list of the actual physical buildings gameobjects }
// Start is called before the first frame update void Start() { buildPlacer = FindObjectOfType <BuildingPlacer>(); grid = buildPlacer.getGrid(); }
// Start is called before the first frame update void Start() { buildPlacer = FindObjectOfType <BuildingPlacer>(); grid = buildPlacer.GetComponent <GridR>(); }