diff --git a/default_env.tres b/default_env.tres index 98f26a7..20207a4 100644 --- a/default_env.tres +++ b/default_env.tres @@ -1,5 +1,7 @@ [gd_resource type="Environment" load_steps=2 format=2] + [sub_resource type="ProceduralSky" id=1] + [resource] background_mode = 2 background_sky = SubResource( 1 ) diff --git a/project.godot b/project.godot index a0952ac..14dcb45 100644 --- a/project.godot +++ b/project.godot @@ -11,6 +11,7 @@ config_version=4 [application] config/name="Athena-Hidden-Object" +run/main_scene="res://scenes/main.tscn" config/icon="res://icon.png" [physics] @@ -19,5 +20,4 @@ common/enable_pause_aware_picking=true [rendering] -quality/driver/driver_name="GLES3" environment/default_environment="res://default_env.tres" diff --git a/scenes/UI/About.gd b/scenes/UI/About.gd new file mode 100644 index 0000000..7340780 --- /dev/null +++ b/scenes/UI/About.gd @@ -0,0 +1,9 @@ +extends Node + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +func _on_Return_pressed(): + get_tree().change_scene("res://scenes/main.tscn") diff --git a/scenes/UI/About.tscn b/scenes/UI/About.tscn new file mode 100644 index 0000000..6ced9c2 --- /dev/null +++ b/scenes/UI/About.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://scenes/UI/About.gd" type="Script" id=1] + +[node name="About" type="Node"] +script = ExtResource( 1 ) + +[node name="GRem" type="Label" parent="."] +margin_left = 150.0 +margin_top = 150.0 +margin_right = 416.0 +margin_bottom = 181.0 +text = "Lead Develop : GRem -- VAILLANT Jérémy +" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Stilobique" type="Label" parent="."] +margin_left = 300.0 +margin_top = 300.0 +margin_right = 583.0 +margin_bottom = 331.0 +text = "Lead Artist : Stilobique -- VAILLANT Aurelien" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Return" type="LinkButton" parent="."] +margin_right = 40.0 +margin_bottom = 14.0 +text = "back" +__meta__ = { +"_edit_use_anchors_": false +} + +[connection signal="pressed" from="Return" to="." method="_on_Return_pressed"] diff --git a/scenes/UI/ChooseScene.gd b/scenes/UI/ChooseScene.gd new file mode 100644 index 0000000..aa5922a --- /dev/null +++ b/scenes/UI/ChooseScene.gd @@ -0,0 +1,7 @@ +extends Control + +func _on_Return_pressed(): + get_tree().change_scene("res://scenes/main.tscn") + +func _on_WarCraft_pressed(): + get_tree().change_scene("res://scenes/levels/WarCraft.tscn") diff --git a/scenes/UI/ChooseScene.tscn b/scenes/UI/ChooseScene.tscn new file mode 100644 index 0000000..c833225 --- /dev/null +++ b/scenes/UI/ChooseScene.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://scenes/UI/ChooseScene.gd" type="Script" id=1] + +[node name="ChooseScene" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="GridContainer" type="GridContainer" parent="."] +margin_right = 1024.0 +margin_bottom = 600.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Return" type="LinkButton" parent="GridContainer"] +margin_right = 54.0 +margin_bottom = 14.0 +text = "back" + +[node name="WarCraft" type="LinkButton" parent="GridContainer"] +margin_top = 18.0 +margin_right = 54.0 +margin_bottom = 32.0 +text = "WarCraft" + +[connection signal="pressed" from="GridContainer/Return" to="." method="_on_Return_pressed"] +[connection signal="pressed" from="GridContainer/WarCraft" to="." method="_on_WarCraft_pressed"] diff --git a/scenes/levels/WarCraft.tscn b/scenes/levels/WarCraft.tscn new file mode 100644 index 0000000..9926b63 --- /dev/null +++ b/scenes/levels/WarCraft.tscn @@ -0,0 +1,3 @@ +[gd_scene format=2] + +[node name="Warcraft" type="Spatial"] diff --git a/scenes/main.gd b/scenes/main.gd new file mode 100644 index 0000000..1d9700f --- /dev/null +++ b/scenes/main.gd @@ -0,0 +1,13 @@ +extends Node + +# Quit the game +func _on_Quit_pressed(): + get_tree().quit(0) + +# Load scene about +func _on_About_pressed(): + get_tree().change_scene("res://scenes/UI/About.tscn") + +# Load scene for select game +func _on_New_pressed(): + get_tree().change_scene("res://scenes/UI/ChooseScene.tscn") diff --git a/scenes/main.tscn b/scenes/main.tscn new file mode 100644 index 0000000..5d5cc56 --- /dev/null +++ b/scenes/main.tscn @@ -0,0 +1,57 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/main.gd" type="Script" id=1] + +[sub_resource type="GDScript" id=1] +script/source = "extends LinkButton + +# Quit the game with properly exit code +" + +[node name="Main" type="Node"] +script = ExtResource( 1 ) + +[node name="Grid" type="GridContainer" parent="."] +margin_left = -1.33484 +margin_right = 1022.67 +margin_bottom = 600.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Title" type="Label" parent="Grid"] +margin_right = 151.0 +margin_bottom = 14.0 +text = "Athena - Hidden Object" +align = 1 +valign = 1 + +[node name="New" type="LinkButton" parent="Grid"] +margin_top = 18.0 +margin_right = 151.0 +margin_bottom = 32.0 +text = "Nouveau" + +[node name="Continue" type="LinkButton" parent="Grid"] +margin_top = 36.0 +margin_right = 151.0 +margin_bottom = 50.0 +disabled = true +text = "Reprendre" + +[node name="About" type="LinkButton" parent="Grid"] +margin_top = 54.0 +margin_right = 151.0 +margin_bottom = 68.0 +text = "Credit" + +[node name="Quit" type="LinkButton" parent="Grid"] +margin_top = 72.0 +margin_right = 151.0 +margin_bottom = 86.0 +text = "Quitter" +script = SubResource( 1 ) + +[connection signal="pressed" from="Grid/New" to="." method="_on_New_pressed"] +[connection signal="pressed" from="Grid/About" to="." method="_on_About_pressed"] +[connection signal="pressed" from="Grid/Quit" to="." method="_on_Quit_pressed"]