答案是:同样用set_cells_terrain_connect。 首先想到的是:放置空气地形就相当于删除,文档中提到了“相同地形连接...更新相邻图块”,这里更新相邻图块需要地形集terrain_set相同,保证在一个地形集下,地形terrain设为-1的话,就能实现删除方块的同时,更新周围的方块。 (你要专门弄一个空气地形也是可以的,只要地形集相...
~~set_cells_terrain_connect(0,[grid],0,0)连接的时候,只需要知道新方块是哪个就可以了,他即是添加图块,也是连接,所以不需要用set_cell,直接连接就可以了,但是断开连接的时候需要把周围的图块都断掉,再把周围图块重新添加进去。不知道为什么会有这样的不同,但是我自己写的时候也出现了这个问题。func erase_...
var floor_cells := {} for x in 3: floor_cells[Vector2i(x, 0)] = null for y in 3: floor_cells[Vector2i(0, y)] = null tile_map.set_cells_terrain_connect(0, floor_cells.keys(), 0, 0) This is strange enough. Appearently, you need to include the neighbor cells to achieve...
set_cells_terrain_connect(0, cell_coords_list, 0, 0, true) tile_map.update_internals() # 定位镜头 camera.offset = %current_tile_map.get_used_rect().position * 16 ## 生成房间地图 func generate_rooms_map( room_coords_to_data_map: Dictionary, tile_map: TileMap, map_list: Array, )...
0投票 也许这个可能有帮助, 我从视频中可以看出,您首先必须使用 set_cell 移除瓷砖 然后必须获取您移除的图块周围的所有 8 个图块(4 个水平和垂直 + 4 个对角线),并使用 set_cells_terrain_connect 更新这些图块 最新问题 我如何更新视频源以播放新视频 使用主题color android飞溅屏幕 databricks并遵循...
{ "set_cells_terrain_path", 3072115677, 3578627656 }, { "get_used_cells_by_id", 4152068407, 2931012785 }, }); mappings.insert("TileMapLayer", { { "notify_runtime_tile_data_update", 2275361663, 3218959716 }, }); mappings.insert("TileMapPattern", { { "set_cell", 634000503, 222480255...
Godot version: 3.2.1 mono 64 OS/device including version: win10 64 Issue description: A tile that is part of an atlas cannot be referenced with SetCell. For example, you cannot use SetCell with a tile that is part of an atlas, you cannot...
member val IdleStrategyEntry: Entry option = None with get, set member this.ChangeToIdleStrategyScene () = this.GetTree().ChangeSceneToFile "res://game/inGame/menu/InGameMenu.tscn" |> ignore member this.InitIdleStrategyGame (baseTerrain: TileMapLayer) playerCount = this.IdleStrategyE...