Nils, or someone who knows how to respond to me, there are several errors here on my console tab, I'm new to this area and are talking about errors with)]} and basic programming stuff! please help me solve this! I need a lot.
This is the video Concerning such a C # Script .
IwillalsosendallthescriptIhavedonehere.
usingUnityEngine;usingSystem;//Atributoserializable-comoaparecemasvariaveisnoinspectorenoeditorusingSystem.Collections.Generic;//usarLists.usingRandom=UnityEngine.Random;//GerarnumerosaleatoriospublicclassBoardManager:MonoBehaviour{[Serializable]publicclassCount{publicintminimum;publicintmaximum;publicCount(intmin,intmax){minimum=min;maximum=max;}}publicintcolumns=8;//QuantidadedeColunasdoTabuleiropublicintrows=8;//linhasnotabuleiropublicCountwallCount=newCount(5,9);//QuantidadealeatoriadenumerosinternospublicCountfoodCount=newCount(1,5);//Quantidadealeatoriadecomida(NaoireiUtilizar)publicGameObjectexit;publicGameObject[]floorTiles;//ChaopublicGameObject[]WallTile;//MurospublicGameObject[]foodTiles;//ComidaspublicGameObject[]enemyTile;//inimigospublicGameObject[]outerWallsTiles;//MurosExternosprivateTransformboardHolder;//VariavelparapendurartodomundodotabuleiroprivateList<Vector3>gridPosition=newList<Vector3>();//ListadePossiveisPosiçoesparaostiles//LimparlistadogrideprepararparagararumnovotabuleirovoidinitialiseList(){//LimpaasposiçoesgridPosition.Clear();//loopparanavegarascolunasfor(intx=1;x<columns-1;x++){for(inty=1;y<rows-1;y++){gridPosition.Add(newVector3(x,y,0f));}}}//configurarbackgroundemurosexternosvoidBoardSetup(){//inicializaotabuleiroeatribiuseutransformboardHolder=newGameObject("Board").transform;
for(int x = -1, x < columns + 1;x++);
for(int y = -1, y < columns + 1;y++);
//Pegar tile aleatorio para fazer parte do chao
GameObject toInstatiate = floorTiles[Random.Range(0,floorTiles.Length)];
//verificar se e muro externo
if( x == -1 || y == -1 || x == columns || y == rows );
{
toInstatiate = outerWallsTiles[Random.Range[0,outerWallsTiles.Length]];
GameObject instance = Instantiate(toInstatiate, new Vector3(x,y,0f),Quaternion.identity)as GameObject;
instance.transform.SetParent (boardHolder);
}
}
//Rertorna um valor aleatorio da nossa gridposition
Vector3 RandomPosition()
{
int randomIndex = Random.Range (0, gridPosition.Count);
Vector3 randomPosition = gridPosition [randomIndex];
gridPosition.RemoveAt (randomIndex);
return randomPosition;
}
//pega o array de objetos que passar, junto com o valor minimo e maximo que voce vai adicionar daaquele numero de objeto.
LayoutObjectAtRandom[GameObject tileArray, int minimum, int maximum]
{
int objectCount = Random.Range (minimum, maximum);
for (int i = 0; i < objectCount; i++)
{
Vector3 randomPosition = RandomPosition ();
GameObject tileChoice = tileArray[Random.Range(0, tileArray.Length)];
Instantiate(tileChoice, randomPosition,Quaternion.identity);
}
}
public void SetupScene(int level)
{
//colocou os quadradinhos do tabuleiro
BoardSetup ();
//inicializou o grid
initialiseList ();
//instanciar um numero aleatorio de muros internos
LayoutObjectAtRandom(WallTile wallCount.minimum, wallCount.maximum);
//instanciar um numero aleatorio de comidas
LayoutObjectAtRandom (foodTiles, foodCount.minimum, foodCount.maximum);
//instanciar o numero decimal inimigos baseado No level
int enemyCount = (int)Mathf.Log(level, 2f);
LayoutObjectAtRandom (enemyTile, enemyCount, enemyCount);
//instanciar a saida
Instantiate (exit, new Vector3 (columns-1,rows-1,0f),Quaternion.identity);
}
}
// Use this for initialization
void Start () {
}
I await your response. Thank you in advance.