Beispiel #1
0
    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);
    }
Beispiel #2
0
    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();
    }
Beispiel #3
0
 private void Awake()
 {
     chunkGenerator = GameObject.FindObjectOfType(typeof(ChunksController)) as ChunksController;
     inventory      = GetComponent <Inventory>();
 }
Beispiel #4
0
 void Awake()
 {
     instance = this;
 }