Loads of stuff
This commit is contained in:
parent
f3af522683
commit
66ce3ff503
413 changed files with 14802 additions and 0 deletions
43
Entities/GroundTile/GroundTile.tscn
Normal file
43
Entities/GroundTile/GroundTile.tscn
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[gd_scene load_steps=7 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"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_oqd8f"]
|
||||
albedo_color = Color(0.171, 0.57, 0.24415, 1)
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_oqd8f"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_h4g11"]
|
||||
size = Vector3(2, 2, 2)
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_h4g11"]
|
||||
viewport_path = NodePath("DebugText")
|
||||
|
||||
[node name="GroundTile" type="Node3D"]
|
||||
script = ExtResource("1_uwxqs")
|
||||
|
||||
[node name="Ground" type="MeshInstance3D" parent="."]
|
||||
material_override = SubResource("StandardMaterial3D_oqd8f")
|
||||
mesh = SubResource("PlaneMesh_oqd8f")
|
||||
|
||||
[node name="GroundCollision" type="StaticBody3D" parent="."]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="GroundCollision"]
|
||||
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)
|
||||
|
||||
[node name="DebugText" type="SubViewport" parent="."]
|
||||
size = Vector2i(50, 50)
|
||||
|
||||
[node name="DebugTextLabel" type="Label" parent="DebugText"]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 23.0
|
||||
text = "Hello world"
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.0939356)
|
||||
texture = SubResource("ViewportTexture_h4g11")
|
||||
26
Entities/GroundTile/ground_tile.gd
Normal file
26
Entities/GroundTile/ground_tile.gd
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
extends Node3D
|
||||
|
||||
@onready var debug_text: Label = $DebugText/DebugTextLabel
|
||||
|
||||
var grid_x: int
|
||||
var grid_z: int
|
||||
var cell_info: CellDataResource
|
||||
|
||||
func _ready() -> void:
|
||||
if cell_info != null:
|
||||
update_text_label()
|
||||
|
||||
func set_grid_location(x, z) -> void:
|
||||
grid_x = x
|
||||
grid_z = z
|
||||
cell_info = MapData.get_map_data(grid_x, grid_z)
|
||||
|
||||
var debug_dict = {}
|
||||
if cell_info.get_script():
|
||||
var script_properties = cell_info.get_script().get_script_property_list()
|
||||
for prop in script_properties:
|
||||
debug_dict[prop.name] = cell_info.get(prop.name)
|
||||
Log.pr(debug_dict)
|
||||
|
||||
func update_text_label() -> void:
|
||||
debug_text.text = str(grid_x) + ', ' + str(grid_z) + ', ' + str(cell_info.cell_seed)
|
||||
1
Entities/GroundTile/ground_tile.gd.uid
Normal file
1
Entities/GroundTile/ground_tile.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bq7hia2dit80y
|
||||
Loading…
Add table
Add a link
Reference in a new issue