blob: 0b92ab1d6a28d03281785db6e1bad6a8792c6bca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
extends Node2D
@onready var map_config : MapGeneratorResource = preload("res://resources/map_generator_resource.tres")
var _path : Array[Vector2i]
var _pg : PathGenerator
func _ready() -> void:
_make_path()
func _make_path():
_pg = PathGenerator.new($TileMapLayer)
_path = []
while _path.size() < map_config.min_path_size:
_path = _pg.generate_path()
_pg.draw_path()
func get_enemy_path() -> Array[Vector2i]:
return _path
|