Heck yeah, you punch those trees, Gary!

This commit is contained in:
2025-10-31 21:10:55 +11:00
commit ee8deac651
27 changed files with 382 additions and 0 deletions

15
working_scene.gd Normal file
View File

@@ -0,0 +1,15 @@
extends Node2D
@export var small_tree = preload("res://tree/small_tree.tscn")
func _ready() -> void:
randomize()
_procgen()
func _procgen() -> void:
for i in range(0, 15):
var grid_pos = Vector2i(randi() % 20, randi() % 20)
if grid_pos.x == 0 and grid_pos.y == 0: continue #NOTE: don't spawn on the player
var st = small_tree.instantiate()
st.position = Vector2(grid_pos * 32)
add_child(st)