
在TileMapLayer中显示一个瓦块,下面是TileMapLayer的脚步:
cs
using Godot;
using System;
public partial class TileMapLayer : Godot.TileMapLayer
{
public override void _Ready()
{
// 在地图上放置 tile(假设 tileId = 0 存在于 TileSet 中)
SetCell(new Vector2I(1, 1), 0, Vector2I.Zero);
}
}