void Start() { // predaní zakladnich parametru na grafickou kartu planetInfo.x = PlanetData.PlanetRadius; planetInfo.y = PlanetData.MaxPlanetHeight; planetInfo.z = PlanetData.ChunkSize; PlanetData.CameraPosition = camera.transform.position; CreateSpehere(); cameraController = new CameraController(camera, PlanetData.PlanetRadius); SetMaterialProperties(); chunk = new ChunksController(PlanetData.PlanetDiameter, instanceMaterials, camera, materialBlock); }
private void Start() { ChunksController = new ChunksController(); VoxelController = new VoxelController(); WorldData = SaveSystem.LoadWorld("test_world"); Vector3 spawnPosition = new Vector3( Settings.Get.WorldCentre, //Settings.Get.ChunkHeight / 2 - 50, TerrainAttributes.solidGroundHeight + 10, Settings.Get.WorldCentre); Player.transform.position = spawnPosition; playerLastCoord = CoordConvertor.GetChunkCoord(Player.transform.position); LoadWorld(); GenerateWorld(); }
private void Awake() { chunkGenerator = GameObject.FindObjectOfType(typeof(ChunksController)) as ChunksController; inventory = GetComponent <Inventory>(); }
void Awake() { instance = this; }