Пример #1
0
	void CreateGraphCAMap()
	{
		Graph grph = Graph.CreateGraphMaxSize(1000, 40);
		DisplayGraph (grph);


		PseudoRandom rnd = new PseudoRandom(seedX, seedY, seedZ); 
		CellularAutomata ca = new CellularAutomata();
		GraphGenCA grCa = new GraphGenCA (grph, rnd, 0.385f);
		int[,] start = grCa.CreateInitalMapFromGraph (grph, 16, 4);
		map = ca.CreateBasicCellularAutomataFromMap (start, rnd);


		mainCam.transform.position = new Vector3 ((map.GetLength(1)+3)/2, (map.GetLength(0)+3)/2, -10 );
		mainCam.orthographicSize = 90f;
		CreateMap (map);
		toggle = true; 
	}