pull/2/head
jaysunxiao 2022-06-29 15:54:49 +08:00
parent 2f15cd8bb2
commit cbc1c226d5
7 changed files with 24 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -36,3 +36,27 @@ This node takes its parent Path2D, and returns the coordinates of a point within
It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node.
The descendant nodes will then move accordingly when setting an offset in this node.
```
# 4. Tilemap 节点
- tilemap的由tileset组成tileset由tile一个个单个图块组成
- 基本上通过熟练使用get_cell、set_cell、world_to_map这些函数就可以解决大多数普通关卡制作需求
- 自动填充bitmask
- 如图所示这是一个3×3的autotile自动图块如果我还没有设置bitmask位遮罩那么此时放置图块时效果如下图所示
- 可以看到如果没有设置bitmask那么放置图块时只显示左上角的部分
![Image text](image/path1.jpg)
![Image text](image/path2.gif)
- 接下来我把bitmask设置在中心区域如图所示接下来我再放置autotile时效果就不一样了效果如下图所示
![Image text](image/path3.jpg)
![Image text](image/path4.gif)
- 可以看到图中其它图块都是左上角但中间的部分改变了接下来我再把bitmask的范围加大接触到相邻的图块接下来效果就又不一样了
- 可以看到,当放置了一圈图块后,在中间添加图块时,相邻的图块全都改变了
![Image text](image/path5.jpg)
![Image text](image/path6.gif)