// Start is called before the first frame update void Start() { instantiateNewFormation(null); gridState = GridState.GetComponent <BuildGridState>(); playerScript = Player.GetComponent <BuilderController>(); }
// Start is called before the first frame update void Start() { staticBlockContainer = FindObjectOfType <StaticBlockContainer>(); spawnManager = FindObjectOfType <SpawnManager>(); buildGridState = FindObjectOfType <BuildGridState>(); isActive = true; movePoint.parent = null; InvokeRepeating("moveDown", 0, 1f); gridblocks = new GameObject[buildGridState.gridWidth, buildGridState.gridWidth]; blockSizeX = DefaultBlockPrefab.GetComponent <Renderer>().bounds.size.x; blockSizeY = DefaultBlockPrefab.GetComponent <Renderer>().bounds.size.y; instantiateChildren(); }
// Start is called before the first frame update void Start() { gridState = GridState.GetComponent <BuildGridState>(); //Debug.Log($"{blockRenderer.name}"); gridblocks.Fill(new Vector2(gridState.gridWidth, gridState.gridHeight)); blockSizeX = blockSizePrefab.GetComponent <SpriteRenderer>().bounds.size.x; blockSizeY = blockSizePrefab.GetComponent <SpriteRenderer>().bounds.size.y; // Debug.Log($"view size: {blockSizeX}, {blockSizeY}"); InstantiateGridView(); }
// Start is called before the first frame update void Start() { buildGridState = state.GetComponent <BuildGridState>(); blockCounter = FindObjectOfType <BlockCounter>(); }
// Start is called before the first frame update void Start() { buildGridState = gridStateGameObject.GetComponent <BuildGridState>(); spawnManagerScript = spawnManager.GetComponent <SpawnManager>(); InitializeLocks(); }