Maps.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:Mindustry 作者:
public void saveAndReload(Map map, Pixmap out){
    if(map.pixmap != null && out != map.pixmap && map.texture != null){
        map.texture.dispose();
        map.texture = new Texture(out);
    }else if (out == map.pixmap){
        map.texture.draw(out, 0, 0);
    }

    map.pixmap = out;
    if(map.texture == null) map.texture = new Texture(map.pixmap);

    if(map.id == -1){
        if(mapNames.containsKey(map.name)){
            map.id = mapNames.get(map.name).id;
        }else{
            map.id = ++lastID;
        }
    }

    if(!Settings.has("hiscore" + map.name)){
        Settings.defaults("hiscore" + map.name, 0);
    }

    saveCustomMap(map);
    Vars.ui.levels.reload();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号