Example #1
0
    public void DestroyEveryMapModule()
    {
        for (int i = transform.childCount - 1; i >= 0; i--)
        {
            Destroy(transform.GetChild(i).gameObject);
        }

        //타일 재활용
        for (int i = 0; i < moduleList.Count; i++)
        {
            MapModule normalModule = moduleList[i].GetComponent <MapModule>();
            if (normalModule != null)
            {
                normalModule.PushAllTileToPool();
            }
        }

        if (moduleList != null)
        {
            moduleList.Clear();
        }
        mapModuleGenerator.PullBackGroundTiles();

        mapModuleGenerator = null;
    }
Example #2
0
    public void MakeMap(StageData stageData)
    {
        mapModuleGenerator = new MapModuleGenerator(this.transform, this);



        moduleList = new List <MapModuleBase>();

        ResetMakeCount();

        if (mapModuleGenerator != null)
        {
            mapModuleGenerator.MakeMap(stageData);
        }

        StartCoroutine(MapPositioningRoutine());
    }