Example #1
0
    private void Respawn()
    {
        GameObject gameBlockPrefab = Resources.Load("GameBlock") as GameObject;
        GameObject gameBlock       = Instantiate(gameBlockPrefab);

        gameBlock.transform.SetParent(transform, false);
        int randomColumn = Random.Range(0, GameBox.NumColumnGrid);

        Debug.Log("Respawn Colunm" + randomColumn);
        gameBlock.transform.position = gameBox.GetGridPosition(randomColumn, 8);
    }