Fix a couple oopsies
This commit is contained in:
13
scripts/game_data.gd
Normal file
13
scripts/game_data.gd
Normal 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
20
scripts/world.gd
Normal 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)
|
Reference in New Issue
Block a user