Access global map data directly
This commit is contained in:
parent
1dc768ad27
commit
e7337bede6
5 changed files with 11 additions and 222 deletions
|
|
@ -1,7 +1,6 @@
|
|||
[gd_scene load_steps=17 format=3 uid="uid://bwcevwwphdvq"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://bwcevwwphdvq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bq7hia2dit80y" path="res://Entities/GroundTile/ground_tile.gd" id="1_uwxqs"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckesk3bs6g7tt" path="res://Stages/Test3D/assets/fish.glb" id="2_h4g11"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://duj6747nq4qsk" path="res://Stages/Test3D/assets/stylizedGrassMeshes/grass.res" id="3_8mhad"]
|
||||
[ext_resource type="Script" uid="uid://cacp8ncwuofuj" path="res://Entities/GroundTile/scripts/grass.gd" id="3_224hx"]
|
||||
[ext_resource type="Material" uid="uid://b1miqvl8lus75" path="res://Stages/Test3D/GrassMaterialOverride.tres" id="3_f37ob"]
|
||||
|
|
@ -58,10 +57,6 @@ mesh = SubResource("PlaneMesh_oqd8f")
|
|||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
|
||||
shape = SubResource("BoxShape3D_h4g11")
|
||||
|
||||
[node name="fish2" parent="." instance=ExtResource("2_h4g11")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00713956, 0, 0.0313604)
|
||||
visible = false
|
||||
|
||||
[node name="Grass" type="Node3D" parent="."]
|
||||
script = ExtResource("3_224hx")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# GroundTile.gd
|
||||
class_name GroundTile
|
||||
extends Node3D
|
||||
|
||||
@onready var debug_text: Label = $DebugText/DebugTextViewport/DebugTextLabel
|
||||
@onready var tree_spawner = $Trees
|
||||
@onready var grass_spawner = $Grass
|
||||
|
|
@ -39,4 +40,4 @@ func spawn_content():
|
|||
grass_spawner.spawn_grass_for_cell(cell_info)
|
||||
|
||||
func update_text_label() -> void:
|
||||
debug_text.text = str(cell_info.vegetation_density)
|
||||
debug_text.text = str(cell_info.vegetation_density)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue