Fix a couple oopsies

This commit is contained in:
2023-10-07 18:26:10 -07:00
parent aea7ecc1ae
commit 6d4c977c35
5 changed files with 3 additions and 4 deletions

13
scripts/game_data.gd Normal file
View File

@ -0,0 +1,13 @@
extends Node
var tools = {
"none": {
"image": "res://textures/tools/none.svg",
"offset": Vector2(0, 0)
},
"stick": {
"image": "res://textures/tools/stick.svg",
"offset": Vector2(-80, -120)
}
}

20
scripts/world.gd Normal file
View File

@ -0,0 +1,20 @@
@tool
extends Node2D
var objects = [
"res://data/objects/stone.tscn",
"res://data/objects/tree.tscn"
]
var object_ammount = 20 #the ammount of each type of object
var this_seed = 1234
func _ready():
seed(this_seed)
for object in objects:
for iter in range(object_ammount):
var this_object = load(object).instantiate()
this_object.position.x = randf_range(-4000, 4000)
this_object.position.y = randf_range(-4000, 4000)
$objects.add_child(this_object)