mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-06 01:25:54 +00:00
Automatic tile avoidance
This commit is contained in:
parent
a01ed821b7
commit
a861c331da
6 changed files with 94 additions and 20 deletions
|
|
@ -1,6 +1,18 @@
|
|||
using Godot;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public partial class NavigationMap : NavigationRegion2D
|
||||
{
|
||||
public override void _Ready()
|
||||
{
|
||||
_ = RecalculateNavigation();
|
||||
}
|
||||
|
||||
private async Task RecalculateNavigation()
|
||||
{
|
||||
await Task.Delay(300);
|
||||
|
||||
this.BakeNavigationPolygon();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue