General code improvements, progress step tracker implementation for worldgen, and work towards enemy behavior

This commit is contained in:
2024-01-23 21:45:52 +01:00
parent 3f465a708c
commit 49562ba9ce
11 changed files with 517 additions and 214 deletions

View File

@ -1,6 +1,7 @@
class_name WorldGenerator
extends Resource
## Generates a world to the given TileMap.
func generate(map: TileMap) -> void:
if not self.has_method("_generate"):
push_error("Generator missing `_generate` method")
@ -8,9 +9,11 @@ func generate(map: TileMap) -> void:
self.call("_generate", map)
## Returns the progress tracker for this generator.
func get_progress_tracker() -> ProgressTracker:
if not self.has_method("_get_progress_tracker"):
push_error("Generator missing `_get_progress_tracker` method")
return null
return self.call("_get_progress_tracker")