Moved godot files into a directory to keep things clean
This commit is contained in:
15
project/workspace/workspace.gd
Normal file
15
project/workspace/workspace.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
extends Node2D
|
||||
|
||||
@export var small_tree = preload("res://small_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)
|
||||
1
project/workspace/workspace.gd.uid
Normal file
1
project/workspace/workspace.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://qrdh3cheiudm
|
||||
31
project/workspace/workspace.tscn
Normal file
31
project/workspace/workspace.tscn
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user