// Start is called before the first frame update
    void Start()
    {
        chunkActivatorObject = GameObject.Find("ChunkActivatorObj");
        activationScript     = chunkActivatorObject.GetComponent <ChunkActivator>();

        StartCoroutine("AddToList");
    }
Ejemplo n.º 2
0
    public bool firstLoad = true; //ugly solution, but ey, it works

    private void Awake()
    {
        chunkActivator = GetComponent <ChunkActivator>();
        worldGenerator = GetComponent <WorldGenerator>();

        activeChunksIds = new int[numChunksActiveLeft + numChunksActiveRight + 1];
    }
Ejemplo n.º 3
0
    void Start()
    {
        chunkActivator = GetComponent <ChunkActivator>();

        loadingSlider.maxValue = numChunks;
        loadingSlider.value    = 0;
        seed        = Random.Range(-100000, 100000);
        chunkLength = chunk.GetComponent <ChunkGenerator>().chunkLength;

        chunkActivator.ReserveSpace(numChunks);

        StartCoroutine(GenerateTimer());
    }
Ejemplo n.º 4
0
    public void Awake()
    {
        chunkActivator = GetComponent <ChunkActivator>();

        path = Application.persistentDataPath + "/" + dataName;

        if (File.Exists(path))
        {
            File.Delete(path);
        }

        File.Create(path);
    }
Ejemplo n.º 5
0
 private void Start()
 {
     chunkActivator = GetComponent <ChunkActivator>();
     worldGenerator = GetComponent <WorldGenerator>();
 }