rj-action-library/Runtime/WorldMap/WorldMapEditor.cs

51 lines
854 B
C#
Raw Normal View History

2024-12-01 17:07:41 +00:00
using Godot;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Rokojori
{
[Tool]
[GlobalClass]
public partial class WorldMapEditor:WorldMap
{
[Export]
public Node layerEditorsContainer;
[Export]
public bool streaming = true;
[Export]
public bool createEmptyRegions = false;
[Export]
public PackedScene emptyRegion;
[ExportGroup("Debugging")]
[Export]
public int numTiles = 0;
bool wasStreaming = false;
public override void _Process( double delta )
{
if ( ! streaming )
{
wasStreaming = false;
return;
}
numTiles = _loadedRegions.Count;
if ( ! wasStreaming )
{
ClearRegions();
}
StreamRegions();
wasStreaming = true;
}
}
}