Improved the menu a bit.

This commit is contained in:
Relintai 2019-12-07 16:12:27 +01:00
parent ad8c9fb653
commit 054bb18cd3
2 changed files with 102 additions and 14 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=2]
[gd_scene load_steps=23 format=2]
[ext_resource path="res://ui/theme/ui_theme.tres" type="Theme" id=1]
[ext_resource path="res://menu/CharacterEntry.tscn" type="PackedScene" id=2]
@ -15,13 +15,59 @@
[ext_resource path="res://scenes/DisconnectButton.gd" type="Script" id=13]
[ext_resource path="res://scenes/ConnectServerButton.gd" type="Script" id=14]
[ext_resource path="res://scenes/HostGameButton.gd" type="Script" id=15]
[ext_resource path="res://voxelman/transvoxel_mesher/TVVoxelWorld.gd" type="Script" id=16]
[ext_resource path="res://data/voxel_libraries/2_main_lib_merger_empty.tres" type="VoxelmanLibraryMerger" id=17]
[ext_resource path="res://scripts/world_generators/MainPlanetGenerator.gd" type="Script" id=18]
[ext_resource path="res://scripts/settings/DirectionalLightSettings.gd" type="Script" id=19]
[sub_resource type="ProceduralSky" id=1]
[sub_resource type="VoxelmanLevelGenerator" id=1]
script = ExtResource( 18 )
_force_planet = -1
_level_seed = 0
_spawn_mobs = false
[sub_resource type="Environment" id=2]
background_mode = 1
background_sky = SubResource( 1 )
[sub_resource type="ProceduralSky" id=2]
sky_top_color = Color( 0.447059, 0.780392, 0.854902, 1 )
sky_horizon_color = Color( 0.273637, 0.277344, 0.206924, 1 )
sky_curve = 0.263535
sky_energy = 0.3
ground_bottom_color = Color( 0.196078, 0.152941, 0.152941, 1 )
ground_horizon_color = Color( 0.223529, 0.192157, 0.164706, 1 )
ground_curve = 0.101965
ground_energy = 0.4
sun_color = Color( 0.45098, 0.352941, 0.113725, 1 )
sun_latitude = 39.71
sun_longitude = -8.09
sun_angle_min = 0.0
sun_angle_max = 23.15
sun_energy = 9.7
texture_size = 0
[sub_resource type="Environment" id=3]
background_mode = 2
background_sky = SubResource( 2 )
ambient_light_color = Color( 1, 1, 1, 1 )
ambient_light_energy = 1.23
ambient_light_sky_contribution = 0.11
fog_enabled = true
fog_color = Color( 0.188235, 0.207843, 0.164706, 1 )
fog_sun_color = Color( 0.239216, 0.337255, 0.396078, 1 )
fog_sun_amount = 0.54
fog_depth_begin = 155.9
fog_depth_end = 379.9
fog_depth_curve = 1.18921
tonemap_mode = 2
tonemap_exposure = 0.83
auto_exposure_max_luma = 7.33
ss_reflections_enabled = true
ssao_enabled = true
glow_levels/3 = false
glow_intensity = 1.6
glow_strength = 1.1
glow_bloom = 0.1
glow_hdr_luminance_cap = 1.0
adjustment_enabled = true
adjustment_contrast = 1.05
[node name="Menu" type="Control"]
anchor_right = 1.0
@ -64,7 +110,7 @@ __meta__ = {
}
menu_path = NodePath("..")
container_path = NodePath("CharacterSelector/CharacterSelector/VBoxContainer/ScrollContainer/Container")
player_display_container_path = NodePath("../CharacterDisplay")
player_display_container_path = NodePath("../Char/CharacterDisplay")
character_button_group = ExtResource( 4 )
character_entry = ExtResource( 2 )
character_folder = "characters"
@ -504,16 +550,49 @@ margin_bottom = 127.5
[node name="Register" parent="." instance=ExtResource( 9 )]
visible = false
[node name="CharacterDisplay" type="Spatial" parent="."]
[node name="Char" type="Spatial" parent="."]
transform = Transform( 0.359313, 0, 0.933217, 0, 1, 0, -0.933217, 0, 0.359313, -2.44425, 6.02678, 0 )
[node name="World" type="Spatial" parent="."]
[node name="CharacterDisplay" type="Spatial" parent="Char"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="World"]
environment = SubResource( 2 )
[node name="Camera" type="Camera" parent="World"]
[node name="Camera" type="Camera" parent="Char"]
transform = Transform( 0.906006, -0.157589, 0.392835, 0.0104413, 0.936144, 0.351461, -0.423137, -0.314324, 0.849797, 0.300506, 1.57764, 2.14719 )
current = true
[node name="World" type="VoxelWorld" parent="." groups=[
"save",
]]
use_threads = false
max_concurrent_generations = 1
library = ExtResource( 17 )
level_generator = SubResource( 1 )
voxel_scale = 6.0
chunk_spawn_range = 1
script = ExtResource( 16 )
show_loading_screen = false
generate_on_ready = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="World"]
environment = SubResource( 3 )
__meta__ = {
"_editor_description_": ""
}
[node name="DirectionalLight" type="DirectionalLight" parent="World"]
transform = Transform( -0.797163, 0.45442, 0.397535, 0.124932, -0.520028, 0.844963, 0.590697, 0.723238, 0.357776, 0, 18.834, 0 )
layers = 3
light_color = Color( 1, 0.878431, 0.878431, 1 )
light_energy = 0.7
light_specular = 0.65
shadow_bias = 0.07
script = ExtResource( 19 )
[node name="DirectionalLight2" type="DirectionalLight" parent="World"]
transform = Transform( 0.826603, 0.474891, -0.302004, -0.49276, 0.351482, -0.79602, -0.271874, 0.806808, 0.524543, 0, 18.834, 0 )
light_color = Color( 0.631373, 0.631373, 0.631373, 1 )
light_energy = 0.48
light_specular = 0.0
directional_shadow_normal_bias = 0.1
[connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/CharacterSelector/VBoxContainer/Load" to="CharacterSelectorMenu" method="load_character"]
[connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/CharacterSelector/VBoxContainer/HBoxContainer/Delete" to="CharacterSelectorMenu" method="delete_character"]
[connection signal="pressed" from="CharacterSelectorMenu/CharacterSelector/CharacterSelector/VBoxContainer/HBoxContainer/Create" to="." method="switch_to_menu" binds= [ 1 ]]

View File

@ -26,8 +26,9 @@ extends VoxelWorld
export(Array, MeshDataResource) var meshes : Array
export (bool) var editor_generate : bool = false setget set_editor_generate, get_editor_generate
export (bool) var show_loading_screen : bool = true
export(bool) var editor_generate : bool = false setget set_editor_generate, get_editor_generate
export(bool) var show_loading_screen : bool = true
export(bool) var generate_on_ready : bool = false
var initial_generation : bool = true
@ -38,6 +39,14 @@ var _editor_generate : bool
var _player_file_name : String
var _player : Entity
func _ready():
if generate_on_ready:
if level_generator != null:
level_generator.setup(self, 80, false, library)
spawn()
#func _process(delta : float) -> void:
# if not generation_queue.empty():
# var chunk : VoxelChunk = generation_queue.front()