Beispiel #1
0
    // Use this for initialization
    void Awake()
    {
        // 세이브 & 로드 매니저 오브젝트를 구한다.
        getManager         = GameObject.Find("SaveAndLoadManager");
        saveAndLoadManager = getManager.GetComponent("SaveAndLoad") as SaveAndLoad;

        if (saveAndLoadManager.GetIsLoaded() == false)
        {
            initMapThread = UnityThreadHelper.CreateThread((System.Action)InitMapData);
        }
        else
        {
            loadingMapThread = UnityThreadHelper.CreateThread((System.Action)LoadGameMapData);
        }

        //청크배열에 메모리 할당.
        chunks = new Chunk[Mathf.FloorToInt(worldX / chunkSize),
                           Mathf.FloorToInt(worldY / chunkSize),
                           Mathf.FloorToInt(worldZ / chunkSize)];
    }