mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:45:33 +00:00
23 lines
430 B
C#
23 lines
430 B
C#
using Godot;
|
|
using System;
|
|
|
|
public partial class TilemapAvoidance : TileMapLayer
|
|
{
|
|
|
|
[Export] private TileMapLayer _solidLayer;
|
|
|
|
public override bool _UseTileDataRuntimeUpdate(Vector2I coords)
|
|
{
|
|
if (_solidLayer.GetUsedCellsById(0).Contains(coords))
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override void _TileDataRuntimeUpdate(Vector2I coords, TileData tileData)
|
|
{
|
|
tileData.SetNavigationPolygon(0, null);
|
|
}
|
|
}
|