optimizations and minor improvements
This commit is contained in:
parent
24621dfb3b
commit
57c7c23c2a
|
@ -6,4 +6,3 @@
|
|||
resource_name = "Material"
|
||||
cull_mode = 2
|
||||
albedo_texture = ExtResource("1_nijc4")
|
||||
roughness = 0.5
|
||||
|
|
|
@ -11,7 +11,6 @@ material = ExtResource("2_6ssja")
|
|||
size = Vector3(10, 5, 10)
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_t334j"]
|
||||
load_path = "res://.godot/imported/plus.svg-fa9840203ca82cc4696e02bad07ef61f.s3tc.ctex"
|
||||
|
||||
[node name="Tile" type="StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.5, 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://ddnlfxwoeywq0"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cao75w3xdkup3"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Earth.gd" id="1_u71pd"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6er1dx11vq1a" path="res://scenes/models/god.tscn" id="2_frpdt"]
|
||||
|
@ -25,3 +25,4 @@ environment = SubResource("Environment_4hkk2")
|
|||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="WorldEnvironment"]
|
||||
transform = Transform3D(-3.53179e-08, 0.58921, -0.80798, 2.57552e-08, 0.80798, 0.58921, 1, 0, -4.37114e-08, -14.3426, 13.3054, 0)
|
||||
shadow_enabled = true
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://dgnq54ix2bdv2"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Earth.gd" id="1_bry4w"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6er1dx11vq1a" path="res://scenes/models/god.tscn" id="2_mujaw"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_01wm3"]
|
||||
|
||||
[sub_resource type="Sky" id="Sky_oeb53"]
|
||||
sky_material = SubResource("ProceduralSkyMaterial_01wm3")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_4hkk2"]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_oeb53")
|
||||
|
||||
[node name="World" type="Node3D"]
|
||||
|
||||
[node name="Earth" type="Node3D" parent="."]
|
||||
script = ExtResource("1_bry4w")
|
||||
|
||||
[node name="God" parent="." instance=ExtResource("2_mujaw")]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -2.77222, 0.906321, 0)
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_4hkk2")
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="WorldEnvironment"]
|
||||
transform = Transform3D(-3.53179e-08, 0.58921, -0.80798, 2.57552e-08, 0.80798, 0.58921, 1, 0, -4.37114e-08, -14.3426, 13.3054, 0)
|
||||
shadow_enabled = true
|
|
@ -20,7 +20,8 @@ func mark_empty_tiles():
|
|||
var tiles = get_children()
|
||||
var available = []
|
||||
for tile in tiles:
|
||||
tile.update_tile()
|
||||
#tile.update_tile()
|
||||
tile.request_ready()
|
||||
if tile.tile_type == TileType.Empty: continue
|
||||
var free_dirs = tile.get_empty_dirs_around()
|
||||
for dir in free_dirs:
|
||||
|
|
|
@ -38,6 +38,7 @@ func generate_decoration_objects():
|
|||
decoration.position = pos
|
||||
decoration.add_to_group("Decoration")
|
||||
add_child(decoration)
|
||||
|
||||
func update_tile():
|
||||
for decoration in get_children():
|
||||
if(decoration.is_in_group("Decoration")):
|
||||
|
|
|
@ -78,5 +78,6 @@ func load_world(save_name):
|
|||
if i == "node" or "pos" in i:
|
||||
continue
|
||||
new_object.set(i, node_data[i])
|
||||
new_object._ready() #request ready don't work /shrug
|
||||
await get_tree().physics_frame
|
||||
earth.mark_empty_tiles()
|
||||
|
|
Loading…
Reference in New Issue