예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        instantiateNewFormation(null);

        gridState    = GridState.GetComponent <BuildGridState>();
        playerScript = Player.GetComponent <BuilderController>();
    }
예제 #2
0
    // 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();
    }
예제 #3
0
    // 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();
    }
예제 #4
0
 // Start is called before the first frame update
 void Start()
 {
     buildGridState = state.GetComponent <BuildGridState>();
     blockCounter   = FindObjectOfType <BlockCounter>();
 }
예제 #5
0
 // Start is called before the first frame update
 void Start()
 {
     buildGridState     = gridStateGameObject.GetComponent <BuildGridState>();
     spawnManagerScript = spawnManager.GetComponent <SpawnManager>();
     InitializeLocks();
 }