Sets up initial project structure
Initializes the project with core files including: - Editor configuration (.editorconfig, .gitattributes, .gitignore, .vscode/settings.json) - Log.gd addon for enhanced debugging - Loggie addon for advanced logging - Project assets folder
This commit is contained in:
parent
f8140c83ff
commit
02b3be35b0
144 changed files with 7399 additions and 0 deletions
27
playground/level.gd
Normal file
27
playground/level.gd
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
extends Node2D
|
||||
|
||||
var ground: TileMapLayer
|
||||
var walls : TileMapLayer
|
||||
var cells : Array
|
||||
|
||||
var map_width : int = 40
|
||||
var map_height : int = 32
|
||||
|
||||
func _ready() -> void:
|
||||
print("Level ready")
|
||||
|
||||
ground = $Ground
|
||||
walls = $Walls
|
||||
|
||||
Log.pr(ground)
|
||||
|
||||
cells = CoordUtil.all_cells(Vector2i(-1, -1), Vector2i(map_width + 1, map_height + 1))
|
||||
|
||||
Log.pr(cells)
|
||||
|
||||
ground.clear()
|
||||
ground.set_cells_terrain_connect(cells, 0, 1, false)
|
||||
|
||||
var perimeter_cells : Array = CoordUtil.perimeter_cells(Vector2i(0, 0), Vector2i(map_width, map_height), false, 2)
|
||||
walls.set_cells_terrain_connect(perimeter_cells, 0, 0, false)
|
||||
# walls.set_cells_terrain_connect(cells, 0, 0, true)
|
||||
Loading…
Add table
Add a link
Reference in a new issue