plant-builder working
This commit is contained in:
@@ -25,7 +25,7 @@ func generate_plants():
|
||||
child.free()
|
||||
|
||||
for i in n_plants_to_generate:
|
||||
print("Generate plant")
|
||||
print("Generate plant :")
|
||||
var plant_pos_x = (i % n_plants_per_row) * space_between_plants
|
||||
@warning_ignore("integer_division")
|
||||
var plant_pos_y = (i / n_plants_per_row) * space_between_plants
|
||||
@@ -37,6 +37,7 @@ func generate_plants():
|
||||
for j in n_mutation_per_plant:
|
||||
plant_data.mutations.append(plant_data.archetype.available_mutations.pick_random())
|
||||
var plant: Plant = Plant.new(plant_data)
|
||||
print(plant.data.plant_name)
|
||||
%Plants.add_child(plant)
|
||||
plant.set_owner(self )
|
||||
plant.global_position = plant_position
|
||||
|
||||
Reference in New Issue
Block a user