Пример #1
0
    void ChengeMapObject(string mapName)
    {
        var data = _mapData.mapDataList.Where(x => x._MapName == mapName).FirstOrDefault();

        if (data == null)
        {
            Debug.Log("MapController:mapName is not exist:" + mapName);
            return;
        }
        DestoryMap();
        _nowMapObject = CreatMapObject(data).GetComponent <MapData_mono>();
        _nowMapObject.SetPlayerPos(_beforeMapName);
    }
Пример #2
0
    void ChengeMapObject(string nextMapName, string beforeMapName, bool ignore = false)
    {
        var data = _mapData.mapDataList.Where(x => x._MapName == nextMapName).FirstOrDefault();

        if (data == null)
        {
            Debug.Log("MapController:mapName is not exist:" + nextMapName);
            return;
        }
        DestoryMap();
        _nowMapObject = CreatMapObject(data).GetComponent <MapData_mono>();
        if (!ignore)
        {
            _nowMapObject.SetPlayerPos(beforeMapName);       //プレイヤーの位置を指定
        }
    }