diff --git a/bingo-auditivo/.editorconfig b/bingo-auditivo/.editorconfig new file mode 100644 index 0000000..f28239b --- /dev/null +++ b/bingo-auditivo/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 diff --git a/bingo-auditivo/.godot/.gdignore b/bingo-auditivo/.godot/.gdignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/bingo-auditivo/.godot/.gdignore @@ -0,0 +1 @@ + diff --git a/bingo-auditivo/.godot/editor/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.mp3str-folding-cfc7d3bc9c548cf8a14993e689d0f067.cfg b/bingo-auditivo/.godot/editor/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.mp3str-folding-cfc7d3bc9c548cf8a14993e689d0f067.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/bingo-auditivo/.godot/editor/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.mp3str-folding-cfc7d3bc9c548cf8a14993e689d0f067.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/bingo-auditivo/.godot/editor/configuration.gd-folding-0f54ff6f4c0e1e3e715375e09405d3d5.cfg b/bingo-auditivo/.godot/editor/configuration.gd-folding-0f54ff6f4c0e1e3e715375e09405d3d5.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/bingo-auditivo/.godot/editor/configuration.gd-folding-0f54ff6f4c0e1e3e715375e09405d3d5.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/bingo-auditivo/.godot/editor/configuration.gd-folding-9a7c6a4b6b3690a147a35a2c78edff9b.cfg b/bingo-auditivo/.godot/editor/configuration.gd-folding-9a7c6a4b6b3690a147a35a2c78edff9b.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/bingo-auditivo/.godot/editor/configuration.gd-folding-9a7c6a4b6b3690a147a35a2c78edff9b.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/bingo-auditivo/.godot/editor/configuration.tscn-editstate-1d57cbfe65260b55bec0ffd7be0eb13c.cfg b/bingo-auditivo/.godot/editor/configuration.tscn-editstate-1d57cbfe65260b55bec0ffd7be0eb13c.cfg new file mode 100644 index 0000000..f725a1c --- /dev/null +++ b/bingo-auditivo/.godot/editor/configuration.tscn-editstate-1d57cbfe65260b55bec0ffd7be0eb13c.cfg @@ -0,0 +1,195 @@ +[editor_states] + +Anim={ +"visible": false +} +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(-852.9, -156.826), +"primary_grid_step": Vector2i(8, 8), +"show_group_gizmos": true, +"show_guides": true, +"show_helpers": false, +"show_lock_gizmos": true, +"show_origin": true, +"show_position_gizmos": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.261799, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 0.424098 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"MeshInstance3DCustomAABB": 0, +"NavigationLink3D": 0, +"NavigationObstacle3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Particles3DEmissionShape": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"SpringBoneCollision3D": 0, +"SpringBoneSimulator3D": 0, +"VehicleWheel3D": 0, +"VisibleOnScreenNotifier3D": 0, +"VoxelGI": 0 +}, +"local_coords": false, +"preview_sun_env": { +"environ_ao_enabled": false, +"environ_enabled": true, +"environ_energy": 1.0, +"environ_gi_enabled": false, +"environ_glow_enabled": false, +"environ_ground_color": Color(0.2, 0.169, 0.133, 1), +"environ_sky_color": Color(0.385, 0.454, 0.55, 1), +"environ_tonemap_enabled": true, +"sun_color": Color(1, 1, 1, 1), +"sun_enabled": true, +"sun_energy": 1.0, +"sun_max_distance": 100.0, +"sun_rotation": Vector2(-1.0472, 2.61799) +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +Game={ +"camera_override_mode": 2, +"hide_selection": false, +"select_mode": 0 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game")]) diff --git a/bingo-auditivo/.godot/editor/configuration.tscn-folding-1d57cbfe65260b55bec0ffd7be0eb13c.cfg b/bingo-auditivo/.godot/editor/configuration.tscn-folding-1d57cbfe65260b55bec0ffd7be0eb13c.cfg new file mode 100644 index 0000000..48ed3f0 --- /dev/null +++ b/bingo-auditivo/.godot/editor/configuration.tscn-folding-1d57cbfe65260b55bec0ffd7be0eb13c.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("Window/ColorRect"), PackedStringArray("Layout"), NodePath("Window/VBoxContainer"), PackedStringArray("Layout", "Theme Overrides", "Theme Overrides/constants", "Layout/Transform"), NodePath("Window/VBoxContainer/Label"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/colors"), NodePath("Window/VBoxContainer/EmailInput"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Window/VBoxContainer/Label2"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/colors"), NodePath("Window/VBoxContainer/PasswordInput"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Window/VBoxContainer/LogInButton"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Bloqueador"), PackedStringArray("Visibility", "Layout", "Mouse")] +resource_unfolds=["res://scenes/configuration.tscn::StyleBoxFlat_hc4xr", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_7wcdq", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_lditi", PackedStringArray()] +nodes_folded=[NodePath("VBoxContainer")] diff --git a/bingo-auditivo/.godot/editor/create_recent.Node b/bingo-auditivo/.godot/editor/create_recent.Node new file mode 100644 index 0000000..2740a08 --- /dev/null +++ b/bingo-auditivo/.godot/editor/create_recent.Node @@ -0,0 +1,14 @@ +ColorRect +Control +VBoxContainer +Button +LineEdit +Label +Window +MenuButton +HBoxContainer +FlowContainer +Popup +TextureRect +TextureButton +AudioStreamPlayer2D diff --git a/bingo-auditivo/.godot/editor/editor_layout.cfg b/bingo-auditivo/.godot/editor/editor_layout.cfg new file mode 100644 index 0000000..fadb9b7 --- /dev/null +++ b/bingo-auditivo/.godot/editor/editor_layout.cfg @@ -0,0 +1,63 @@ +[docks] + +dock_3_selected_tab_idx=0 +dock_4_selected_tab_idx=0 +dock_5_selected_tab_idx=0 +dock_floating={} +dock_filesystem_h_split_offset=240 +dock_filesystem_v_split_offset=0 +dock_filesystem_display_mode=0 +dock_filesystem_file_sort=0 +dock_filesystem_file_list_display_mode=1 +dock_filesystem_selected_paths=PackedStringArray("res://scenes/configuration.tscn") +dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/") +dock_node_current_tab=0 +dock_history_include_scene=true +dock_history_include_global=true +dock_bottom=[] +dock_closed=[] +dock_split_2=0 +dock_split_3=0 +dock_hsplit_1=0 +dock_hsplit_2=270 +dock_hsplit_3=-270 +dock_hsplit_4=0 +dock_3="Scene,Import" +dock_4="FileSystem" +dock_5="Inspector,Node,History" + +[EditorNode] + +open_scenes=PackedStringArray("res://scenes/game.tscn", "res://scenes/configuration.tscn") +current_scene="res://scenes/game.tscn" +center_split_offset=0 +selected_default_debugger_tab_idx=0 +selected_main_editor_idx=2 +selected_bottom_panel_item=0 + +[EditorWindow] + +screen=0 +mode="maximized" +position=Vector2i(0, 23) + +[ScriptEditor] + +open_scripts=["res://scripts/configuration.gd", "res://scripts/game.gd", "res://scripts/game_data.gd", "res://scripts/screen_manager.gd"] +selected_script="res://scripts/configuration.gd" +open_help=[] +script_split_offset=200 +list_split_offset=0 +zoom_factor=1.0 + +[GameView] + +floating_window_rect=Rect2i(0, 0, 1932, 1127) +floating_window_screen=0 + +[ShaderEditor] + +open_shaders=[] +split_offset=200 +selected_shader="" +text_shader_zoom_factor=1.0 diff --git a/bingo-auditivo/.godot/editor/favorite_properties b/bingo-auditivo/.godot/editor/favorite_properties new file mode 100644 index 0000000..e69de29 diff --git a/bingo-auditivo/.godot/editor/favorites b/bingo-auditivo/.godot/editor/favorites new file mode 100644 index 0000000..e69de29 diff --git a/bingo-auditivo/.godot/editor/favorites.Node b/bingo-auditivo/.godot/editor/favorites.Node new file mode 100644 index 0000000..e69de29 diff --git a/bingo-auditivo/.godot/editor/filesystem_cache10 b/bingo-auditivo/.godot/editor/filesystem_cache10 new file mode 100644 index 0000000..c572c56 --- /dev/null +++ b/bingo-auditivo/.godot/editor/filesystem_cache10 @@ -0,0 +1,14 @@ +ea4bc82a6ad023ab7ee23ee620429895 +::res://::1744847524 +Fondo.png::CompressedTexture2D/CompressedTexture2D::2897047315587731151::1744739710::1744739716::1::::<><><>0<>0<>eacad182f531010fb24ebac1df6691a5<>res://.godot/imported/Fondo.png-90ffc355f5eaeb5a9d9680e0d0d619ff.ctex:: +icon.svg::CompressedTexture2D/CompressedTexture2D::5044074093411398912::1744633584::1744633593::1::::<><><>0<>0<>f9adb246a70a7d9e0b44b9e0dce472bb<>res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex:: +::res://audio/::1744635741 +Elefant.mp3::AudioStreamMP3/AudioStreamMP3::1108392689846586874::1744635741::1744635741::1::::<><><>0<>0<>009805eb2c7d9c7cd23bd1fcf3eb7bf8<>res://.godot/imported/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.mp3str:: +::res://scenes/::1744845819 +configuration.tscn::PackedScene::1018116344755398623::1744845798::0::1::::<><><>0<>0<><>::uid://e41ws6j00o5::::res://scripts/configuration.gd +game.tscn::PackedScene::6874229073676243903::1744845819::0::1::::<><><>0<>0<><>::uid://dhqnf0xm2mwwm::::res://scripts/game.gd<>uid://bhjl7furxm0dv::::res://Fondo.png +::res://scripts/::1744845819 +configuration.gd::GDScript::10065919189713686::1744845819::0::1::::<>Control<><>0<>0<><>:: +game.gd::GDScript/GDScript::7684413599682033952::1744827660::0::1::::<>Control<><>0<>0<><>:: +game_data.gd::GDScript/GDScript::3070763797095879381::1744824670::0::1::::<>Node<><>0<>0<><>:: +screen_manager.gd::GDScript/GDScript::1421320781459715397::1744728053::0::1::::<>Node<><>0<>0<><>:: diff --git a/bingo-auditivo/.godot/editor/filesystem_update4 b/bingo-auditivo/.godot/editor/filesystem_update4 new file mode 100644 index 0000000..17f701b --- /dev/null +++ b/bingo-auditivo/.godot/editor/filesystem_update4 @@ -0,0 +1,4 @@ +res://scenes/game.tscn +res://scripts/game_data.gd +res://scripts/configuration.gd +res://scenes/configuration.tscn diff --git a/bingo-auditivo/.godot/editor/game.gd-folding-ba51fdadef04e64772b438b04f73dd55.cfg b/bingo-auditivo/.godot/editor/game.gd-folding-ba51fdadef04e64772b438b04f73dd55.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/bingo-auditivo/.godot/editor/game.gd-folding-ba51fdadef04e64772b438b04f73dd55.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/bingo-auditivo/.godot/editor/game.gd-folding-f3f50ed19e1e667a18580cee5d349db5.cfg b/bingo-auditivo/.godot/editor/game.gd-folding-f3f50ed19e1e667a18580cee5d349db5.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/bingo-auditivo/.godot/editor/game.gd-folding-f3f50ed19e1e667a18580cee5d349db5.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/bingo-auditivo/.godot/editor/game.tscn-editstate-609f762188a68253d349ec58c4f3a8d3.cfg b/bingo-auditivo/.godot/editor/game.tscn-editstate-609f762188a68253d349ec58c4f3a8d3.cfg new file mode 100644 index 0000000..d228ee2 --- /dev/null +++ b/bingo-auditivo/.godot/editor/game.tscn-editstate-609f762188a68253d349ec58c4f3a8d3.cfg @@ -0,0 +1,195 @@ +[editor_states] + +Anim={ +"visible": false +} +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(-165, -110), +"primary_grid_step": Vector2i(8, 8), +"show_group_gizmos": true, +"show_guides": true, +"show_helpers": false, +"show_lock_gizmos": true, +"show_origin": true, +"show_position_gizmos": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.261799, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 1.0 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"MeshInstance3DCustomAABB": 0, +"NavigationLink3D": 0, +"NavigationObstacle3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Particles3DEmissionShape": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"SpringBoneCollision3D": 0, +"SpringBoneSimulator3D": 0, +"VehicleWheel3D": 0, +"VisibleOnScreenNotifier3D": 0, +"VoxelGI": 0 +}, +"local_coords": false, +"preview_sun_env": { +"environ_ao_enabled": false, +"environ_enabled": true, +"environ_energy": 1.0, +"environ_gi_enabled": false, +"environ_glow_enabled": false, +"environ_ground_color": Color(0.2, 0.169, 0.133, 1), +"environ_sky_color": Color(0.385, 0.454, 0.55, 1), +"environ_tonemap_enabled": true, +"sun_color": Color(1, 1, 1, 1), +"sun_enabled": true, +"sun_energy": 1.0, +"sun_max_distance": 100.0, +"sun_rotation": Vector2(-1.0472, 2.61799) +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +Game={ +"camera_override_mode": 2, +"hide_selection": false, +"select_mode": 0 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game")]) diff --git a/bingo-auditivo/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg b/bingo-auditivo/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg new file mode 100644 index 0000000..d982660 --- /dev/null +++ b/bingo-auditivo/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg @@ -0,0 +1,195 @@ +[editor_states] + +Anim={ +"visible": false +} +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(-592.641, -226.488), +"primary_grid_step": Vector2i(8, 8), +"show_group_gizmos": true, +"show_guides": true, +"show_helpers": false, +"show_lock_gizmos": true, +"show_origin": true, +"show_position_gizmos": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.261799, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 0.513158 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"MeshInstance3DCustomAABB": 0, +"NavigationLink3D": 0, +"NavigationObstacle3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Particles3DEmissionShape": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"SpringBoneCollision3D": 0, +"SpringBoneSimulator3D": 0, +"VehicleWheel3D": 0, +"VisibleOnScreenNotifier3D": 0, +"VoxelGI": 0 +}, +"local_coords": false, +"preview_sun_env": { +"environ_ao_enabled": false, +"environ_enabled": true, +"environ_energy": 1.0, +"environ_gi_enabled": false, +"environ_glow_enabled": false, +"environ_ground_color": Color(0.2, 0.169, 0.133, 1), +"environ_sky_color": Color(0.385, 0.454, 0.55, 1), +"environ_tonemap_enabled": true, +"sun_color": Color(1, 1, 1, 1), +"sun_enabled": true, +"sun_energy": 1.0, +"sun_max_distance": 100.0, +"sun_rotation": Vector2(-1.0472, 2.61799) +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +Game={ +"camera_override_mode": 2, +"hide_selection": false, +"select_mode": 0 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game")]) diff --git a/bingo-auditivo/.godot/editor/game.tscn-folding-609f762188a68253d349ec58c4f3a8d3.cfg b/bingo-auditivo/.godot/editor/game.tscn-folding-609f762188a68253d349ec58c4f3a8d3.cfg new file mode 100644 index 0000000..1d019fa --- /dev/null +++ b/bingo-auditivo/.godot/editor/game.tscn-folding-609f762188a68253d349ec58c4f3a8d3.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[] +resource_unfolds=[] +nodes_folded=[] diff --git a/bingo-auditivo/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg b/bingo-auditivo/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg new file mode 100644 index 0000000..243607c --- /dev/null +++ b/bingo-auditivo/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("TextureRect"), PackedStringArray("Layout", "Layout/Transform"), NodePath("VBoxContainer"), PackedStringArray("Layout", "Layout/Transform", "Theme", "Theme Overrides"), NodePath("VBoxContainer/NextSoundButton"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal", "Theme Overrides/font_sizes"), NodePath("VBoxContainer/HBoxContainer"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("VBoxContainer/HBoxContainer/RepeatSoundButton"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal", "Theme Overrides/font_sizes"), NodePath("VBoxContainer/HBoxContainer/EndOfGameButton"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "Theme Overrides/font_sizes", "theme_override_styles/normal"), NodePath("WinnerSelector"), PackedStringArray("Theme Overrides", "theme_override_styles/embedded_unfocused_border", "theme_override_styles/embedded_border"), NodePath("WinnerSelector/ColorRect"), PackedStringArray("Layout"), NodePath("WinnerSelector/VBoxContainer"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/constants", "Layout/Transform"), NodePath("WinnerSelector/VBoxContainer/Label"), PackedStringArray("Layout/Container Sizing", "Theme Overrides", "Theme Overrides/colors", "Layout"), NodePath("WinnerSelector/VBoxContainer/MenuPlayers"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal", "Theme Overrides/colors"), NodePath("WinnerSelector/VBoxContainer/Button"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Bloqueador"), PackedStringArray("Layout", "Layout/Transform")] +resource_unfolds=["res://scenes/game.tscn::StyleBoxFlat_yqjtg", PackedStringArray("Corner Radius"), "res://scenes/game.tscn::StyleBoxFlat_lnu2h", PackedStringArray("Corner Radius"), "res://scenes/game.tscn::StyleBoxFlat_lbhrr", PackedStringArray("Corner Radius"), "res://scenes/game.tscn::StyleBoxFlat_iywne", PackedStringArray(), "res://scenes/game.tscn::StyleBoxFlat_p57ef", PackedStringArray()] +nodes_folded=[NodePath("VBoxContainer"), NodePath("WinnerSelector"), NodePath("WinnerSelector/VBoxContainer")] diff --git a/bingo-auditivo/.godot/editor/game_data.gd-folding-700f0ba5e90ccece67401374e760da81.cfg b/bingo-auditivo/.godot/editor/game_data.gd-folding-700f0ba5e90ccece67401374e760da81.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/bingo-auditivo/.godot/editor/game_data.gd-folding-700f0ba5e90ccece67401374e760da81.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/bingo-auditivo/.godot/editor/project_metadata.cfg b/bingo-auditivo/.godot/editor/project_metadata.cfg new file mode 100644 index 0000000..1babbdb --- /dev/null +++ b/bingo-auditivo/.godot/editor/project_metadata.cfg @@ -0,0 +1,27 @@ +[editor_metadata] + +executable_path="C:/Users/moran/Downloads/Godot_v4.4.1-stable_win64.exe/Godot_v4.4.1-stable_win64.exe" +use_advanced_connections=false + +[dialog_bounds] + +project_settings=Rect2(360, 190, 1200, 700) +create_new_node=Rect2(510, 190, 900, 700) + +[script_setup] + +last_selected_language="GDScript" + +[recent_files] + +scripts=["res://scripts/game_data.gd", "res://scripts/screen_manager.gd", "res://scenes/configuration.gd", "res://game.gd"] +scenes=["res://scenes/configuration.tscn", "res://scenes/game.tscn", "res://game.tscn"] + +[color_picker] + +picker_shape=3 +recent_presets=PackedColorArray(0.811765, 0, 0, 1, 0.545498, 3.1285e-07, 0.261076, 1, 1, 1, 1, 1, 0.8, 0.8, 0.8, 1, 0.588235, 0.654902, 0.686275, 1, 0.196078, 0.309804, 0.368627, 0.956863, 0.196078, 0.309804, 0.368627, 1, 0.196078, 0.309804, 0.368627, 0.784314, 0.588235, 0.654902, 0.686275, 1) + +[quick_open_dialog] + +last_mode=1 diff --git a/bingo-auditivo/.godot/editor/recent_dirs b/bingo-auditivo/.godot/editor/recent_dirs new file mode 100644 index 0000000..17c06a5 --- /dev/null +++ b/bingo-auditivo/.godot/editor/recent_dirs @@ -0,0 +1,2 @@ +res://scripts +res:// diff --git a/bingo-auditivo/.godot/editor/screen_manager.gd-folding-17de4f11aa617a717e882038b1e091a5.cfg b/bingo-auditivo/.godot/editor/screen_manager.gd-folding-17de4f11aa617a717e882038b1e091a5.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/bingo-auditivo/.godot/editor/screen_manager.gd-folding-17de4f11aa617a717e882038b1e091a5.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/bingo-auditivo/.godot/editor/script_editor_cache.cfg b/bingo-auditivo/.godot/editor/script_editor_cache.cfg new file mode 100644 index 0000000..350461f --- /dev/null +++ b/bingo-auditivo/.godot/editor/script_editor_cache.cfg @@ -0,0 +1,59 @@ +[res://scripts/game.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 27, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 54, +"scroll_position": 12.0, +"selection": true, +"selection_from_column": 20, +"selection_from_line": 54, +"selection_to_column": 27, +"selection_to_line": 54, +"syntax_highlighter": "GDScript" +} + +[res://scripts/configuration.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 40, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 89, +"scroll_position": 69.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://scripts/screen_manager.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 0, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 22, +"scroll_position": 0.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://scripts/game_data.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 25, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 22, +"scroll_position": 18.0, +"selection": false, +"syntax_highlighter": "GDScript" +} diff --git a/bingo-auditivo/.godot/global_script_class_cache.cfg b/bingo-auditivo/.godot/global_script_class_cache.cfg new file mode 100644 index 0000000..32c2394 --- /dev/null +++ b/bingo-auditivo/.godot/global_script_class_cache.cfg @@ -0,0 +1 @@ +list=[] diff --git a/bingo-auditivo/.godot/imported/ChatGPT Image 14 abr 2025, 16_30_54.png-9e09ff071796f29db0cd7081480d4537.ctex b/bingo-auditivo/.godot/imported/ChatGPT Image 14 abr 2025, 16_30_54.png-9e09ff071796f29db0cd7081480d4537.ctex new file mode 100644 index 0000000..98c05f4 Binary files /dev/null and b/bingo-auditivo/.godot/imported/ChatGPT Image 14 abr 2025, 16_30_54.png-9e09ff071796f29db0cd7081480d4537.ctex differ diff --git a/bingo-auditivo/.godot/imported/ChatGPT Image 14 abr 2025, 16_30_54.png-9e09ff071796f29db0cd7081480d4537.md5 b/bingo-auditivo/.godot/imported/ChatGPT Image 14 abr 2025, 16_30_54.png-9e09ff071796f29db0cd7081480d4537.md5 new file mode 100644 index 0000000..158fd85 --- /dev/null +++ b/bingo-auditivo/.godot/imported/ChatGPT Image 14 abr 2025, 16_30_54.png-9e09ff071796f29db0cd7081480d4537.md5 @@ -0,0 +1,3 @@ +source_md5="d0a2e8efb08934c125002ca2342b0b1b" +dest_md5="5eac8ba711953b444769459c636fa80b" + diff --git a/bingo-auditivo/.godot/imported/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.md5 b/bingo-auditivo/.godot/imported/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.md5 new file mode 100644 index 0000000..49b1452 --- /dev/null +++ b/bingo-auditivo/.godot/imported/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.md5 @@ -0,0 +1,3 @@ +source_md5="4f399bb14dd4336695b39d49ec4efc50" +dest_md5="1da956c37aacbb2d616aff49df392e02" + diff --git a/bingo-auditivo/.godot/imported/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.mp3str b/bingo-auditivo/.godot/imported/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.mp3str new file mode 100644 index 0000000..2b16a51 Binary files /dev/null and b/bingo-auditivo/.godot/imported/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.mp3str differ diff --git a/bingo-auditivo/.godot/imported/Fondo (2).png-584568bdc341a49d3cb38435c5863e52.md5 b/bingo-auditivo/.godot/imported/Fondo (2).png-584568bdc341a49d3cb38435c5863e52.md5 new file mode 100644 index 0000000..1901f6e --- /dev/null +++ b/bingo-auditivo/.godot/imported/Fondo (2).png-584568bdc341a49d3cb38435c5863e52.md5 @@ -0,0 +1,3 @@ +source_md5="78687f61f7636839a990dd7241418511" +dest_md5="31495e9ef1c8480db9407b663c9641c9" + diff --git a/bingo-auditivo/.godot/imported/Fondo.png-90ffc355f5eaeb5a9d9680e0d0d619ff.ctex b/bingo-auditivo/.godot/imported/Fondo.png-90ffc355f5eaeb5a9d9680e0d0d619ff.ctex new file mode 100644 index 0000000..14e0aad Binary files /dev/null and b/bingo-auditivo/.godot/imported/Fondo.png-90ffc355f5eaeb5a9d9680e0d0d619ff.ctex differ diff --git a/bingo-auditivo/.godot/imported/Fondo.png-90ffc355f5eaeb5a9d9680e0d0d619ff.md5 b/bingo-auditivo/.godot/imported/Fondo.png-90ffc355f5eaeb5a9d9680e0d0d619ff.md5 new file mode 100644 index 0000000..34f2163 --- /dev/null +++ b/bingo-auditivo/.godot/imported/Fondo.png-90ffc355f5eaeb5a9d9680e0d0d619ff.md5 @@ -0,0 +1,3 @@ +source_md5="b7ed27b8733ac3938ea97b6f62f03fe2" +dest_md5="078c2aa3879e5d8fb05a4a95d08f28cb" + diff --git a/bingo-auditivo/.godot/imported/fondo.png-ba70bfea8a1397320d702391fbab30ab.md5 b/bingo-auditivo/.godot/imported/fondo.png-ba70bfea8a1397320d702391fbab30ab.md5 new file mode 100644 index 0000000..c63b0de --- /dev/null +++ b/bingo-auditivo/.godot/imported/fondo.png-ba70bfea8a1397320d702391fbab30ab.md5 @@ -0,0 +1,3 @@ +source_md5="13fa9399ff066d872ef7b61ab16b2e73" +dest_md5="3bf30b72728e17e5b7b4f06796930ccd" + diff --git a/bingo-auditivo/.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex b/bingo-auditivo/.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex new file mode 100644 index 0000000..6e1d156 Binary files /dev/null and b/bingo-auditivo/.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex differ diff --git a/bingo-auditivo/.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.md5 b/bingo-auditivo/.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.md5 new file mode 100644 index 0000000..a505ba5 --- /dev/null +++ b/bingo-auditivo/.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.md5 @@ -0,0 +1,3 @@ +source_md5="0eed98577cbbf02f0bdc0f5c9f70465b" +dest_md5="b48bef1f2eefdd190e0a3e60a6188d75" + diff --git a/bingo-auditivo/.godot/imported/preview.png-b4838d23de224c84c7c9b5588b6708a6.md5 b/bingo-auditivo/.godot/imported/preview.png-b4838d23de224c84c7c9b5588b6708a6.md5 new file mode 100644 index 0000000..0a8db4b --- /dev/null +++ b/bingo-auditivo/.godot/imported/preview.png-b4838d23de224c84c7c9b5588b6708a6.md5 @@ -0,0 +1 @@ +source_md5="5bf73d4812f73436c189095565252ae2" diff --git a/bingo-auditivo/.godot/imported/preview.webp-fe51262e5f2fea58a9703bfa87c6028a.md5 b/bingo-auditivo/.godot/imported/preview.webp-fe51262e5f2fea58a9703bfa87c6028a.md5 new file mode 100644 index 0000000..9e2a6c7 --- /dev/null +++ b/bingo-auditivo/.godot/imported/preview.webp-fe51262e5f2fea58a9703bfa87c6028a.md5 @@ -0,0 +1,3 @@ +source_md5="5bf73d4812f73436c189095565252ae2" +dest_md5="8be7e08267d2e327926b679322f9196c" + diff --git a/bingo-auditivo/.godot/scene_groups_cache.cfg b/bingo-auditivo/.godot/scene_groups_cache.cfg new file mode 100644 index 0000000..e69de29 diff --git a/bingo-auditivo/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/1975435a9f21605e984ea4e75fa9cba591aa0cb4.cache b/bingo-auditivo/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/1975435a9f21605e984ea4e75fa9cba591aa0cb4.cache new file mode 100644 index 0000000..396a548 Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/1975435a9f21605e984ea4e75fa9cba591aa0cb4.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache b/bingo-auditivo/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache new file mode 100644 index 0000000..64848e3 Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/b547968aa19902bd49de94fd81aaa8c91331c7dc.cache b/bingo-auditivo/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/b547968aa19902bd49de94fd81aaa8c91331c7dc.cache new file mode 100644 index 0000000..c3981bb Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/b547968aa19902bd49de94fd81aaa8c91331c7dc.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/CopyShaderGLES3/4a6d88e051e338749bc077a2be54e2f26629726cf8cffc05d81cf405b38271cd/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache b/bingo-auditivo/.godot/shader_cache/CopyShaderGLES3/4a6d88e051e338749bc077a2be54e2f26629726cf8cffc05d81cf405b38271cd/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache new file mode 100644 index 0000000..4f05b72 Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/CopyShaderGLES3/4a6d88e051e338749bc077a2be54e2f26629726cf8cffc05d81cf405b38271cd/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/CubemapFilterShaderGLES3/1a9c0f0a824c08b2ed3d3d1a83db1f9b02a15b1507d958b269b2123bb9fb6718/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache b/bingo-auditivo/.godot/shader_cache/CubemapFilterShaderGLES3/1a9c0f0a824c08b2ed3d3d1a83db1f9b02a15b1507d958b269b2123bb9fb6718/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache new file mode 100644 index 0000000..b4ea520 Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/CubemapFilterShaderGLES3/1a9c0f0a824c08b2ed3d3d1a83db1f9b02a15b1507d958b269b2123bb9fb6718/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/FeedShaderGLES3/ca9ea867fbe4d4dec3f5de7f7ad6c6269fb8b2911577775ee4b9edf436176155/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache b/bingo-auditivo/.godot/shader_cache/FeedShaderGLES3/ca9ea867fbe4d4dec3f5de7f7ad6c6269fb8b2911577775ee4b9edf436176155/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache new file mode 100644 index 0000000..fce601e Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/FeedShaderGLES3/ca9ea867fbe4d4dec3f5de7f7ad6c6269fb8b2911577775ee4b9edf436176155/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/PostShaderGLES3/12553f92a73030e5ff9d59ecf1c6cc6435e4986122d4585e18c3adf1006c037c/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache b/bingo-auditivo/.godot/shader_cache/PostShaderGLES3/12553f92a73030e5ff9d59ecf1c6cc6435e4986122d4585e18c3adf1006c037c/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache new file mode 100644 index 0000000..6c667c4 Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/PostShaderGLES3/12553f92a73030e5ff9d59ecf1c6cc6435e4986122d4585e18c3adf1006c037c/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/SceneShaderGLES3/b2c6e78a8624ffb0f53ed89b679f23b0a7e437c8cdc3564e1956cb75c0651444/0c9689a7dae2d011729a1e2cf29c71ecb4a7e8bb.cache b/bingo-auditivo/.godot/shader_cache/SceneShaderGLES3/b2c6e78a8624ffb0f53ed89b679f23b0a7e437c8cdc3564e1956cb75c0651444/0c9689a7dae2d011729a1e2cf29c71ecb4a7e8bb.cache new file mode 100644 index 0000000..bd402f9 Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/SceneShaderGLES3/b2c6e78a8624ffb0f53ed89b679f23b0a7e437c8cdc3564e1956cb75c0651444/0c9689a7dae2d011729a1e2cf29c71ecb4a7e8bb.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/SceneShaderGLES3/b2c6e78a8624ffb0f53ed89b679f23b0a7e437c8cdc3564e1956cb75c0651444/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache b/bingo-auditivo/.godot/shader_cache/SceneShaderGLES3/b2c6e78a8624ffb0f53ed89b679f23b0a7e437c8cdc3564e1956cb75c0651444/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache new file mode 100644 index 0000000..392e4bf Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/SceneShaderGLES3/b2c6e78a8624ffb0f53ed89b679f23b0a7e437c8cdc3564e1956cb75c0651444/6bb7c9a2fd1c4a8fa77cb96555b9b4a720209981.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/SceneShaderGLES3/b2c6e78a8624ffb0f53ed89b679f23b0a7e437c8cdc3564e1956cb75c0651444/e4803059b59d245bee29da2f87c302ecb830c09e.cache b/bingo-auditivo/.godot/shader_cache/SceneShaderGLES3/b2c6e78a8624ffb0f53ed89b679f23b0a7e437c8cdc3564e1956cb75c0651444/e4803059b59d245bee29da2f87c302ecb830c09e.cache new file mode 100644 index 0000000..17c3418 Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/SceneShaderGLES3/b2c6e78a8624ffb0f53ed89b679f23b0a7e437c8cdc3564e1956cb75c0651444/e4803059b59d245bee29da2f87c302ecb830c09e.cache differ diff --git a/bingo-auditivo/.godot/shader_cache/SkyShaderGLES3/078825d0a6229457efab74068bb5a2d1c7d61b88ec492d02c5434a62f384849b/851ad615ab5772632d2dd49f5447ff21ea10b2fe.cache b/bingo-auditivo/.godot/shader_cache/SkyShaderGLES3/078825d0a6229457efab74068bb5a2d1c7d61b88ec492d02c5434a62f384849b/851ad615ab5772632d2dd49f5447ff21ea10b2fe.cache new file mode 100644 index 0000000..1a6355f Binary files /dev/null and b/bingo-auditivo/.godot/shader_cache/SkyShaderGLES3/078825d0a6229457efab74068bb5a2d1c7d61b88ec492d02c5434a62f384849b/851ad615ab5772632d2dd49f5447ff21ea10b2fe.cache differ diff --git a/bingo-auditivo/.godot/uid_cache.bin b/bingo-auditivo/.godot/uid_cache.bin new file mode 100644 index 0000000..63d149f Binary files /dev/null and b/bingo-auditivo/.godot/uid_cache.bin differ diff --git a/bingo-auditivo/Fondo.png b/bingo-auditivo/Fondo.png new file mode 100644 index 0000000..f93febe Binary files /dev/null and b/bingo-auditivo/Fondo.png differ diff --git a/bingo-auditivo/Fondo.png.import b/bingo-auditivo/Fondo.png.import new file mode 100644 index 0000000..df23193 --- /dev/null +++ b/bingo-auditivo/Fondo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bhjl7furxm0dv" +path="res://.godot/imported/Fondo.png-90ffc355f5eaeb5a9d9680e0d0d619ff.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Fondo.png" +dest_files=["res://.godot/imported/Fondo.png-90ffc355f5eaeb5a9d9680e0d0d619ff.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/bingo-auditivo/audio/Elefant.mp3 b/bingo-auditivo/audio/Elefant.mp3 new file mode 100644 index 0000000..9e1d021 Binary files /dev/null and b/bingo-auditivo/audio/Elefant.mp3 differ diff --git a/bingo-auditivo/audio/Elefant.mp3.import b/bingo-auditivo/audio/Elefant.mp3.import new file mode 100644 index 0000000..3725892 --- /dev/null +++ b/bingo-auditivo/audio/Elefant.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://p16ch53umcvi" +path="res://.godot/imported/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.mp3str" + +[deps] + +source_file="res://audio/Elefant.mp3" +dest_files=["res://.godot/imported/Elefant.mp3-e3e5c8488a65256c22d6f79b59243fe7.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/bingo-auditivo/icon.svg b/bingo-auditivo/icon.svg new file mode 100644 index 0000000..9d8b7fa --- /dev/null +++ b/bingo-auditivo/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bingo-auditivo/icon.svg.import b/bingo-auditivo/icon.svg.import new file mode 100644 index 0000000..834f6c5 --- /dev/null +++ b/bingo-auditivo/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cd4nfs4di62lg" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/bingo-auditivo/project.godot b/bingo-auditivo/project.godot new file mode 100644 index 0000000..c80004c --- /dev/null +++ b/bingo-auditivo/project.godot @@ -0,0 +1,32 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Bingo Auditivo" +run/main_scene="uid://orghy6w50dfb" +config/features=PackedStringArray("4.4", "GL Compatibility") +config/icon="res://icon.svg" + +[autoload] + +ScreenManager="*res://scripts/screen_manager.gd" +GameData="*res://scripts/game_data.gd" + +[display] + +window/size/viewport_width=1920 +window/size/viewport_height=1080 +window/stretch/mode="viewport" + +[rendering] + +renderer/rendering_method="gl_compatibility" +renderer/rendering_method.mobile="gl_compatibility" diff --git a/bingo-auditivo/scenes/configuration.tscn b/bingo-auditivo/scenes/configuration.tscn new file mode 100644 index 0000000..c5b7b13 --- /dev/null +++ b/bingo-auditivo/scenes/configuration.tscn @@ -0,0 +1,119 @@ +[gd_scene load_steps=5 format=3 uid="uid://orghy6w50dfb"] + +[ext_resource type="Script" uid="uid://e41ws6j00o5" path="res://scripts/configuration.gd" id="1_hc4xr"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hc4xr"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7wcdq"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lditi"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[node name="Configuration" type="Control"] +layout_mode = 3 +anchors_preset = 0 +script = ExtResource("1_hc4xr") + +[node name="Window" type="Window" parent="."] +initial_position = 1 +size = Vector2i(500, 230) + +[node name="ColorRect" type="ColorRect" parent="Window"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.8, 0.8, 0.8, 1) + +[node name="VBoxContainer" type="VBoxContainer" parent="Window"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -200.0 +offset_top = -99.0 +offset_right = 200.0 +offset_bottom = 101.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 10 + +[node name="Label" type="Label" parent="Window/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +text = "Correo electronico:" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="EmailInput" type="LineEdit" parent="Window/VBoxContainer"] +custom_minimum_size = Vector2(400, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_styles/normal = SubResource("StyleBoxFlat_hc4xr") + +[node name="Label2" type="Label" parent="Window/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +text = "Contraseña:" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="PasswordInput" type="LineEdit" parent="Window/VBoxContainer"] +custom_minimum_size = Vector2(400, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_styles/normal = SubResource("StyleBoxFlat_7wcdq") + +[node name="LogInButton" type="Button" parent="Window/VBoxContainer"] +custom_minimum_size = Vector2(250, 50) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_styles/normal = SubResource("StyleBoxFlat_lditi") +text = "Iniciar sesion" + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "CONFIGURACIÓN" + +[node name="Label2" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "Selecciona los jugadores" + +[node name="MenuButton" type="MenuButton" parent="VBoxContainer"] +layout_mode = 2 +text = "Jugadores" +flat = false + +[node name="Label3" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "Jugadores seleccionados" + +[node name="FlowContainer" type="FlowContainer" parent="VBoxContainer"] +layout_mode = 2 + +[node name="PlayButton" type="Button" parent="VBoxContainer"] +layout_mode = 2 +text = "Empezar juego" + +[node name="Bloqueador" type="ColorRect" parent="."] +layout_mode = 1 +offset_right = 1920.0 +offset_bottom = 1080.0 +color = Color(0.196078, 0.309804, 0.368627, 0.784314) + +[connection signal="pressed" from="Window/VBoxContainer/LogInButton" to="." method="_on_log_in_button_pressed"] +[connection signal="pressed" from="VBoxContainer/PlayButton" to="." method="_on_play_button_pressed"] diff --git a/bingo-auditivo/scenes/configuration.tscn1984918061.tmp b/bingo-auditivo/scenes/configuration.tscn1984918061.tmp new file mode 100644 index 0000000..c7dda11 --- /dev/null +++ b/bingo-auditivo/scenes/configuration.tscn1984918061.tmp @@ -0,0 +1,61 @@ +[gd_scene load_steps=2 format=3 uid="uid://orghy6w50dfb"] + +[ext_resource type="Script" uid="uid://e41ws6j00o5" path="res://scripts/configuration.gd" id="1_hc4xr"] + +[node name="Configuration" type="Node2D"] +script = ExtResource("1_hc4xr") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "CONFIGURACIÓN" + +[node name="Label2" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "Selecciona los jugadores" + +[node name="MenuButton" type="MenuButton" parent="VBoxContainer"] +layout_mode = 2 +text = "Jugadores" +flat = false + +[node name="Label3" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "Jugadores seleccionados" + +[node name="FlowContainer" type="FlowContainer" parent="VBoxContainer"] +layout_mode = 2 + +[node name="PlayButton" type="Button" parent="VBoxContainer"] +layout_mode = 2 +text = "Empezar juego" + +[node name="Window" type="Window" parent="."] + +[node name="Label" type="Label" parent="Window"] +offset_right = 40.0 +offset_bottom = 23.0 +text = "Correo electronico" + +[node name="EmailInput" type="LineEdit" parent="Window"] +offset_right = 68.5625 +offset_bottom = 31.0 + +[node name="Label2" type="Label" parent="Window"] +offset_right = 40.0 +offset_bottom = 23.0 +text = "Contraseña +" + +[node name="PasswordInput" type="LineEdit" parent="Window"] +offset_right = 68.5625 +offset_bottom = 31.0 + +[node name="LogInButton" type="Button" parent="Window"] +offset_right = 8.0 +offset_bottom = 8.0 + +[connection signal="pressed" from="VBoxContainer/PlayButton" to="." method="_on_play_button_pressed"] diff --git a/bingo-auditivo/scenes/configuration.tscn1994133237.tmp b/bingo-auditivo/scenes/configuration.tscn1994133237.tmp new file mode 100644 index 0000000..c7dda11 --- /dev/null +++ b/bingo-auditivo/scenes/configuration.tscn1994133237.tmp @@ -0,0 +1,61 @@ +[gd_scene load_steps=2 format=3 uid="uid://orghy6w50dfb"] + +[ext_resource type="Script" uid="uid://e41ws6j00o5" path="res://scripts/configuration.gd" id="1_hc4xr"] + +[node name="Configuration" type="Node2D"] +script = ExtResource("1_hc4xr") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "CONFIGURACIÓN" + +[node name="Label2" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "Selecciona los jugadores" + +[node name="MenuButton" type="MenuButton" parent="VBoxContainer"] +layout_mode = 2 +text = "Jugadores" +flat = false + +[node name="Label3" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "Jugadores seleccionados" + +[node name="FlowContainer" type="FlowContainer" parent="VBoxContainer"] +layout_mode = 2 + +[node name="PlayButton" type="Button" parent="VBoxContainer"] +layout_mode = 2 +text = "Empezar juego" + +[node name="Window" type="Window" parent="."] + +[node name="Label" type="Label" parent="Window"] +offset_right = 40.0 +offset_bottom = 23.0 +text = "Correo electronico" + +[node name="EmailInput" type="LineEdit" parent="Window"] +offset_right = 68.5625 +offset_bottom = 31.0 + +[node name="Label2" type="Label" parent="Window"] +offset_right = 40.0 +offset_bottom = 23.0 +text = "Contraseña +" + +[node name="PasswordInput" type="LineEdit" parent="Window"] +offset_right = 68.5625 +offset_bottom = 31.0 + +[node name="LogInButton" type="Button" parent="Window"] +offset_right = 8.0 +offset_bottom = 8.0 + +[connection signal="pressed" from="VBoxContainer/PlayButton" to="." method="_on_play_button_pressed"] diff --git a/bingo-auditivo/scenes/configuration.tscn2039452446.tmp b/bingo-auditivo/scenes/configuration.tscn2039452446.tmp new file mode 100644 index 0000000..bdfbdaf --- /dev/null +++ b/bingo-auditivo/scenes/configuration.tscn2039452446.tmp @@ -0,0 +1,61 @@ +[gd_scene load_steps=2 format=3 uid="uid://orghy6w50dfb"] + +[ext_resource type="Script" uid="uid://e41ws6j00o5" path="res://scripts/configuration.gd" id="1_hc4xr"] + +[node name="Configuration" type="Node2D"] +script = ExtResource("1_hc4xr") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "CONFIGURACIÓN" + +[node name="Label2" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "Selecciona los jugadores" + +[node name="MenuButton" type="MenuButton" parent="VBoxContainer"] +layout_mode = 2 +text = "Jugadores" +flat = false + +[node name="Label3" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "Jugadores seleccionados" + +[node name="FlowContainer" type="FlowContainer" parent="VBoxContainer"] +layout_mode = 2 + +[node name="PlayButton" type="Button" parent="VBoxContainer"] +layout_mode = 2 +text = "Empezar juego" + +[node name="Window" type="Window" parent="."] +initial_position = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="Window"] +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="Window/VBoxContainer"] +layout_mode = 2 +text = "Correo electronico" + +[node name="EmailInput" type="LineEdit" parent="Window/VBoxContainer"] +layout_mode = 2 + +[node name="Label2" type="Label" parent="Window/VBoxContainer"] +layout_mode = 2 +text = "Contraseña +" + +[node name="PasswordInput" type="LineEdit" parent="Window/VBoxContainer"] +layout_mode = 2 + +[node name="LogInButton" type="Button" parent="Window/VBoxContainer"] +layout_mode = 2 + +[connection signal="pressed" from="VBoxContainer/PlayButton" to="." method="_on_play_button_pressed"] diff --git a/bingo-auditivo/scenes/game.tscn b/bingo-auditivo/scenes/game.tscn new file mode 100644 index 0000000..fca5b96 --- /dev/null +++ b/bingo-auditivo/scenes/game.tscn @@ -0,0 +1,136 @@ +[gd_scene load_steps=8 format=3 uid="uid://c466swcqlfwtj"] + +[ext_resource type="Script" uid="uid://dhqnf0xm2mwwm" path="res://scripts/game.gd" id="1_uwrxv"] +[ext_resource type="Texture2D" uid="uid://bhjl7furxm0dv" path="res://Fondo.png" id="2_yqjtg"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yqjtg"] +bg_color = Color(0.926771, 0.375165, 0.614248, 0.909804) +corner_radius_top_left = 60 +corner_radius_top_right = 60 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lnu2h"] +bg_color = Color(0, 0.718972, 0.352325, 1) +corner_radius_bottom_left = 60 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lbhrr"] +bg_color = Color(0.901268, 0.463041, 0.139193, 1) +corner_radius_bottom_right = 60 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_iywne"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p57ef"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[node name="Game" type="Control"] +layout_mode = 3 +anchors_preset = 0 +script = ExtResource("1_uwrxv") + +[node name="TextureRect" type="TextureRect" parent="."] +layout_mode = 0 +offset_right = 1920.0 +offset_bottom = 1080.0 +texture = ExtResource("2_yqjtg") +expand_mode = 1 +stretch_mode = 6 +flip_h = true + +[node name="AnimalAudio" type="AudioStreamPlayer2D" parent="."] + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 0 +offset_left = 502.0 +offset_top = 267.0 +offset_right = 1585.0 +offset_bottom = 794.0 + +[node name="NextSoundButton" type="Button" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_font_sizes/font_size = 50 +theme_override_styles/normal = SubResource("StyleBoxFlat_yqjtg") +text = "Reproducir sonido" + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="RepeatSoundButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 40 +theme_override_styles/normal = SubResource("StyleBoxFlat_lnu2h") +text = "Repetir sonido" + +[node name="EndOfGameButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 40 +theme_override_styles/normal = SubResource("StyleBoxFlat_lbhrr") +text = "Fin de partida" + +[node name="WinnerSelector" type="Window" parent="."] +initial_position = 1 +size = Vector2i(500, 200) +visible = false + +[node name="ColorRect" type="ColorRect" parent="WinnerSelector"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.8, 0.8, 0.8, 1) + +[node name="VBoxContainer" type="VBoxContainer" parent="WinnerSelector"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -225.0 +offset_top = -56.0 +offset_right = 225.0 +offset_bottom = 56.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 30 + +[node name="Label" type="Label" parent="WinnerSelector/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +text = "¿Quien a ganado?" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="MenuPlayers" type="MenuButton" parent="WinnerSelector/VBoxContainer"] +custom_minimum_size = Vector2(450, 30) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_iywne") +text = "Jugadores 🡣" +flat = false + +[node name="Button" type="Button" parent="WinnerSelector/VBoxContainer"] +custom_minimum_size = Vector2(250, 50) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_styles/normal = SubResource("StyleBoxFlat_p57ef") +text = "Finalizar partida" + +[node name="Bloqueador" type="ColorRect" parent="."] +visible = false +layout_mode = 1 +offset_right = 1920.0 +offset_bottom = 1080.0 +color = Color(0.196078, 0.309804, 0.368627, 0.784314) + +[connection signal="pressed" from="VBoxContainer/NextSoundButton" to="." method="_on_next_sound_button_pressed"] +[connection signal="pressed" from="VBoxContainer/HBoxContainer/RepeatSoundButton" to="." method="_on_repeat_sound_button_pressed"] +[connection signal="pressed" from="VBoxContainer/HBoxContainer/EndOfGameButton" to="." method="_on_end_of_game_button_pressed"] +[connection signal="pressed" from="WinnerSelector/VBoxContainer/Button" to="." method="_on_winner_button_pressed"] diff --git a/bingo-auditivo/scripts/configuration.gd b/bingo-auditivo/scripts/configuration.gd new file mode 100644 index 0000000..a12fa4d --- /dev/null +++ b/bingo-auditivo/scripts/configuration.gd @@ -0,0 +1,91 @@ +extends Control + +@onready var login_popup = $Window +@onready var email_input = $Window/VBoxContainer/EmailInput +@onready var password_input = $Window/VBoxContainer/PasswordInput + +@onready var players_menu = $VBoxContainer/MenuButton +@onready var seleccionados_container = $VBoxContainer/FlowContainer +@onready var play_button = $VBoxContainer/PlayButton + +var todos_los_jugadores = [] +var jugadores_disponibles = [] +var jugadores_seleccionados = [] + +func _ready(): + await get_tree().process_frame # Esperar a que todo esté listo + if GameData.id_user == -1: + login_popup.show() + $Bloqueador.visible = true + + todos_los_jugadores = await GameData.get_residents_loaded() + jugadores_disponibles = todos_los_jugadores.duplicate() + _actualizar_menu() + players_menu.get_popup().connect("id_pressed", Callable(self, "_on_jugador_seleccionado")) + +func _on_log_in_button_pressed(): + var users = await GameData.get_users_loaded() + var username = email_input.text.strip_edges() + var password = password_input.text.strip_edges() + + for user in users: + if user.email == username: + GameData.id_user = int(user.id) + login_popup.hide() + $Bloqueador.visible = false + break + + if GameData.id_user == -1: + email_input.clear() + password_input.clear() + + # Color rojo en el borde o texto + email_input.add_theme_color_override("font_color", Color.RED) + password_input.add_theme_color_override("font_color", Color.RED) + +func _actualizar_menu(): + var popup = players_menu.get_popup() + popup.clear() + for i in jugadores_disponibles.size(): + popup.add_item(jugadores_disponibles[i].nombre, i) + +func _on_jugador_seleccionado(index: int): + var jugador = jugadores_disponibles[index] + jugadores_seleccionados.append(jugador) + jugadores_disponibles.erase(jugador) + _actualizar_menu() + _agregar_jugador_visual(jugador.nombre) + + +func _agregar_jugador_visual(nombre: String): + var boton = Button.new() + boton.text = nombre + " ❌" + boton.name = nombre + boton.pressed.connect(Callable(self, "_quitar_jugador").bind(nombre)) + seleccionados_container.add_child(boton) + +func _quitar_jugador(nombre: String): + # Quitar de la vista + var boton = seleccionados_container.get_node(nombre) + if boton: + seleccionados_container.remove_child(boton) + boton.queue_free() + + # Buscar el jugador por nombre + for jugador in jugadores_seleccionados: + if jugador.nombre == nombre: + jugadores_seleccionados.erase(jugador) + jugadores_disponibles.append(jugador) + break + + jugadores_disponibles.sort_custom(func(a, b): return a.nombre < b.nombre) + _actualizar_menu() + +func _on_play_button_pressed(): + var game_scene = preload("res://scenes/game.tscn").instantiate() + #Validar que selecciona almenos un jugador, sino mostrar popup informando + game_scene.jugadores_seleccionados = jugadores_seleccionados + + for jugador in jugadores_seleccionados: + GameData.start_game(jugador.id, null) + ScreenManager.change_scene(game_scene, self) diff --git a/bingo-auditivo/scripts/configuration.gd.uid b/bingo-auditivo/scripts/configuration.gd.uid new file mode 100644 index 0000000..490f02d --- /dev/null +++ b/bingo-auditivo/scripts/configuration.gd.uid @@ -0,0 +1 @@ +uid://e41ws6j00o5 diff --git a/bingo-auditivo/scripts/game.gd b/bingo-auditivo/scripts/game.gd new file mode 100644 index 0000000..bcab1c7 --- /dev/null +++ b/bingo-auditivo/scripts/game.gd @@ -0,0 +1,56 @@ +extends Control + +@onready var next_sound_button = $VBoxContainer/NextSoundButton +@onready var repeat_sound_button = $VBoxContainer/HBoxContainer/RepeatSoundButton +@onready var end_of_game_button = $VBoxContainer/HBoxContainer/EndOfGameButton + +@onready var winner_selector = $WinnerSelector +@onready var menu_players = $WinnerSelector/VBoxContainer/MenuPlayers + +var animales = [ + { "nombre": "Elfante", "sonido": preload("res://audio/Elefant.mp3") }, + +] +var animales_restantes = [] +var sound_just_played + +@export var jugadores_seleccionados = [] +var ganador = -1 + +func _ready(): + animales_restantes = animales.duplicate() + randomize() + +func _on_next_sound_button_pressed(): + if animales_restantes.is_empty(): + print("¡Todos los sonidos han sido usados!") + return + + var index = randi() % animales_restantes.size() + var animal = animales_restantes[index] + sound_just_played = animal + + # Reproduce el sonido + $AnimalAudio.stream = animal["sonido"] + $AnimalAudio.play() + + animales_restantes.erase(index) + +func _on_repeat_sound_button_pressed(): + $AnimalAudio.stream = sound_just_played["sonido"] + $AnimalAudio.play() + +func _on_end_of_game_button_pressed(): + for i in jugadores_seleccionados.size(): + menu_players.get_popup().add_item(jugadores_seleccionados[i].nombre, i) + menu_players.get_popup().connect("id_pressed", Callable(self, "_on_jugador_seleccionado")) + winner_selector.show() + $Bloqueador.visible = true + +func _on_jugador_seleccionado(index: int): + ganador = jugadores_seleccionados[index].id + +func _on_winner_button_pressed(): + if ganador != -1: + GameData.end_game(ganador) + ScreenManager.go_back_to_previous_scene() diff --git a/bingo-auditivo/scripts/game.gd.uid b/bingo-auditivo/scripts/game.gd.uid new file mode 100644 index 0000000..54f9ecc --- /dev/null +++ b/bingo-auditivo/scripts/game.gd.uid @@ -0,0 +1 @@ +uid://dhqnf0xm2mwwm diff --git a/bingo-auditivo/scripts/game_data.gd b/bingo-auditivo/scripts/game_data.gd new file mode 100644 index 0000000..d131b2f --- /dev/null +++ b/bingo-auditivo/scripts/game_data.gd @@ -0,0 +1,220 @@ +extends Node +# Este script se encarga de comunicarse con la API + +#Señales para saber cuando se recibe los datos +signal users_received(users) +signal residents_received(residents) +signal games_received(games) + +var all_users = [] +var all_residents = [] +var all_games = [] + +var resident_playing = -1 +var start_time: int = 0 +var end_time: int = 0 +var level_game = -1 +var id_user = -1 + +var partidas_activas: Array = [] + + +### Metodo para inicar partida +func start_game(resident, level): + var partida = { + "idUsuario": id_user, + "idResidente": resident, + "start_time": Time.get_unix_time_from_system(), + "nivel": level + } + partidas_activas.append(partida) + +### Metodo para finalizar partida +func end_game(ganador): + var end_time = Time.get_unix_time_from_system() + + var games = await get_games_loaded() + var game_id = 0; + for game in games: + if game.nombre == "Bingo auditivo": + game_id = 3 #game.id + + for partida in partidas_activas: + var fallos = 0 + if partida["idResidente"] == ganador: + fallos = 1 + var duracion: int = end_time - partida["start_time"] + + var data = { + "idJuego": game_id, + "idResidente": partida["idResidente"], + "idUsuario": partida["idUsuario"], + "fallos": fallos, + "duracion": duracion, + "dificultad": partida["nivel"] + } + + send_game_data(data) + + partidas_activas.clear() + +### Metodo para calcular la duracion entre el incio y el final de la partida (en segundos) +func get_duration() -> int: + return end_time - start_time + +#-------------------------------------GET USERS------------------------------------------------------- + +func get_users(): + var http_request = HTTPRequest.new() + get_tree().root.add_child(http_request) + + var status = http_request.connect( + "request_completed", + Callable(self, "_on_request_get_users").bind(http_request) + ) + + var url = "http://localhost:8080/resi/users" + var headers = ["User-Agent: Godot"] + var error = http_request.request(url, headers) + + if error != OK: + print("Error al hacer GET:", error) + +### Metodo para parsear json de residentes y que emite una señal cuando lo tenga +func _on_request_get_users(result, response_code, headers, body, request_node): + print("Código de respuesta:", response_code) + + if response_code == 200: + var response_text = body.get_string_from_utf8() + var parsed = JSON.parse_string(response_text) + + if parsed != null: + all_users = parsed + print("Users obtenidos:", all_users) + + # Emitir la señal para notificar a quien esté conectado + emit_signal("users_received", all_users) + else: + print("Error al parsear JSON") + else: + print("Error del servidor o conexión:", response_code) + + request_node.queue_free() # Liberar para evitar error 31 + +### Metodo que espera a la señal de que se han obtenido y parseado los residentes y los devuelve. +func get_users_loaded() -> Array: + print("Hola") + get_users() + var result = await self.users_received + return result + +#--------------------------------------GET RESIDENTES----------------------------------------------- + +### Metodo para hacer un get a la api de todos los residentes +func get_residents(): + var http_request = HTTPRequest.new() + get_tree().root.add_child(http_request) + + var status = http_request.connect( + "request_completed", + Callable(self, "_on_request_get_residents").bind(http_request) + ) + + var url = "http://localhost:8080/resi/residents" + var headers = ["User-Agent: Godot"] + var error = http_request.request(url, headers) + + if error != OK: + print("Error al hacer GET:", error) + +### Metodo para parsear json de residentes y que emite una señal cuando lo tenga +func _on_request_get_residents(result, response_code, headers, body, request_node): + print("Código de respuesta:", response_code) + + if response_code == 200: + var response_text = body.get_string_from_utf8() + var parsed = JSON.parse_string(response_text) + + if parsed != null: + all_residents = parsed + print("Residentes obtenidos:", all_residents) + + # Emitir la señal para notificar a quien esté conectado + emit_signal("residents_received", all_residents) + else: + print("Error al parsear JSON") + else: + print("Error del servidor o conexión:", response_code) + + request_node.queue_free() # Liberar para evitar error 31 + +### Metodo que espera a la señal de que se han obtenido y parseado los residentes y los devuelve. +func get_residents_loaded() -> Array: + get_residents() + var result = await self.residents_received + return result + + +# ----------------------------- GET JUEGOS -------------------------------------------- +func get_games(): + var http_request = HTTPRequest.new() + get_tree().root.add_child(http_request) + + var status = http_request.connect( + "request_completed", + Callable(self, "_on_request_get_games").bind(http_request) + ) + + var url = "http://localhost:8080/resi/juegos" + var headers = ["User-Agent: Godot"] + var error = http_request.request(url, headers) + + if error != OK: + print("Error al hacer GET en juegos:", error) + +### Metodo para parsear json de residentes y que emite una señal cuando lo tenga +func _on_request_get_games(result, response_code, headers, body, request_node): + print("Código de respuesta en juegos:", response_code) + + if response_code == 200: + var response_text = body.get_string_from_utf8() + var parsed = JSON.parse_string(response_text) + + if parsed != null: + all_games = parsed + print("Juegos obtenidos:", all_games) + + # Emitir la señal para notificar a quien esté conectado + emit_signal("games_received", all_games) + else: + print("Error al parsear JSON de juegos") + else: + print("Error del servidor o conexión en juegos:", response_code) + + request_node.queue_free() # Liberar para evitar error 31 + +### Metodo que espera a la señal de que se han obtenido y parseado los residentes y los devuelve. +func get_games_loaded() -> Array: + get_games() + var result = await self.games_received + return result + + + +# ------------------------------- POST PARTIDA ------------------------------------ + +func send_game_data(data: Dictionary): + var http_request = HTTPRequest.new() + get_tree().root.add_child(http_request) + + var json_body = JSON.stringify(data) + var headers = ["Content-Type: application/json"] + var url = "http://localhost:8080/resi/juegos/stats/add" + + http_request.connect("request_completed", Callable(self, "_on_game_data_sent").bind(http_request)) + var error = http_request.request(url, headers, HTTPClient.METHOD_POST, json_body) + + if error != OK: + print("Error al enviar los datos:", error) + + diff --git a/bingo-auditivo/scripts/game_data.gd.uid b/bingo-auditivo/scripts/game_data.gd.uid new file mode 100644 index 0000000..016896b --- /dev/null +++ b/bingo-auditivo/scripts/game_data.gd.uid @@ -0,0 +1 @@ +uid://bj0rbb7d8ojgf diff --git a/seguir-la-linea/Screen_manager.gd b/bingo-auditivo/scripts/screen_manager.gd similarity index 100% rename from seguir-la-linea/Screen_manager.gd rename to bingo-auditivo/scripts/screen_manager.gd diff --git a/bingo-auditivo/scripts/screen_manager.gd.uid b/bingo-auditivo/scripts/screen_manager.gd.uid new file mode 100644 index 0000000..c89a2e3 --- /dev/null +++ b/bingo-auditivo/scripts/screen_manager.gd.uid @@ -0,0 +1 @@ +uid://uiq7fem2cocj diff --git a/empareja-las-sombras/.godot/editor/Configuration.tscn-editstate-9342d86e93843c4fab70a2c0224d3fd3.cfg b/empareja-las-sombras/.godot/editor/Configuration.tscn-editstate-9342d86e93843c4fab70a2c0224d3fd3.cfg index a925a12..6def080 100644 --- a/empareja-las-sombras/.godot/editor/Configuration.tscn-editstate-9342d86e93843c4fab70a2c0224d3fd3.cfg +++ b/empareja-las-sombras/.godot/editor/Configuration.tscn-editstate-9342d86e93843c4fab70a2c0224d3fd3.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-115.402, 74.5408), +"ofs": Vector2(-555.679, -77.392), "primary_grid_step": Vector2i(8, 8), "show_group_gizmos": true, "show_guides": true, @@ -34,7 +34,7 @@ Anim={ "snap_rotation_step": 0.261799, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 0.683013 +"zoom": 0.466507 } 3D={ "fov": 70.01, @@ -192,4 +192,4 @@ Game={ "hide_selection": false, "select_mode": 0 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Node2D")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Configuration")]) diff --git a/empareja-las-sombras/.godot/editor/Configuration.tscn-folding-9342d86e93843c4fab70a2c0224d3fd3.cfg b/empareja-las-sombras/.godot/editor/Configuration.tscn-folding-9342d86e93843c4fab70a2c0224d3fd3.cfg index c6978ed..0363a62 100644 --- a/empareja-las-sombras/.godot/editor/Configuration.tscn-folding-9342d86e93843c4fab70a2c0224d3fd3.cfg +++ b/empareja-las-sombras/.godot/editor/Configuration.tscn-folding-9342d86e93843c4fab70a2c0224d3fd3.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[NodePath("VBoxContainer/bg_color_picker"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("VBoxContainer/tiles_lines_color_picker"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("VBoxContainer/table_lines_color_picker"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("VBoxContainer/levels_menu"), PackedStringArray("item_count_array")] -resource_unfolds=[] -nodes_folded=[] +node_unfolds=[NodePath("."), PackedStringArray("Layout"), NodePath("MarginContainer"), PackedStringArray("Layout", "Layout/Transform", "Theme Overrides", "Theme Overrides/constants"), NodePath("MarginContainer/VBoxContainer"), PackedStringArray("Layout", "Visibility", "Theme Overrides/constants", "Layout/Transform"), NodePath("MarginContainer/VBoxContainer/Label6"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors", "Layout", "Layout/Container Sizing"), NodePath("MarginContainer/VBoxContainer/Label"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors", "Theme Overrides/fonts"), NodePath("MarginContainer/VBoxContainer/residents_menu"), PackedStringArray("Layout", "Theme", "Theme Overrides", "Layout/Container Sizing", "theme_override_styles/normal"), NodePath("MarginContainer/VBoxContainer/Label2"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/bg_color_picker"), PackedStringArray("Layout", "Layout/Container Sizing", "Layout/Transform", "Theme Overrides"), NodePath("MarginContainer/VBoxContainer/Label3"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/tiles_lines_color_picker"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("MarginContainer/VBoxContainer/Label4"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/table_lines_color_picker"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("MarginContainer/VBoxContainer/Label5"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/levels_menu"), PackedStringArray("Theme Overrides/colors", "Theme Overrides", "theme_override_styles/normal", "Layout", "Layout/Container Sizing", "Theme Overrides/styles"), NodePath("MarginContainer/VBoxContainer/Button"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme", "theme", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Warning"), PackedStringArray("Flags"), NodePath("Warning/Panel"), PackedStringArray("theme_override_styles/panel", "Layout", "Theme Overrides", "Theme Overrides/styles"), NodePath("LogIn"), PackedStringArray("Theme Overrides", "Theme Overrides/styles", "Flags"), NodePath("LogIn/ColorRect"), PackedStringArray("Layout"), NodePath("LogIn/VBoxContainer"), PackedStringArray("Layout", "Layout/Transform", "Theme Overrides", "Theme Overrides/constants"), NodePath("LogIn/VBoxContainer/Label"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/colors"), NodePath("LogIn/VBoxContainer/EmailInput"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal", "Theme Overrides/colors"), NodePath("LogIn/VBoxContainer/Label2"), PackedStringArray("Theme Overrides", "Theme Overrides/colors"), NodePath("LogIn/VBoxContainer/PasswordInput"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal", "Theme Overrides/colors"), NodePath("LogIn/VBoxContainer/LogInButton"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Blocker"), PackedStringArray("Layout", "Layout/Transform")] +resource_unfolds=["res://scenes/Configuration.tscn::StyleBoxFlat_742ft", PackedStringArray(), "res://scenes/Configuration.tscn::StyleBoxFlat_rjxe2", PackedStringArray(), "res://scenes/Configuration.tscn::StyleBoxFlat_hjuae", PackedStringArray(), "res://scenes/Configuration.tscn::StyleBoxFlat_d6xro", PackedStringArray(), "res://scenes/Configuration.tscn::StyleBoxFlat_u2atv", PackedStringArray(), "res://scenes/Configuration.tscn::StyleBoxFlat_khph0", PackedStringArray(), "res://scenes/Configuration.tscn::StyleBoxFlat_1f7ew", PackedStringArray()] +nodes_folded=[NodePath("MarginContainer/VBoxContainer"), NodePath("Warning"), NodePath("LogIn")] diff --git a/empareja-las-sombras/.godot/editor/Game.tscn-editstate-ff8ceb9b2bd5b48777d3d52e811276ab.cfg b/empareja-las-sombras/.godot/editor/Game.tscn-editstate-ff8ceb9b2bd5b48777d3d52e811276ab.cfg index e48a764..77c82e8 100644 --- a/empareja-las-sombras/.godot/editor/Game.tscn-editstate-ff8ceb9b2bd5b48777d3d52e811276ab.cfg +++ b/empareja-las-sombras/.godot/editor/Game.tscn-editstate-ff8ceb9b2bd5b48777d3d52e811276ab.cfg @@ -192,4 +192,4 @@ Game={ "hide_selection": false, "select_mode": 0 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Node2D")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Configuration/Blocker")]) diff --git a/empareja-las-sombras/.godot/editor/Game.tscn-folding-ff8ceb9b2bd5b48777d3d52e811276ab.cfg b/empareja-las-sombras/.godot/editor/Game.tscn-folding-ff8ceb9b2bd5b48777d3d52e811276ab.cfg index f9cd817..4e18b2e 100644 --- a/empareja-las-sombras/.godot/editor/Game.tscn-folding-ff8ceb9b2bd5b48777d3d52e811276ab.cfg +++ b/empareja-las-sombras/.godot/editor/Game.tscn-folding-ff8ceb9b2bd5b48777d3d52e811276ab.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[NodePath("MenuButton"), PackedStringArray("Layout", "Layout/Transform", "icon"), NodePath("HBoxContainer"), PackedStringArray("Layout", "Theme Overrides", "Theme Overrides/constants"), NodePath("HBoxContainer/VBoxContainer"), PackedStringArray("Layout", "Layout/Transform", "Layout/Container Sizing"), NodePath("HBoxContainer/VBoxContainer/Label"), PackedStringArray("BiDi", "Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/fonts"), NodePath("HBoxContainer/VBoxContainer/TilesContainer"), PackedStringArray("Layout", "Layout/Transform", "Texture", "Layout/Container Sizing"), NodePath("HBoxContainer/VBoxContainer2"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("HBoxContainer/VBoxContainer2/Label"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes"), NodePath("HBoxContainer/VBoxContainer2/GameBoardContainer"), PackedStringArray("Layout", "Layout/Transform", "Layout/Container Sizing"), NodePath("HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard"), PackedStringArray("Layout", "Layout/Transform"), NodePath("HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard/GridContainer"), PackedStringArray("Layout", "Layout/Container Sizing", "Layout/Transform")] -resource_unfolds=[] -nodes_folded=[] +node_unfolds=[NodePath("."), PackedStringArray("Layout"), NodePath("VBoxContainer"), PackedStringArray("Layout"), NodePath("VBoxContainer/MenuButton"), PackedStringArray("Layout", "Layout/Transform", "icon", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/constants"), NodePath("VBoxContainer/HBoxContainer"), PackedStringArray("Layout", "Theme Overrides", "Theme Overrides/constants", "Layout/Transform"), NodePath("VBoxContainer/HBoxContainer/VBoxContainer"), PackedStringArray("Layout", "Layout/Transform", "Layout/Container Sizing"), NodePath("VBoxContainer/HBoxContainer/VBoxContainer/Label"), PackedStringArray("BiDi", "Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/fonts"), NodePath("VBoxContainer/HBoxContainer/VBoxContainer/TilesContainer"), PackedStringArray("Layout", "Layout/Transform", "Texture", "Layout/Container Sizing"), NodePath("VBoxContainer/HBoxContainer/VBoxContainer2"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("VBoxContainer/HBoxContainer/VBoxContainer2/Label"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes"), NodePath("VBoxContainer/HBoxContainer/VBoxContainer2/GameBoardContainer"), PackedStringArray("Layout", "Layout/Transform", "Layout/Container Sizing"), NodePath("VBoxContainer/HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard"), PackedStringArray("Layout", "Theme", "Theme Overrides", "Theme Overrides/styles"), NodePath("VBoxContainer/HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard/GridContainer"), PackedStringArray("Layout", "Layout/Container Sizing", "Layout/Transform"), NodePath("WinPopup/ColorRect"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("WinPopup/VBoxContainer"), PackedStringArray("Layout"), NodePath("WinPopup/VBoxContainer/victory_label"), PackedStringArray("Theme Overrides", "Theme Overrides/colors"), NodePath("WinPopup/VBoxContainer/duration_label"), PackedStringArray("Theme Overrides", "Theme Overrides/styles", "Theme Overrides/colors"), NodePath("WinPopup/VBoxContainer/fail_count_label"), PackedStringArray("Theme Overrides", "Theme Overrides/colors"), NodePath("WinPopup/VBoxContainer/exit_endgame_button"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Blocker"), PackedStringArray("Layout", "Layout/Transform")] +resource_unfolds=["res://scenes/Game.tscn::StyleBoxEmpty_cpr0p", PackedStringArray(), "res://scenes/Game.tscn::StyleBoxFlat_cpr0p", PackedStringArray()] +nodes_folded=[NodePath("WinPopup"), NodePath("WinPopup/VBoxContainer")] diff --git a/empareja-las-sombras/.godot/editor/create_recent.Node b/empareja-las-sombras/.godot/editor/create_recent.Node index c8e320e..0f7a8c5 100644 --- a/empareja-las-sombras/.godot/editor/create_recent.Node +++ b/empareja-las-sombras/.godot/editor/create_recent.Node @@ -1,12 +1,14 @@ -Button -Label VBoxContainer +Control +MarginContainer +ColorRect +Window PopupPanel +Button +LineEdit +Label +Popup +Panel MenuButton ColorPickerButton -Control HBoxContainer -AudioStreamPlayer -TextureRect -GridContainer -PanelContainer diff --git a/empareja-las-sombras/.godot/editor/editor_layout.cfg b/empareja-las-sombras/.godot/editor/editor_layout.cfg index 8dd89cb..c879f40 100644 --- a/empareja-las-sombras/.godot/editor/editor_layout.cfg +++ b/empareja-las-sombras/.godot/editor/editor_layout.cfg @@ -2,14 +2,14 @@ dock_3_selected_tab_idx=0 dock_4_selected_tab_idx=0 -dock_5_selected_tab_idx=1 +dock_5_selected_tab_idx=0 dock_floating={} dock_filesystem_h_split_offset=240 dock_filesystem_v_split_offset=0 dock_filesystem_display_mode=0 dock_filesystem_file_sort=0 dock_filesystem_file_list_display_mode=1 -dock_filesystem_selected_paths=PackedStringArray("res://scenes/Game.tscn") +dock_filesystem_selected_paths=PackedStringArray("res://scripts/game_data.gd") dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/") dock_node_current_tab=0 dock_history_include_scene=true @@ -28,11 +28,11 @@ dock_5="Inspector,Node,History" [EditorNode] -open_scenes=PackedStringArray("res://scenes/Game.tscn", "res://scenes/Configuration.tscn") +open_scenes=PackedStringArray("res://scenes/Configuration.tscn", "res://scenes/Game.tscn") current_scene="res://scenes/Game.tscn" center_split_offset=0 selected_default_debugger_tab_idx=0 -selected_main_editor_idx=2 +selected_main_editor_idx=0 selected_bottom_panel_item=0 [EditorWindow] @@ -44,8 +44,8 @@ size=Vector2i(1024, 1000) [ScriptEditor] -open_scripts=["res://scripts/animal_tile.gd", "res://scripts/configuration.gd", "res://scripts/game_data.gd", "res://scripts/image_loader.gd", "res://scripts/node_2d.gd", "res://scripts/screen_manager.gd"] -selected_script="res://scripts/game_data.gd" +open_scripts=["res://scripts/animal_tile.gd", "res://scripts/configuration.gd", "res://scripts/game.gd", "res://scripts/game_data.gd", "res://scripts/image_loader.gd", "res://scripts/screen_manager.gd"] +selected_script="res://scripts/configuration.gd" open_help=[] script_split_offset=200 list_split_offset=0 diff --git a/empareja-las-sombras/.godot/editor/filesystem_cache10 b/empareja-las-sombras/.godot/editor/filesystem_cache10 index d037468..3a5b2a9 100644 --- a/empareja-las-sombras/.godot/editor/filesystem_cache10 +++ b/empareja-las-sombras/.godot/editor/filesystem_cache10 @@ -1,6 +1,6 @@ fc8a56933c4b1c8d796fdb8f7a9f9475 -::res://::1744408654 -export_presets.cfg::TextFile::-1::1744399092::0::1::::<><><>0<>0<><>:: +::res://::1744835306 +export_presets.cfg::TextFile::-1::1744834849::0::1::::<><><>0<>0<><>:: icon.svg::CompressedTexture2D/CompressedTexture2D::4846091670585274137::1744195706::1744195716::1::::<><><>0<>0<>a6ef899d0bda3cdd63eaa6b079d03aca<>res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex:: ::res://audios/::1744295153 instrucciones.mp3::AudioStreamMP3/AudioStreamMP3::7110748935779360531::1744295152::1744295153::1::::<><><>0<>0<>907b78c75c0c4deb72d14e7a74dd7acf<>res://.godot/imported/instrucciones.mp3-3e910247f8d0baa2378a660539fef5b4.mp3str:: @@ -60,14 +60,14 @@ vaca_color.png::CompressedTexture2D/CompressedTexture2D::1639453517109408540::17 vaca_sombra.png::CompressedTexture2D/CompressedTexture2D::4137840386567035395::1744226338::1744226677::1::::<><><>0<>0<>8b8f93705ab813c8fda24891062e2b93<>res://.godot/imported/vaca_sombra.png-87bf77b3bedacf2de6553221767d8158.ctex:: zorro_color.png::CompressedTexture2D/CompressedTexture2D::1666546973926131984::1744220372::1744222652::1::::<><><>0<>0<>507db7ef7a8e54c877af1f7c2e943778<>res://.godot/imported/zorro_color.png-9357deebbe773a59422357e0f482914f.ctex:: zorro_sombra.png::CompressedTexture2D/CompressedTexture2D::6252548807644359177::1744226356::1744226677::1::::<><><>0<>0<>dd376ca5b7be9cc4c9ab8247eb78f99a<>res://.godot/imported/zorro_sombra.png-a7d9fb62668d52352c13e90c900ac2bc.ctex:: -::res://scenes/::1744404395 -Configuration.tscn::PackedScene::6729908559101085089::1744403417::0::1::::<><><>0<>0<><>::uid://ctge47k34s7yi::::res://scripts/configuration.gd -Game.tscn::PackedScene::7300647384769136354::1744404395::0::1::::<><><>0<>0<><>::uid://3qvb4d882mqd::::res://scripts/node_2d.gd<>uid://c8kq84p5btav8::::res://audios/instrucciones.mp3<>uid://bkwdw0l43i15v::::res://images/menu_logo.png -::res://scripts/::1744404395 -animal_tile.gd::GDScript::4714635075097887840::1744403019::0::1::::AnimalTile<>Node2D<><>0<>0<><>:: -configuration.gd::GDScript::6119112016534423576::1744402008::0::1::::<>Control<><>0<>0<><>:: -game_data.gd::GDScript::1767393862001390866::1744404395::0::1::::<>Node<><>0<>0<><>:: +::res://scenes/::1744835032 +Configuration.tscn::PackedScene::6729908559101085089::1744835032::0::1::::<><><>0<>0<><>::uid://ctge47k34s7yi::::res://scripts/configuration.gd +Game.tscn::PackedScene::7300647384769136354::1744834812::0::1::::<><><>0<>0<><>::uid://3qvb4d882mqd::::res://scripts/game.gd<>uid://c8kq84p5btav8::::res://audios/instrucciones.mp3<>uid://bkwdw0l43i15v::::res://images/menu_logo.png +::res://scripts/::1744834810 +animal_tile.gd::GDScript::4714635075097887840::1744834515::0::1::::AnimalTile<>Node2D<><>0<>0<><>:: +configuration.gd::GDScript::6119112016534423576::1744834810::0::1::::<>Control<><>0<>0<><>:: +game.gd::GDScript::1999596037927974939::1744834409::0::1::::<>Control<><>0<>0<><>:: +game_data.gd::GDScript::1767393862001390866::1744833131::0::1::::<>Node<><>0<>0<><>:: image_loader.gd::GDScript/GDScript::4945911806681378795::1744289398::0::1::::ImageLoader<>Node<><>0<>0<><>:: -node_2d.gd::GDScript::1999596037927974939::1744403411::0::1::::<>Node2D<><>0<>0<><>:: screen_manager.gd::GDScript/GDScript::6637911554621855883::1744315379::0::1::::<>Node<><>0<>0<><>:: -screen_manager.tscn::PackedScene::1657251017967126927::1744396137::0::1::::<><><>0<>0<><>:: +screen_manager.tscn::PackedScene/PackedScene::564416849166704526::1744815684::0::1::::<><><>0<>0<><>:: diff --git a/empareja-las-sombras/.godot/editor/filesystem_update4 b/empareja-las-sombras/.godot/editor/filesystem_update4 index 24d5087..c52bd3c 100644 --- a/empareja-las-sombras/.godot/editor/filesystem_update4 +++ b/empareja-las-sombras/.godot/editor/filesystem_update4 @@ -1,5 +1,2 @@ -res://scenes/Game.tscn -res://scripts/game_data.gd -res://scripts/node_2d.gd -res://scripts/configuration.gd res://scenes/Configuration.tscn +res://scripts/configuration.gd diff --git a/empareja-las-sombras/.godot/editor/game.gd-folding-ba51fdadef04e64772b438b04f73dd55.cfg b/empareja-las-sombras/.godot/editor/game.gd-folding-ba51fdadef04e64772b438b04f73dd55.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/empareja-las-sombras/.godot/editor/game.gd-folding-ba51fdadef04e64772b438b04f73dd55.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/empareja-las-sombras/.godot/editor/project_metadata.cfg b/empareja-las-sombras/.godot/editor/project_metadata.cfg index 868b601..fe0d60d 100644 --- a/empareja-las-sombras/.godot/editor/project_metadata.cfg +++ b/empareja-las-sombras/.godot/editor/project_metadata.cfg @@ -17,9 +17,14 @@ last_selected_language="GDScript" [recent_files] scripts=["Object", "res://scenes/configuration.gd", "res://scripts/screen_manager.gd", "res://scripts/game_data.gd", "res://image_loader.gd", "res://export_presets.cfg", "res://number_title.gd", "res://node_2d.gd"] -scenes=["res://scenes/Configuration.tscn", "res://scenes/Game.tscn"] +scenes=["res://scenes/Game.tscn", "res://scenes/Configuration.tscn", "res://scripts/screen_manager.tscn"] [export_options] default_filename="Empareja las sombras" export_debug=true + +[color_picker] + +picker_shape=3 +recent_presets=PackedColorArray(0.896849, 0.408015, 0.615551, 1, 0.895487, 0.454204, 0.346526, 1, 0.867944, 0.423967, 0.666011, 1, 0.588235, 0.654902, 0.686275, 1, 0.196078, 0.309804, 0.368627, 1, 0.8, 0.8, 0.8, 1, 5.0812e-05, 0.000128423, 0.000185361, 0.784314, 0, 0, 0, 1, 0.196078, 0.309804, 0.368627, 0.784314) diff --git a/empareja-las-sombras/.godot/editor/script_editor_cache.cfg b/empareja-las-sombras/.godot/editor/script_editor_cache.cfg index bfb112e..753a231 100644 --- a/empareja-las-sombras/.godot/editor/script_editor_cache.cfg +++ b/empareja-las-sombras/.godot/editor/script_editor_cache.cfg @@ -20,8 +20,8 @@ state={ "column": 0, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 89, -"scroll_position": 71.0, +"row": 15, +"scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" } @@ -31,24 +31,10 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 2, +"column": 47, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 32, -"scroll_position": 10.0, -"selection": false, -"syntax_highlighter": "GDScript" -} - -[res://scripts/node_2d.gd] - -state={ -"bookmarks": PackedInt32Array(), -"breakpoints": PackedInt32Array(), -"column": 0, -"folded_lines": Array[int]([]), -"h_scroll_position": 0, -"row": 182, +"row": 9, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" @@ -59,12 +45,16 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 28, +"column": 0, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 18, -"scroll_position": 140.0, -"selection": false, +"row": 3, +"scroll_position": 0.0, +"selection": true, +"selection_from_column": 0, +"selection_from_line": 3, +"selection_to_column": 30, +"selection_to_line": 3, "syntax_highlighter": "GDScript" } @@ -87,10 +77,24 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 30, +"column": 18, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 44, +"row": 11, +"scroll_position": 9.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://scripts/game.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 21, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 13, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" diff --git a/empareja-las-sombras/.godot/exported/133200997/export-9342d86e93843c4fab70a2c0224d3fd3-Configuration.scn b/empareja-las-sombras/.godot/exported/133200997/export-9342d86e93843c4fab70a2c0224d3fd3-Configuration.scn index d87f397..1700c3e 100644 Binary files a/empareja-las-sombras/.godot/exported/133200997/export-9342d86e93843c4fab70a2c0224d3fd3-Configuration.scn and b/empareja-las-sombras/.godot/exported/133200997/export-9342d86e93843c4fab70a2c0224d3fd3-Configuration.scn differ diff --git a/empareja-las-sombras/.godot/exported/133200997/export-ff8ceb9b2bd5b48777d3d52e811276ab-Game.scn b/empareja-las-sombras/.godot/exported/133200997/export-ff8ceb9b2bd5b48777d3d52e811276ab-Game.scn index aadcfc3..15a2646 100644 Binary files a/empareja-las-sombras/.godot/exported/133200997/export-ff8ceb9b2bd5b48777d3d52e811276ab-Game.scn and b/empareja-las-sombras/.godot/exported/133200997/export-ff8ceb9b2bd5b48777d3d52e811276ab-Game.scn differ diff --git a/empareja-las-sombras/.godot/exported/133200997/file_cache b/empareja-las-sombras/.godot/exported/133200997/file_cache index 0c9b20f..57bd876 100644 --- a/empareja-las-sombras/.godot/exported/133200997/file_cache +++ b/empareja-las-sombras/.godot/exported/133200997/file_cache @@ -1,3 +1,3 @@ -res://scenes/Game.tscn::470d2ca5918c266d5f5ad41f90064b19::1744399048::res://.godot/exported/133200997/export-ff8ceb9b2bd5b48777d3d52e811276ab-Game.scn -res://scenes/Configuration.tscn::c438d452251509b6acf75454df33bea5::1744399048::res://.godot/exported/133200997/export-9342d86e93843c4fab70a2c0224d3fd3-Configuration.scn -res://scripts/screen_manager.tscn::9988fbb1a6b9e1613010f5ccda4bc922::1744396137::res://.godot/exported/133200997/export-d70c5745a12c569d3ecc03f08fad1e89-screen_manager.scn +res://scenes/Game.tscn::c040271b6470fca2a39ef829cb0b3f75::1744834812::res://.godot/exported/133200997/export-ff8ceb9b2bd5b48777d3d52e811276ab-Game.scn +res://scenes/Configuration.tscn::dad3371c7771ec5d14ee92b8b60b036a::1744834812::res://.godot/exported/133200997/export-9342d86e93843c4fab70a2c0224d3fd3-Configuration.scn +res://scripts/screen_manager.tscn::3772d0b47a11041194608177b882051d::1744815684::res://.godot/exported/133200997/export-d70c5745a12c569d3ecc03f08fad1e89-screen_manager.scn diff --git a/empareja-las-sombras/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/b547968aa19902bd49de94fd81aaa8c91331c7dc.cache b/empareja-las-sombras/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/b547968aa19902bd49de94fd81aaa8c91331c7dc.cache new file mode 100644 index 0000000..c3981bb Binary files /dev/null and b/empareja-las-sombras/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/b547968aa19902bd49de94fd81aaa8c91331c7dc.cache differ diff --git a/empareja-las-sombras/.godot/uid_cache.bin b/empareja-las-sombras/.godot/uid_cache.bin index 6293951..e788235 100644 Binary files a/empareja-las-sombras/.godot/uid_cache.bin and b/empareja-las-sombras/.godot/uid_cache.bin differ diff --git a/empareja-las-sombras/Empareja las sombras.apk b/empareja-las-sombras/Empareja las sombras.apk index 261305f..a9e4740 100644 Binary files a/empareja-las-sombras/Empareja las sombras.apk and b/empareja-las-sombras/Empareja las sombras.apk differ diff --git a/empareja-las-sombras/Empareja las sombras.apk.idsig b/empareja-las-sombras/Empareja las sombras.apk.idsig index 06ea86b..8a1a9b1 100644 Binary files a/empareja-las-sombras/Empareja las sombras.apk.idsig and b/empareja-las-sombras/Empareja las sombras.apk.idsig differ diff --git a/empareja-las-sombras/export_presets.cfg b/empareja-las-sombras/export_presets.cfg index 344217e..438b883 100644 --- a/empareja-las-sombras/export_presets.cfg +++ b/empareja-las-sombras/export_presets.cfg @@ -36,7 +36,7 @@ architectures/x86_64=false version/code=1 version/name="" package/unique_name="com.andresgmoran.$genname" -package/name="g g" +package/name="Empareja las sombras" package/signed=true package/app_category=2 package/retain_data_on_uninstall=false diff --git a/empareja-las-sombras/scenes/Configuration.tscn b/empareja-las-sombras/scenes/Configuration.tscn index 3a37593..d313edf 100644 --- a/empareja-las-sombras/scenes/Configuration.tscn +++ b/empareja-las-sombras/scenes/Configuration.tscn @@ -1,61 +1,124 @@ -[gd_scene load_steps=2 format=3 uid="uid://c25au08um2kxt"] +[gd_scene load_steps=9 format=3 uid="uid://c25au08um2kxt"] [ext_resource type="Script" uid="uid://ctge47k34s7yi" path="res://scripts/configuration.gd" id="1_d6xro"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_742ft"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rjxe2"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hjuae"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_d6xro"] +bg_color = Color(0.8, 0.8, 0.8, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_u2atv"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_khph0"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1f7ew"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + [node name="Configuration" type="Control"] layout_mode = 3 -anchors_preset = 0 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 script = ExtResource("1_d6xro") -[node name="VBoxContainer" type="VBoxContainer" parent="."] -layout_mode = 0 -offset_left = 180.0 -offset_top = 344.0 -offset_right = 1794.0 -offset_bottom = 731.0 +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 30 -[node name="Label" type="Label" parent="VBoxContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] layout_mode = 2 +theme_override_constants/separation = 20 +alignment = 1 + +[node name="Label6" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 40 +text = "CONFIGURACIÓN" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 text = "Selecciona un jugador" -[node name="residents_menu" type="MenuButton" parent="VBoxContainer"] +[node name="residents_menu" type="MenuButton" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(1000, 30) layout_mode = 2 +size_flags_horizontal = 0 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_742ft") text = "Residentes" flat = false -[node name="Label2" type="Label" parent="VBoxContainer"] +[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer"] layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 text = "Selecciona el color de fondo" -[node name="bg_color_picker" type="ColorPickerButton" parent="VBoxContainer"] -custom_minimum_size = Vector2(200, 70) +[node name="bg_color_picker" type="ColorPickerButton" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(250, 120) layout_mode = 2 size_flags_horizontal = 0 +size_flags_vertical = 0 +color = Color(1, 1, 1, 1) -[node name="Label3" type="Label" parent="VBoxContainer"] +[node name="Label3" type="Label" parent="MarginContainer/VBoxContainer"] layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 text = "Selecciona el color de las líneas de las fichas" -[node name="tiles_lines_color_picker" type="ColorPickerButton" parent="VBoxContainer"] -custom_minimum_size = Vector2(200, 70) +[node name="tiles_lines_color_picker" type="ColorPickerButton" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(250, 120) layout_mode = 2 size_flags_horizontal = 0 +size_flags_vertical = 0 +color = Color(0.976471, 0, 0, 1) -[node name="Label4" type="Label" parent="VBoxContainer"] +[node name="Label4" type="Label" parent="MarginContainer/VBoxContainer"] layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 text = "Selecciona el color de las líneas del tablero" -[node name="table_lines_color_picker" type="ColorPickerButton" parent="VBoxContainer"] -custom_minimum_size = Vector2(200, 70) +[node name="table_lines_color_picker" type="ColorPickerButton" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(250, 120) layout_mode = 2 size_flags_horizontal = 0 +color = Color(0, 0, 0.972549, 1) -[node name="Label5" type="Label" parent="VBoxContainer"] +[node name="Label5" type="Label" parent="MarginContainer/VBoxContainer"] layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 text = "Selecciona el nivel" -[node name="levels_menu" type="MenuButton" parent="VBoxContainer"] +[node name="levels_menu" type="MenuButton" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(1000, 30) layout_mode = 2 +size_flags_horizontal = 0 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_rjxe2") text = "Niveles" flat = false item_count = 3 @@ -66,8 +129,102 @@ popup/item_1/id = 1 popup/item_2/text = "Dificil" popup/item_2/id = 2 -[node name="Button" type="Button" parent="VBoxContainer"] +[node name="Button" type="Button" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(1000, 50) layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme_override_styles/normal = SubResource("StyleBoxFlat_hjuae") text = "EMPEZAR JUEGO" -[connection signal="pressed" from="VBoxContainer/Button" to="." method="_on_button_pressed"] +[node name="Warning" type="Popup" parent="."] +title = "Alerta ⚠️" +borderless = false + +[node name="Panel" type="Panel" parent="Warning"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_d6xro") + +[node name="LogIn" type="Window" parent="."] +title = "Iniciar sesion" +initial_position = 2 +size = Vector2i(500, 230) +visible = false + +[node name="ColorRect" type="ColorRect" parent="LogIn"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.8, 0.8, 0.8, 1) + +[node name="VBoxContainer" type="VBoxContainer" parent="LogIn"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -72.0 +offset_top = -77.5 +offset_right = 72.0 +offset_bottom = 77.5 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 10 + +[node name="Label" type="Label" parent="LogIn/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +text = "Correo electronico" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="EmailInput" type="LineEdit" parent="LogIn/VBoxContainer"] +custom_minimum_size = Vector2(400, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_u2atv") + +[node name="Label2" type="Label" parent="LogIn/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +text = "Contrseña" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="PasswordInput" type="LineEdit" parent="LogIn/VBoxContainer"] +custom_minimum_size = Vector2(400, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_khph0") + +[node name="LogInButton" type="Button" parent="LogIn/VBoxContainer"] +custom_minimum_size = Vector2(250, 50) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_styles/normal = SubResource("StyleBoxFlat_1f7ew") +text = "Iniciar sesion" + +[node name="Blocker" type="ColorRect" parent="."] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.196078, 0.309804, 0.368627, 0.784314) + +[connection signal="pressed" from="MarginContainer/VBoxContainer/Button" to="." method="_on_button_pressed"] +[connection signal="pressed" from="LogIn/VBoxContainer/LogInButton" to="." method="_on_log_in_button_pressed"] diff --git a/empareja-las-sombras/scenes/Game.tscn b/empareja-las-sombras/scenes/Game.tscn index 245320a..609db3f 100644 --- a/empareja-las-sombras/scenes/Game.tscn +++ b/empareja-las-sombras/scenes/Game.tscn @@ -1,94 +1,147 @@ -[gd_scene load_steps=4 format=3 uid="uid://dcaquiy5tvss5"] +[gd_scene load_steps=6 format=3 uid="uid://dcaquiy5tvss5"] -[ext_resource type="Script" uid="uid://3qvb4d882mqd" path="res://scripts/node_2d.gd" id="1_ibkli"] +[ext_resource type="Script" uid="uid://3qvb4d882mqd" path="res://scripts/game.gd" id="1_ibkli"] [ext_resource type="AudioStream" uid="uid://c8kq84p5btav8" path="res://audios/instrucciones.mp3" id="2_qbsmt"] [ext_resource type="Texture2D" uid="uid://bkwdw0l43i15v" path="res://images/menu_logo.png" id="3_cpr0p"] -[node name="Node2D" type="Node2D"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cpr0p"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cpr0p"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[node name="Node2D" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 script = ExtResource("1_ibkli") [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] stream = ExtResource("2_qbsmt") -[node name="MenuButton" type="MenuButton" parent="."] -offset_left = 11.0 -offset_top = 3.0 -offset_right = 88.0 -offset_bottom = 87.0 +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="MenuButton" type="MenuButton" parent="VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 icon = ExtResource("3_cpr0p") -[node name="HBoxContainer" type="HBoxContainer" parent="."] +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] layout_direction = 2 -offset_left = 53.0 -offset_right = 1872.0 -offset_bottom = 1073.0 +layout_mode = 2 theme_override_constants/separation = 100 alignment = 1 -[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] layout_mode = 2 alignment = 1 -[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer"] +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer"] layout_mode = 2 theme_override_font_sizes/font_size = 44 text = "FICHAS" horizontal_alignment = 1 vertical_alignment = 1 -[node name="TilesContainer" type="GridContainer" parent="HBoxContainer/VBoxContainer"] +[node name="TilesContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer"] custom_minimum_size = Vector2(760, 880) layout_direction = 2 layout_mode = 2 columns = 5 -[node name="VBoxContainer2" type="VBoxContainer" parent="HBoxContainer"] +[node name="VBoxContainer2" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] layout_mode = 2 alignment = 1 -[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2"] +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer2"] layout_mode = 2 theme_override_font_sizes/font_size = 44 text = "TABLERO" horizontal_alignment = 1 vertical_alignment = 1 -[node name="GameBoardContainer" type="Control" parent="HBoxContainer/VBoxContainer2"] +[node name="GameBoardContainer" type="Control" parent="VBoxContainer/HBoxContainer/VBoxContainer2"] custom_minimum_size = Vector2(760, 880) layout_mode = 2 -[node name="GameBoard" type="PanelContainer" parent="HBoxContainer/VBoxContainer2/GameBoardContainer"] +[node name="GameBoard" type="PanelContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer2/GameBoardContainer"] layout_mode = 0 offset_left = 6.0 offset_top = 3.0 offset_right = 766.0 offset_bottom = 883.0 +theme_override_styles/panel = SubResource("StyleBoxEmpty_cpr0p") -[node name="GridContainer" type="GridContainer" parent="HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard"] +[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard"] custom_minimum_size = Vector2(760, 880) layout_mode = 2 size_flags_horizontal = 0 size_flags_vertical = 0 columns = 5 -[node name="WinPopup" type="PopupPanel" parent="."] +[node name="WinPopup" type="Window" parent="."] +initial_position = 1 +size = Vector2i(500, 200) +visible = false + +[node name="ColorRect" type="ColorRect" parent="WinPopup"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.8, 0.8, 0.8, 1) [node name="VBoxContainer" type="VBoxContainer" parent="WinPopup"] -offset_left = 4.0 -offset_top = 4.0 -offset_right = 96.0 -offset_bottom = 96.0 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -46.0 +offset_top = -56.0 +offset_right = 46.0 +offset_bottom = 56.0 +grow_horizontal = 2 +grow_vertical = 2 [node name="victory_label" type="Label" parent="WinPopup/VBoxContainer"] layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) [node name="duration_label" type="Label" parent="WinPopup/VBoxContainer"] layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) [node name="fail_count_label" type="Label" parent="WinPopup/VBoxContainer"] layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) [node name="exit_endgame_button" type="Button" parent="WinPopup/VBoxContainer"] +custom_minimum_size = Vector2(250, 50) layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_styles/normal = SubResource("StyleBoxFlat_cpr0p") +text = "SALIR" + +[node name="Blocker" type="ColorRect" parent="."] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.196078, 0.309804, 0.368627, 0.784314) [connection signal="pressed" from="WinPopup/VBoxContainer/exit_endgame_button" to="." method="_on_exit_button_pressed"] diff --git a/empareja-las-sombras/scripts/animal_tile.gd b/empareja-las-sombras/scripts/animal_tile.gd index 651b7f3..9057f05 100644 --- a/empareja-las-sombras/scripts/animal_tile.gd +++ b/empareja-las-sombras/scripts/animal_tile.gd @@ -44,10 +44,10 @@ func get_tile_rect() -> Rect2: func check_drop_on_board(): # Ruta actualizada según jerarquía corregida - if not get_tree().get_root().has_node("Node2D/HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard/GridContainer"): + if not get_tree().get_root().has_node("Node2D/VBoxContainer/HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard/GridContainer"): return - var game_board = get_tree().get_root().get_node("Node2D/HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard/GridContainer") + var game_board = get_tree().get_root().get_node("Node2D/VBoxContainer/HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard/GridContainer") var tile_rect = get_tile_rect() var placed_on_board = false @@ -82,7 +82,7 @@ func check_drop_on_board(): slot.set("is_occupied", true) queue_free() # Destruimos el tile porque ya está colocado - var tiles_container = get_tree().get_root().get_node("Node2D/HBoxContainer/VBoxContainer/TilesContainer") + var tiles_container = get_tree().get_root().get_node("Node2D/VBoxContainer/HBoxContainer/VBoxContainer/TilesContainer") if tiles_container.get_child_count() <= 1: get_tree().get_root().get_node("Node2D").check_win() placed_on_board = true diff --git a/empareja-las-sombras/scripts/configuration.gd b/empareja-las-sombras/scripts/configuration.gd index 98b1f85..8e5dbe0 100644 --- a/empareja-las-sombras/scripts/configuration.gd +++ b/empareja-las-sombras/scripts/configuration.gd @@ -1,18 +1,30 @@ extends Control -@onready var levels_menu = $VBoxContainer/levels_menu -@onready var residents_menu = $VBoxContainer/residents_menu +@onready var login_popup = $LogIn +@onready var email_input = $LogIn/VBoxContainer/EmailInput +@onready var password_input = $LogIn/VBoxContainer/PasswordInput +@onready var login_button = $LogIn/VBoxContainer/LogInButton + +@onready var levels_menu = $MarginContainer/VBoxContainer/levels_menu +@onready var residents_menu = $MarginContainer/VBoxContainer/residents_menu var level = -1 var id_player = -1 +var id_user = -1 func _ready(): - RenderingServer.set_default_clear_color(Color.SKY_BLUE) + RenderingServer.set_default_clear_color("#CCCCCC") + + await get_tree().process_frame # Esperar a que todo esté listo + + if not GameData.is_logged_in: + login_popup.show() + $Blocker.visible = true + levels_menu.get_popup().connect("id_pressed", self._on_level_selected) - - await get_tree().process_frame #Esperar a que se cree HTTPRequest en GameData + var residents = await GameData.get_residents_loaded() - + if residents_menu.item_count < residents.size(): for resident in residents: var full_name = "%s %s" % [resident.nombre, resident.apellido] @@ -20,32 +32,71 @@ func _ready(): residents_menu.get_popup().add_item(full_name, id) residents_menu.get_popup().connect("id_pressed", self._on_player_selected) +### Metodo para cuando se pulse el boton de iniciar sesion +func _on_log_in_button_pressed(): + var users = await GameData.get_users_loaded() + var username = email_input.text.strip_edges() + var password = password_input.text.strip_edges() + + for user in users: + if user.email == username or not user.is_empty(): + GameData.is_logged_in = true + id_user = int(user.id) + login_popup.hide() + $Blocker.visible = false + break + + if not GameData.is_logged_in: + email_input.clear() + password_input.clear() + + var stylebox_email = email_input.get_theme_stylebox("normal") as StyleBoxFlat + var stylebox_password = password_input.get_theme_stylebox("normal") as StyleBoxFlat + if stylebox_email and stylebox_password: + stylebox_email.bg_color = Color(1, 0.8, 0.8) + stylebox_password.bg_color = Color(1, 0.8, 0.8) + +### Metodo para cuando el usuario elija el nivel en el menu func _on_level_selected(id): match id: 0: - level = 1 + level = 0 1: - level = 2 + level = 1 2: - level = 3 - + level = 2 + +### Metodo para cuando el usuario elija el jugador en el menu func _on_player_selected(id): id_player = id +### Metodo para cuando el usuario le de al boton de jugar func _on_button_pressed() -> void: - var bg_color = $VBoxContainer/bg_color_picker.color - var tiles_lines_color = $VBoxContainer/tiles_lines_color_picker.color - var table_lines_color = $VBoxContainer/table_lines_color_picker.color + var bg_color = $MarginContainer/VBoxContainer/bg_color_picker.color + var tiles_lines_color = $MarginContainer/VBoxContainer/tiles_lines_color_picker.color + var table_lines_color = $MarginContainer/VBoxContainer/table_lines_color_picker.color + + var warning = Label.new() + warning.text = "" + warning.add_theme_color_override("font_color","#324f5e") + if level == -1: + warning.text = " - Debes seleccionar un nivel\n" + + if id_player == -1: + warning.text += " - Debes seleccionar un jugador" + + if warning.text != "": + $Warning/Panel.add_child(warning) + $Warning.popup_centered(Vector2(400, 200)) + return + var game_scene = preload("res://scenes/Game.tscn").instantiate() game_scene.bg_color = bg_color - game_scene.tiles_lines_color = tiles_lines_color + game_scene.tiles_lines_color = tiles_lines_color game_scene.table_lines_color = table_lines_color game_scene.difficulty = level - if id_player != -1: - GameData.start_game(id_player, level) - else: - print("Selecciona un jugador") #Cambiar a popup + GameData.start_game(id_player, id_user, level) ScreenManager.change_scene(game_scene, self) diff --git a/empareja-las-sombras/scripts/node_2d.gd b/empareja-las-sombras/scripts/game.gd similarity index 88% rename from empareja-las-sombras/scripts/node_2d.gd rename to empareja-las-sombras/scripts/game.gd index 1c50608..14c3b31 100644 --- a/empareja-las-sombras/scripts/node_2d.gd +++ b/empareja-las-sombras/scripts/game.gd @@ -1,14 +1,14 @@ -extends Node2D +extends Control -@onready var game_board_container = $HBoxContainer/VBoxContainer2/GameBoardContainer -@onready var game_board = $HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard -@onready var tiles_container = $HBoxContainer/VBoxContainer/TilesContainer +@onready var game_board_container = $VBoxContainer/HBoxContainer/VBoxContainer2/GameBoardContainer +@onready var game_board = $VBoxContainer/HBoxContainer/VBoxContainer2/GameBoardContainer/GameBoard +@onready var tiles_container = $VBoxContainer/HBoxContainer/VBoxContainer/TilesContainer @onready var audio_player = $AudioStreamPlayer @export var bg_color: Color = Color(1, 0, 0) @export var table_lines_color: Color = Color(1, 0, 0) @export var tiles_lines_color: Color = Color(1, 0, 0) -@export var difficulty = 1 # 1: Fácil, 2: Medio, 3: Difícil +@export var difficulty = -1 # 0: Fácil, 1: Medio, 2: Difícil var board_size = Vector2i(5, 5) var game_numbers = [] @@ -17,20 +17,20 @@ var used_animals = [] func _ready(): RenderingServer.set_default_clear_color(bg_color) - set_difficulty() # Cambiá a 2 o 3 para probar otros niveles + set_difficulty() audio_player.play() - $MenuButton.get_popup().add_item("Reproducir sonido", 0) - $MenuButton.get_popup().add_item("Salir", 1) - $MenuButton.get_popup().connect("id_pressed", self._on_menu_item_selected) + $VBoxContainer/MenuButton.get_popup().add_item("Reproducir sonido", 0) + $VBoxContainer/MenuButton.get_popup().add_item("Salir", 1) + $VBoxContainer/MenuButton.get_popup().connect("id_pressed", self._on_menu_item_selected) func set_difficulty(): match difficulty: - 1: + 0: board_size = Vector2i(3, 3) - 2: + 1: board_size = Vector2i(4, 4) - 3: + 2: board_size = Vector2i(5, 5) setup_game() @@ -194,16 +194,12 @@ func check_win(): if all_matched: GameData.end_game() - GameData.send_game_data() var popup = $WinPopup popup.get_node("VBoxContainer/victory_label").text = "✅ ¡Has ganado!" popup.get_node("VBoxContainer/duration_label").text = "🕐 Tiempo total: %s segundos" % GameData.get_duration() popup.get_node("VBoxContainer/fail_count_label").text = "❌ Fallos totales: %s" % GameData.fail_count - popup.popup_centered() + popup.show() + $Blocker.visible = true -func _on_exit_button_pressed() -> void: +func _on_exit_button_pressed(): ScreenManager.go_back_to_previous_scene() - - -func _on_exit_endgame_button_pressed() -> void: - pass # Replace with function body. diff --git a/empareja-las-sombras/scripts/node_2d.gd.uid b/empareja-las-sombras/scripts/game.gd.uid similarity index 100% rename from empareja-las-sombras/scripts/node_2d.gd.uid rename to empareja-las-sombras/scripts/game.gd.uid diff --git a/empareja-las-sombras/scripts/game_data.gd b/empareja-las-sombras/scripts/game_data.gd index a80c672..9fe0575 100644 --- a/empareja-las-sombras/scripts/game_data.gd +++ b/empareja-las-sombras/scripts/game_data.gd @@ -1,21 +1,28 @@ extends Node # Este script se encarga de comunicarse con la API +var is_logged_in: bool = false + + #Señales para saber cuando se recibe los datos +signal users_received(users) signal residents_received(residents) signal games_received(games) +var all_users = [] var all_residents = [] var all_games = [] -var resident_playing = " " +var user_id = -1 +var resident_playing = -1 var start_time: int = 0 var end_time: int = 0 var fail_count: int = 0 var level_game = -1 ### Metodo para inicar partida -func start_game(resident, level): +func start_game(resident, user, level): + user_id = user resident_playing = resident level_game = level start_time = Time.get_unix_time_from_system() @@ -24,6 +31,7 @@ func start_game(resident, level): ### Metodo para finalizar partida func end_game(): end_time = Time.get_unix_time_from_system() + send_game_data() ### Metodo para añadir fallos func add_fail(): @@ -32,6 +40,55 @@ func add_fail(): ### Metodo para calcular la duracion entre el incio y el final de la partida (en segundos) func get_duration() -> int: return end_time - start_time + +#--------------------------------------COMUNICACION CON LA API------------------------------------------------- + +#-------------------------------------GET USERS------------------------------------------------------- + +func get_users(): + var http_request = HTTPRequest.new() + get_tree().root.add_child(http_request) + + var status = http_request.connect( + "request_completed", + Callable(self, "_on_request_get_users").bind(http_request) + ) + + var url = "http://localhost:8080/resi/users" + var headers = ["User-Agent: Godot"] + var error = http_request.request(url, headers) + + if error != OK: + print("Error al hacer GET:", error) + +### Metodo para parsear json de residentes y que emite una señal cuando lo tenga +func _on_request_get_users(result, response_code, headers, body, request_node): + print("Código de respuesta:", response_code) + + if response_code == 200: + var response_text = body.get_string_from_utf8() + var parsed = JSON.parse_string(response_text) + + if parsed != null: + all_users = parsed + print("Users obtenidos:", all_users) + + # Emitir la señal para notificar a quien esté conectado + emit_signal("users_received", all_users) + else: + print("Error al parsear JSON") + else: + print("Error del servidor o conexión:", response_code) + + request_node.queue_free() # Liberar para evitar error 31 + +### Metodo que espera a la señal de que se han obtenido y parseado los residentes y los devuelve. +func get_users_loaded() -> Array: + print("Hola") + get_users() + var result = await self.users_received + return result + #--------------------------------------GET RESIDENTES----------------------------------------------- @@ -45,7 +102,7 @@ func get_residents(): Callable(self, "_on_request_get_residents").bind(http_request) ) - var url = "http://localhost:8080/resi/resident" + var url = "http://localhost:8080/resi/residents" var headers = ["User-Agent: Godot"] var error = http_request.request(url, headers) @@ -133,7 +190,7 @@ func send_game_data(): var game_id = 0; for game in games: if game.nombre == "Emparejar las sombras": - game_id = game.id + game_id = 1 #game.id var http_request = HTTPRequest.new() get_tree().root.add_child(http_request) @@ -143,8 +200,10 @@ func send_game_data(): var data = { "idJuego": game_id, "idResidente": resident_playing, + "idUsuario": user_id, "fallos": fail_count, - "duracion": get_duration() + "duracion": get_duration(), + "dificultad": level_game } var json_body = JSON.stringify(data) diff --git a/empareja-las-sombras/scripts/screen_manager.tscn b/empareja-las-sombras/scripts/screen_manager.tscn index fddb3fd..3437628 100644 --- a/empareja-las-sombras/scripts/screen_manager.tscn +++ b/empareja-las-sombras/scripts/screen_manager.tscn @@ -1,3 +1,3 @@ -[gd_scene format=3 uid="uid://xu1xgs1ivyu6"] +[gd_scene format=3 uid="uid://ibn4lxcaykxy"] [node name="ScreenManager" type="Node2D"] diff --git a/flecha/.godot/editor/configuration.gd-folding-0f54ff6f4c0e1e3e715375e09405d3d5.cfg b/flecha/.godot/editor/configuration.gd-folding-0f54ff6f4c0e1e3e715375e09405d3d5.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/flecha/.godot/editor/configuration.gd-folding-0f54ff6f4c0e1e3e715375e09405d3d5.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/flecha/.godot/editor/configuration.gd-folding-9a7c6a4b6b3690a147a35a2c78edff9b.cfg b/flecha/.godot/editor/configuration.gd-folding-9a7c6a4b6b3690a147a35a2c78edff9b.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/flecha/.godot/editor/configuration.gd-folding-9a7c6a4b6b3690a147a35a2c78edff9b.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/flecha/.godot/editor/configuration.tscn-editstate-1d57cbfe65260b55bec0ffd7be0eb13c.cfg b/flecha/.godot/editor/configuration.tscn-editstate-1d57cbfe65260b55bec0ffd7be0eb13c.cfg new file mode 100644 index 0000000..114cbb6 --- /dev/null +++ b/flecha/.godot/editor/configuration.tscn-editstate-1d57cbfe65260b55bec0ffd7be0eb13c.cfg @@ -0,0 +1,195 @@ +[editor_states] + +Anim={ +"visible": false +} +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(-546.045, -460.165), +"primary_grid_step": Vector2i(8, 8), +"show_group_gizmos": true, +"show_guides": true, +"show_helpers": false, +"show_lock_gizmos": true, +"show_origin": true, +"show_position_gizmos": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.261799, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 0.350494 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"MeshInstance3DCustomAABB": 0, +"NavigationLink3D": 0, +"NavigationObstacle3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Particles3DEmissionShape": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"SpringBoneCollision3D": 0, +"SpringBoneSimulator3D": 0, +"VehicleWheel3D": 0, +"VisibleOnScreenNotifier3D": 0, +"VoxelGI": 0 +}, +"local_coords": false, +"preview_sun_env": { +"environ_ao_enabled": false, +"environ_enabled": true, +"environ_energy": 1.0, +"environ_gi_enabled": false, +"environ_glow_enabled": false, +"environ_ground_color": Color(0.2, 0.169, 0.133, 1), +"environ_sky_color": Color(0.385, 0.454, 0.55, 1), +"environ_tonemap_enabled": true, +"sun_color": Color(1, 1, 1, 1), +"sun_enabled": true, +"sun_energy": 1.0, +"sun_max_distance": 100.0, +"sun_rotation": Vector2(-1.0472, 2.61799) +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +Game={ +"camera_override_mode": 2, +"hide_selection": false, +"select_mode": 0 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game/WinnerSelector/VBoxContainer")]) diff --git a/flecha/.godot/editor/configuration.tscn-folding-1d57cbfe65260b55bec0ffd7be0eb13c.cfg b/flecha/.godot/editor/configuration.tscn-folding-1d57cbfe65260b55bec0ffd7be0eb13c.cfg new file mode 100644 index 0000000..10c0ba4 --- /dev/null +++ b/flecha/.godot/editor/configuration.tscn-folding-1d57cbfe65260b55bec0ffd7be0eb13c.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Layout"), NodePath("MarginContainer"), PackedStringArray("Layout", "Theme Overrides", "Theme Overrides/constants"), NodePath("MarginContainer/VBoxContainer"), PackedStringArray("Theme Overrides", "Theme Overrides/constants", "Layout", "Layout/Transform"), NodePath("MarginContainer/VBoxContainer/Label3"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/LabelSelectPlayers"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/MenuButton"), PackedStringArray("Text Behavior", "theme_override_styles/normal", "Layout", "Layout/Container Sizing"), NodePath("MarginContainer/VBoxContainer/LabelPlayersSelected"), PackedStringArray("Theme Overrides", "Theme Overrides/styles", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/FlowContainer/WarningLabel"), PackedStringArray("Theme Overrides", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/Label"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/Seconds"), PackedStringArray("theme_override_styles/normal", "Theme Overrides/colors", "Layout", "Layout/Container Sizing"), NodePath("MarginContainer/VBoxContainer/Label2"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/HBoxContainer"), PackedStringArray("Theme Overrides", "Theme Overrides/constants"), NodePath("MarginContainer/VBoxContainer/HBoxContainer/Button2Directions"), PackedStringArray("Layout", "Theme Overrides", "Theme Overrides/font_sizes", "Layout/Transform", "Theme Overrides/styles", "theme_override_styles/normal", "theme_override_styles/pressed"), NodePath("MarginContainer/VBoxContainer/HBoxContainer/Button4Directions"), PackedStringArray("Layout", "Theme Overrides", "Theme Overrides/font_sizes", "Layout/Transform", "Theme Overrides/styles", "theme_override_styles/normal", "theme_override_styles/pressed"), NodePath("MarginContainer/VBoxContainer/HBoxContainer/Button8Directions"), PackedStringArray("Layout", "Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/styles", "theme_override_styles/normal", "theme_override_styles/pressed"), NodePath("MarginContainer/VBoxContainer/Label4"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/RepeatsPerDirection"), PackedStringArray("Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("MarginContainer/VBoxContainer/LabelSelectBgColor"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/BackgroundColorPickerButton"), PackedStringArray("Text Behavior", "Layout", "Layout/Transform", "Layout/Container Sizing"), NodePath("MarginContainer/VBoxContainer/LabelArrowColor"), PackedStringArray("Theme Overrides", "Theme Overrides/font_sizes", "Theme Overrides/colors"), NodePath("MarginContainer/VBoxContainer/ArrowColorPickerButton"), PackedStringArray("Layout", "Layout/Container Sizing"), NodePath("MarginContainer/VBoxContainer/PlayButton"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Warning"), PackedStringArray("Flags"), NodePath("Warning/Panel"), PackedStringArray("Theme Overrides", "Theme Overrides/styles", "theme_override_styles/panel", "Layout"), NodePath("Window"), PackedStringArray("Flags"), NodePath("Window/ColorRect"), PackedStringArray("Layout"), NodePath("Window/VBoxContainer"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/constants"), NodePath("Window/VBoxContainer/Label"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/colors"), NodePath("Window/VBoxContainer/EmailInput"), PackedStringArray("Layout", "Layout/Container Sizing", "Layout/Transform", "Theme Overrides", "Theme Overrides/colors", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Window/VBoxContainer/Label2"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/colors"), NodePath("Window/VBoxContainer/PasswordInput"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/colors", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Window/VBoxContainer/LogInButton"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Blocker"), PackedStringArray("Layout")] +resource_unfolds=["res://scenes/configuration.tscn::StyleBoxFlat_7wcdq", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_lditi", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_awm5k", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_sb302", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_kbhjk", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_kporg", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_soind", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_etp6l", PackedStringArray(), "res://scenes/configuration.tscn::ViewportTexture_hc4xr", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_n87a2", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_hc4xr", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_1in02", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_yojix", PackedStringArray(), "res://scenes/configuration.tscn::StyleBoxFlat_dx48e", PackedStringArray()] +nodes_folded=[NodePath("MarginContainer/VBoxContainer/HBoxContainer"), NodePath("Warning"), NodePath("Window")] diff --git a/flecha/.godot/editor/create_recent.Node b/flecha/.godot/editor/create_recent.Node index 4f224d7..9aa7a77 100644 --- a/flecha/.godot/editor/create_recent.Node +++ b/flecha/.godot/editor/create_recent.Node @@ -1,2 +1,14 @@ -Timer -Sprite2D +Button +MenuButton +MenuBar +Label +ColorRect +VBoxContainer +Window +Control +MarginContainer +LineEdit +Panel +Popup +HBoxContainer +SpinBox diff --git a/flecha/.godot/editor/editor_layout.cfg b/flecha/.godot/editor/editor_layout.cfg index 0e52393..fadb9b7 100644 --- a/flecha/.godot/editor/editor_layout.cfg +++ b/flecha/.godot/editor/editor_layout.cfg @@ -9,8 +9,8 @@ dock_filesystem_v_split_offset=0 dock_filesystem_display_mode=0 dock_filesystem_file_sort=0 dock_filesystem_file_list_display_mode=1 -dock_filesystem_selected_paths=PackedStringArray("res://") -dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://") +dock_filesystem_selected_paths=PackedStringArray("res://scenes/configuration.tscn") +dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/") dock_node_current_tab=0 dock_history_include_scene=true dock_history_include_global=true @@ -28,8 +28,8 @@ dock_5="Inspector,Node,History" [EditorNode] -open_scenes=PackedStringArray("res://node_2d.tscn") -current_scene="res://node_2d.tscn" +open_scenes=PackedStringArray("res://scenes/game.tscn", "res://scenes/configuration.tscn") +current_scene="res://scenes/game.tscn" center_split_offset=0 selected_default_debugger_tab_idx=0 selected_main_editor_idx=2 @@ -43,8 +43,8 @@ position=Vector2i(0, 23) [ScriptEditor] -open_scripts=["res://node_2d.gd"] -selected_script="res://node_2d.gd" +open_scripts=["res://scripts/configuration.gd", "res://scripts/game.gd", "res://scripts/game_data.gd", "res://scripts/screen_manager.gd"] +selected_script="res://scripts/configuration.gd" open_help=[] script_split_offset=200 list_split_offset=0 diff --git a/flecha/.godot/editor/favorite_properties b/flecha/.godot/editor/favorite_properties new file mode 100644 index 0000000..e69de29 diff --git a/flecha/.godot/editor/favorites b/flecha/.godot/editor/favorites new file mode 100644 index 0000000..e69de29 diff --git a/flecha/.godot/editor/filesystem_cache10 b/flecha/.godot/editor/filesystem_cache10 index 8bd6dee..553189c 100644 --- a/flecha/.godot/editor/filesystem_cache10 +++ b/flecha/.godot/editor/filesystem_cache10 @@ -1,3 +1,11 @@ ea4bc82a6ad023ab7ee23ee620429895 -::res://::1744467978 -icon.svg::CompressedTexture2D::5807478111763404517::1744467965::1744467980::1::::<><><>0<>0<>6a8052f6208c427a34f6f514166b9bac<>res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex:: +::res://::1744844331 +icon.svg::CompressedTexture2D/CompressedTexture2D::5807478111763404517::1744467965::1744467980::1::::<><><>0<>0<>6a8052f6208c427a34f6f514166b9bac<>res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex:: +::res://scenes/::1744838226 +configuration.tscn::PackedScene::312554977436884888::1744837973::0::1::::<><><>0<>0<><>::uid://b0v2rmxwitij6::::res://scripts/configuration.gd +game.tscn::PackedScene::5093708828993328579::1744838226::0::1::::<><><>0<>0<><>::uid://dlc5nmf2nugla::::res://scripts/game.gd +::res://scripts/::1744836302 +configuration.gd::GDScript::4186164091601973385::1744836133::0::1::::<>Control<><>0<>0<><>:: +game.gd::GDScript::7937313450958682526::1744836302::0::1::::<>Control<><>0<>0<><>:: +game_data.gd::GDScript::1758829371016059888::1744836040::0::1::::<>Node<><>0<>0<><>:: +screen_manager.gd::GDScript/GDScript::9192089233732530152::1744482591::0::1::::<>Node<><>0<>0<><>:: diff --git a/flecha/.godot/editor/filesystem_update4 b/flecha/.godot/editor/filesystem_update4 index 2d27fa3..5a2a0ec 100644 --- a/flecha/.godot/editor/filesystem_update4 +++ b/flecha/.godot/editor/filesystem_update4 @@ -1,2 +1,5 @@ -res://node_2d.gd -res://node_2d.tscn +res://scenes/game.tscn +res://scripts/game.gd +res://scripts/configuration.gd +res://scripts/game_data.gd +res://scenes/configuration.tscn diff --git a/flecha/.godot/editor/game.gd-folding-ba51fdadef04e64772b438b04f73dd55.cfg b/flecha/.godot/editor/game.gd-folding-ba51fdadef04e64772b438b04f73dd55.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/flecha/.godot/editor/game.gd-folding-ba51fdadef04e64772b438b04f73dd55.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/flecha/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg b/flecha/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg new file mode 100644 index 0000000..49e51b2 --- /dev/null +++ b/flecha/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg @@ -0,0 +1,195 @@ +[editor_states] + +Anim={ +"visible": false +} +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(-939.95, -405.857), +"primary_grid_step": Vector2i(8, 8), +"show_group_gizmos": true, +"show_guides": true, +"show_helpers": false, +"show_lock_gizmos": true, +"show_origin": true, +"show_position_gizmos": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.261799, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 0.385543 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"MeshInstance3DCustomAABB": 0, +"NavigationLink3D": 0, +"NavigationObstacle3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Particles3DEmissionShape": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"SpringBoneCollision3D": 0, +"SpringBoneSimulator3D": 0, +"VehicleWheel3D": 0, +"VisibleOnScreenNotifier3D": 0, +"VoxelGI": 0 +}, +"local_coords": false, +"preview_sun_env": { +"environ_ao_enabled": false, +"environ_enabled": true, +"environ_energy": 1.0, +"environ_gi_enabled": false, +"environ_glow_enabled": false, +"environ_ground_color": Color(0.2, 0.169, 0.133, 1), +"environ_sky_color": Color(0.385, 0.454, 0.55, 1), +"environ_tonemap_enabled": true, +"sun_color": Color(1, 1, 1, 1), +"sun_enabled": true, +"sun_energy": 1.0, +"sun_max_distance": 100.0, +"sun_rotation": Vector2(-1.0472, 2.61799) +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +Game={ +"camera_override_mode": 2, +"hide_selection": false, +"select_mode": 0 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game/WinnerSelector/VBoxContainer")]) diff --git a/flecha/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg b/flecha/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg new file mode 100644 index 0000000..7b192d6 --- /dev/null +++ b/flecha/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Layout"), NodePath("WinnerSelector/ColorRect"), PackedStringArray("Layout"), NodePath("WinnerSelector/VBoxContainer"), PackedStringArray("Layout", "Layout/Container Sizing", "Layout/Transform", "Theme Overrides", "Theme Overrides/constants"), NodePath("WinnerSelector/VBoxContainer/Label"), PackedStringArray("Layout/Container Sizing", "Theme Overrides", "Theme Overrides/colors"), NodePath("WinnerSelector/VBoxContainer/MenuPlayers"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/colors", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("WinnerSelector/VBoxContainer/Button"), PackedStringArray("Layout", "Layout/Container Sizing", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("Blocker"), PackedStringArray("Layout")] +resource_unfolds=["res://scenes/game.tscn::StyleBoxFlat_uwrxv", PackedStringArray(), "res://scenes/game.tscn::StyleBoxFlat_yqjtg", PackedStringArray()] +nodes_folded=[NodePath("WinnerSelector"), NodePath("WinnerSelector/VBoxContainer")] diff --git a/flecha/.godot/editor/game_data.gd-folding-700f0ba5e90ccece67401374e760da81.cfg b/flecha/.godot/editor/game_data.gd-folding-700f0ba5e90ccece67401374e760da81.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/flecha/.godot/editor/game_data.gd-folding-700f0ba5e90ccece67401374e760da81.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/flecha/.godot/editor/node_2d.tscn-editstate-da2a40d540ef1cd3dc4e6444baa553db.cfg b/flecha/.godot/editor/node_2d.tscn-editstate-da2a40d540ef1cd3dc4e6444baa553db.cfg new file mode 100644 index 0000000..4e847b8 --- /dev/null +++ b/flecha/.godot/editor/node_2d.tscn-editstate-da2a40d540ef1cd3dc4e6444baa553db.cfg @@ -0,0 +1,195 @@ +[editor_states] + +Anim={ +"visible": false +} +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(-165, -110), +"primary_grid_step": Vector2i(8, 8), +"show_group_gizmos": true, +"show_guides": true, +"show_helpers": false, +"show_lock_gizmos": true, +"show_origin": true, +"show_position_gizmos": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.261799, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 1.0 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"MeshInstance3DCustomAABB": 0, +"NavigationLink3D": 0, +"NavigationObstacle3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Particles3DEmissionShape": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"SpringBoneCollision3D": 0, +"SpringBoneSimulator3D": 0, +"VehicleWheel3D": 0, +"VisibleOnScreenNotifier3D": 0, +"VoxelGI": 0 +}, +"local_coords": false, +"preview_sun_env": { +"environ_ao_enabled": false, +"environ_enabled": true, +"environ_energy": 1.0, +"environ_gi_enabled": false, +"environ_glow_enabled": false, +"environ_ground_color": Color(0.2, 0.169, 0.133, 1), +"environ_sky_color": Color(0.385, 0.454, 0.55, 1), +"environ_tonemap_enabled": true, +"sun_color": Color(1, 1, 1, 1), +"sun_enabled": true, +"sun_energy": 1.0, +"sun_max_distance": 100.0, +"sun_rotation": Vector2(-1.0472, 2.61799) +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +Game={ +"camera_override_mode": 2, +"hide_selection": false, +"select_mode": 0 +} +selected_nodes=Array[NodePath]([]) diff --git a/flecha/.godot/editor/node_2d.tscn-folding-da2a40d540ef1cd3dc4e6444baa553db.cfg b/flecha/.godot/editor/node_2d.tscn-folding-da2a40d540ef1cd3dc4e6444baa553db.cfg new file mode 100644 index 0000000..1d019fa --- /dev/null +++ b/flecha/.godot/editor/node_2d.tscn-folding-da2a40d540ef1cd3dc4e6444baa553db.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[] +resource_unfolds=[] +nodes_folded=[] diff --git a/flecha/.godot/editor/project_metadata.cfg b/flecha/.godot/editor/project_metadata.cfg index 4ee2f3b..45e2ce6 100644 --- a/flecha/.godot/editor/project_metadata.cfg +++ b/flecha/.godot/editor/project_metadata.cfg @@ -1,6 +1,7 @@ [editor_metadata] executable_path="C:/Users/moran/Downloads/Godot_v4.4.1-stable_win64.exe/Godot_v4.4.1-stable_win64.exe" +use_advanced_connections=true [dialog_bounds] @@ -13,5 +14,10 @@ last_selected_language="GDScript" [recent_files] -scripts=["res://node_2d.gd"] -scenes=["res://node_2d.tscn"] +scripts=["res://scripts/game_data.gd", "res://scripts/screen_manager.gd", "res://scenes/configuration.gd", "res://node_2d.gd"] +scenes=["res://scenes/configuration.tscn", "res://scenes/game.tscn", "res://scripts/node_2d.tscn", "res://node_2d.tscn"] + +[color_picker] + +picker_shape=3 +recent_presets=PackedColorArray(0.588235, 0.654902, 0.686275, 1, 0.196078, 0.309804, 0.368627, 1, 0.196078, 0.309804, 0.368627, 1, 0.588235, 0.654902, 0.686275, 1, 0.196078, 0.309804, 0.368627, 1, 0.8, 0.8, 0.8, 1, 0.196078, 0.309804, 0.368627, 0.784314, 0.588235, 0.654902, 0.686275, 1, 0.196078, 0.309804, 0.368627, 1) diff --git a/flecha/.godot/editor/recent_dirs b/flecha/.godot/editor/recent_dirs index 7eeb8d1..17c06a5 100644 --- a/flecha/.godot/editor/recent_dirs +++ b/flecha/.godot/editor/recent_dirs @@ -1 +1,2 @@ +res://scripts res:// diff --git a/flecha/.godot/editor/screen_manager.gd-folding-17de4f11aa617a717e882038b1e091a5.cfg b/flecha/.godot/editor/screen_manager.gd-folding-17de4f11aa617a717e882038b1e091a5.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/flecha/.godot/editor/screen_manager.gd-folding-17de4f11aa617a717e882038b1e091a5.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/flecha/.godot/editor/script_editor_cache.cfg b/flecha/.godot/editor/script_editor_cache.cfg index 5dd4bc9..178b635 100644 --- a/flecha/.godot/editor/script_editor_cache.cfg +++ b/flecha/.godot/editor/script_editor_cache.cfg @@ -1,12 +1,54 @@ -[res://node_2d.gd] +[res://scripts/game.gd] state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 15, +"column": 37, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 14, +"row": 109, +"scroll_position": 93.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://scripts/configuration.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 0, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 10, +"scroll_position": 0.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://scripts/screen_manager.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 47, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 8, +"scroll_position": 0.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://scripts/game_data.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 0, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 2, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" diff --git a/flecha/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/b547968aa19902bd49de94fd81aaa8c91331c7dc.cache b/flecha/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/b547968aa19902bd49de94fd81aaa8c91331c7dc.cache new file mode 100644 index 0000000..c3981bb Binary files /dev/null and b/flecha/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/b547968aa19902bd49de94fd81aaa8c91331c7dc.cache differ diff --git a/flecha/.godot/uid_cache.bin b/flecha/.godot/uid_cache.bin index aa3a304..37dafe0 100644 Binary files a/flecha/.godot/uid_cache.bin and b/flecha/.godot/uid_cache.bin differ diff --git a/flecha/node_2d.gd b/flecha/node_2d.gd deleted file mode 100644 index 026d676..0000000 --- a/flecha/node_2d.gd +++ /dev/null @@ -1,77 +0,0 @@ -extends Node2D - -@export var direction_count := 4 # 2, 4, u 8 direcciones -@export var interval := 5.0 # Tiempo entre giros -@export var margin_ratio := 0.1 # Margen visual - -var directions: Array[int] = [] -var arrow: Polygon2D -var timer: Timer -var last_angle: int = -1 # Última dirección usada (inicial -1 para que no se repita) - -func _ready(): - get_viewport().connect("size_changed", Callable(self, "_on_viewport_resized")) - - # Crear flecha - arrow = Polygon2D.new() - add_child(arrow) - arrow.polygon = _generate_arrow_shape() - arrow.color = Color.DARK_RED - _update_arrow_transform() - - # Crear y configurar el temporizador - timer = Timer.new() - timer.wait_time = interval - timer.autostart = true - timer.one_shot = false - add_child(timer) - timer.connect("timeout", Callable(self, "_on_timer_timeout")) - - # Configurar posibles direcciones - _set_possible_directions() - change_direction() - -func _generate_arrow_shape() -> PackedVector2Array: - return [ - Vector2(0, -1), - Vector2(0.4, 0.4), - Vector2(0.2, 0.4), - Vector2(0.2, 1), - Vector2(-0.2, 1), - Vector2(-0.2, 0.4), - Vector2(-0.4, 0.4), - ] - -func _update_arrow_transform(): - var screen_size = get_viewport().get_visible_rect().size - var min_dim = min(screen_size.x, screen_size.y) - var usable_space = min_dim * (1.0 - margin_ratio * 2) - - arrow.scale = Vector2(usable_space / 2, usable_space / 2) - arrow.position = screen_size / 2 - -func _on_viewport_resized(): - _update_arrow_transform() - -func _set_possible_directions(): - match direction_count: - 2: - directions = [0, 180] - 4: - directions = [0, 90, 180, 270] - 8: - directions = [0, 45, 90, 135, 180, 225, 270, 315] - _: - directions = [0, 180] - -func change_direction(): - var possible = directions.duplicate() - if last_angle != -1 and possible.size() > 1: - possible.erase(last_angle) - - var angle = possible[randi() % possible.size()] - last_angle = angle - arrow.rotation_degrees = angle - -func _on_timer_timeout(): - change_direction() diff --git a/flecha/node_2d.tscn b/flecha/node_2d.tscn deleted file mode 100644 index 2a6aec8..0000000 --- a/flecha/node_2d.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://cetov1c7e36bf"] - -[ext_resource type="Script" uid="uid://dlc5nmf2nugla" path="res://node_2d.gd" id="1_wtcfe"] - -[node name="Node2D" type="Node2D"] -script = ExtResource("1_wtcfe") diff --git a/flecha/project.godot b/flecha/project.godot index 9ca3fbb..aa40171 100644 --- a/flecha/project.godot +++ b/flecha/project.godot @@ -11,14 +11,20 @@ config_version=5 [application] config/name="Flecha" -run/main_scene="uid://cetov1c7e36bf" +run/main_scene="uid://epny8pd1m4ae" config/features=PackedStringArray("4.4", "GL Compatibility") config/icon="res://icon.svg" +[autoload] + +ScreenManager="*res://scripts/screen_manager.gd" +GameData="*res://scripts/game_data.gd" + [display] window/size/viewport_width=1920 window/size/viewport_height=1080 +window/stretch/mode="viewport" [rendering] diff --git a/flecha/scenes/configuration.tscn b/flecha/scenes/configuration.tscn new file mode 100644 index 0000000..f04d54f --- /dev/null +++ b/flecha/scenes/configuration.tscn @@ -0,0 +1,297 @@ +[gd_scene load_steps=16 format=3 uid="uid://epny8pd1m4ae"] + +[ext_resource type="Script" uid="uid://b0v2rmxwitij6" path="res://scripts/configuration.gd" id="1_hc4xr"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7wcdq"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lditi"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_awm5k"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sb302"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kbhjk"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kporg"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_soind"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_etp6l"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="ViewportTexture" id="ViewportTexture_hc4xr"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_n87a2"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hc4xr"] +bg_color = Color(0, 0, 0, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1in02"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yojix"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dx48e"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[node name="Configuration" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_hc4xr") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 30 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 +theme_override_constants/separation = 10 + +[node name="Label3" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 50 +text = "CONFIGURACIÓN" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="LabelSelectPlayers" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 +text = "Selecciona los jugadores" + +[node name="MenuButton" type="MenuButton" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(1000, 40) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_7wcdq") +text = "Seleccionar jugador " +flat = false +alignment = 0 + +[node name="LabelPlayersSelected" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 20 +text = "Jugadores seleccionados(Para eliminar seleccione el jugador a eliminar)" + +[node name="FlowContainer" type="FlowContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 + +[node name="WarningLabel" type="Label" parent="MarginContainer/VBoxContainer/FlowContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +text = "Selecciona al menos 1 jugador" + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 +text = "Inserte los segundos entre cambios de direccion" + +[node name="Seconds" type="LineEdit" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(1000, 40) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_lditi") + +[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 +text = "Selecciona el numero de direcciones" + +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/separation = 18 + +[node name="Button2Directions" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"] +custom_minimum_size = Vector2(150, 80) +layout_mode = 2 +theme_override_font_sizes/font_size = 30 +theme_override_styles/pressed = SubResource("StyleBoxFlat_awm5k") +theme_override_styles/normal = SubResource("StyleBoxFlat_sb302") +toggle_mode = true +text = "2" + +[node name="Button4Directions" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"] +custom_minimum_size = Vector2(150, 80) +layout_mode = 2 +theme_override_font_sizes/font_size = 30 +theme_override_styles/pressed = SubResource("StyleBoxFlat_kbhjk") +theme_override_styles/normal = SubResource("StyleBoxFlat_kporg") +toggle_mode = true +text = "4" + +[node name="Button8Directions" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"] +custom_minimum_size = Vector2(150, 80) +layout_mode = 2 +theme_override_font_sizes/font_size = 30 +theme_override_styles/pressed = SubResource("StyleBoxFlat_soind") +theme_override_styles/normal = SubResource("StyleBoxFlat_etp6l") +toggle_mode = true +text = "8" + +[node name="Label4" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 +text = "Dime el numero de objetos en cada dirección" + +[node name="RepeatsPerDirection" type="LineEdit" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(1000, 40) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_lditi") + +[node name="LabelSelectBgColor" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 +text = "Selecciona el color de fondo" + +[node name="BackgroundColorPickerButton" type="ColorPickerButton" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(250, 120) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 0 +icon = SubResource("ViewportTexture_hc4xr") +color = Color(1, 1, 1, 1) + +[node name="LabelArrowColor" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_font_sizes/font_size = 30 +text = "Selecciona el color de la flecha" + +[node name="ArrowColorPickerButton" type="ColorPickerButton" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(250, 120) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 0 +color = Color(0.700514, 0, 0.0920325, 1) + +[node name="PlayButton" type="Button" parent="MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(1000, 50) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme_override_styles/normal = SubResource("StyleBoxFlat_n87a2") +text = "EMPEZAR JUEGO" + +[node name="Warning" type="Popup" parent="."] +title = "Alerta ⚠️" +borderless = false + +[node name="Panel" type="Panel" parent="Warning"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_hc4xr") + +[node name="Window" type="Window" parent="."] +initial_position = 1 +size = Vector2i(500, 230) +visible = false + +[node name="ColorRect" type="ColorRect" parent="Window"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.8, 0.8, 0.8, 1) + +[node name="VBoxContainer" type="VBoxContainer" parent="Window"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -200.0 +offset_top = -99.0 +offset_right = 200.0 +offset_bottom = 99.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 10 + +[node name="Label" type="Label" parent="Window/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +text = "Correo electronico" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="EmailInput" type="LineEdit" parent="Window/VBoxContainer"] +custom_minimum_size = Vector2(400, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_1in02") + +[node name="Label2" type="Label" parent="Window/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +text = "Contraseña" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="PasswordInput" type="LineEdit" parent="Window/VBoxContainer"] +custom_minimum_size = Vector2(400, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_yojix") + +[node name="LogInButton" type="Button" parent="Window/VBoxContainer"] +custom_minimum_size = Vector2(250, 50) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme_override_styles/normal = SubResource("StyleBoxFlat_dx48e") +text = "Iniciar sesion" + +[node name="Blocker" type="ColorRect" parent="."] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.196078, 0.309804, 0.368627, 0.784314) + +[connection signal="pressed" from="MarginContainer/VBoxContainer/PlayButton" to="." method="_on_play_button_pressed"] +[connection signal="pressed" from="Window/VBoxContainer/LogInButton" to="." method="_on_log_in_button_pressed"] diff --git a/flecha/scenes/game.tscn b/flecha/scenes/game.tscn new file mode 100644 index 0000000..b67e25c --- /dev/null +++ b/flecha/scenes/game.tscn @@ -0,0 +1,83 @@ +[gd_scene load_steps=4 format=3 uid="uid://cetov1c7e36bf"] + +[ext_resource type="Script" uid="uid://dlc5nmf2nugla" path="res://scripts/game.gd" id="1_uwrxv"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uwrxv"] +bg_color = Color(0.588235, 0.654902, 0.686275, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yqjtg"] +bg_color = Color(0.196078, 0.309804, 0.368627, 1) + +[node name="Game" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_uwrxv") + +[node name="WinnerSelector" type="Window" parent="."] +initial_position = 1 +size = Vector2i(500, 230) +visible = false + +[node name="ColorRect" type="ColorRect" parent="WinnerSelector"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.8, 0.8, 0.8, 1) + +[node name="VBoxContainer" type="VBoxContainer" parent="WinnerSelector"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -225.0 +offset_top = -62.0 +offset_right = 225.0 +offset_bottom = 62.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 30 + +[node name="Label" type="Label" parent="WinnerSelector/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +text = "¿Quien a ganado?" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="MenuPlayers" type="MenuButton" parent="WinnerSelector/VBoxContainer"] +custom_minimum_size = Vector2(450, 30) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_colors/font_color = Color(0.196078, 0.309804, 0.368627, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_uwrxv") +text = "Jugadores 🡣" +flat = false + +[node name="Button" type="Button" parent="WinnerSelector/VBoxContainer"] +custom_minimum_size = Vector2(250, 50) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +theme_override_styles/normal = SubResource("StyleBoxFlat_yqjtg") +text = "Finalizar partida" + +[node name="Blocker" type="ColorRect" parent="."] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.196078, 0.309804, 0.368627, 0.784314) + +[connection signal="pressed" from="WinnerSelector/VBoxContainer/Button" to="." method="_on_winner_button_pressed"] diff --git a/flecha/scripts/configuration.gd b/flecha/scripts/configuration.gd new file mode 100644 index 0000000..f577087 --- /dev/null +++ b/flecha/scripts/configuration.gd @@ -0,0 +1,169 @@ +extends Control + +@onready var login_popup = $Window +@onready var email_input = $Window/VBoxContainer/EmailInput +@onready var password_input = $Window/VBoxContainer/PasswordInput + +@onready var menu_button: MenuButton = $MarginContainer/VBoxContainer/MenuButton +@onready var seleccionados_container: FlowContainer = $MarginContainer/VBoxContainer/FlowContainer +@onready var warning_label: Label = $MarginContainer/VBoxContainer/FlowContainer/WarningLabel +@onready var seconds_input: LineEdit = $MarginContainer/VBoxContainer/Seconds + +@onready var button_2_directions = $MarginContainer/VBoxContainer/HBoxContainer/Button2Directions +@onready var button_4_directions = $MarginContainer/VBoxContainer/HBoxContainer/Button4Directions +@onready var button_8_directions = $MarginContainer/VBoxContainer/HBoxContainer/Button8Directions + +@onready var repeats_per_direction_input = $MarginContainer/VBoxContainer/RepeatsPerDirection + +@onready var bg_color_picker: ColorPickerButton = $MarginContainer/VBoxContainer/BackgroundColorPickerButton +@onready var arrow_color_picker: ColorPickerButton = $MarginContainer/VBoxContainer/ArrowColorPickerButton + +var todos_los_jugadores = [] +var jugadores_disponibles = [] +var jugadores_seleccionados = [] + +var directions = 0 +var level = -1 + +func _ready(): + RenderingServer.set_default_clear_color("#CCCCCC") + + await get_tree().process_frame # Esperar a que todo esté listo + + if GameData.id_user == -1: + login_popup.show() + $Blocker.visible = true + + todos_los_jugadores = await GameData.get_residents_loaded() + jugadores_disponibles = todos_los_jugadores.duplicate() + _actualizar_menu() + + # Conectar señal de selección + menu_button.get_popup().connect("id_pressed", Callable(self, "_on_jugador_seleccionado")) + + button_2_directions.pressed.connect(Callable(self, "_on_directions_pressed").bind(button_2_directions)) + button_4_directions.pressed.connect(Callable(self, "_on_directions_pressed").bind(button_4_directions)) + button_8_directions.pressed.connect(Callable(self, "_on_directions_pressed").bind(button_8_directions)) + +func _on_log_in_button_pressed(): + var users = await GameData.get_users_loaded() + var username = email_input.text.strip_edges() + var password = password_input.text.strip_edges() + + for user in users: + if user.email == username: + GameData.id_user = int(user.id) + login_popup.hide() + $Blocker.visible = false + break + + if GameData.id_user == -1: + email_input.clear() + password_input.clear() + + var stylebox_email = email_input.get_theme_stylebox("normal") as StyleBoxFlat + var stylebox_password = password_input.get_theme_stylebox("normal") as StyleBoxFlat + if stylebox_email and stylebox_password: + stylebox_email.bg_color = Color(1, 0.8, 0.8) + stylebox_password.bg_color = Color(1, 0.8, 0.8) + +func _actualizar_menu(): + var popup = menu_button.get_popup() + popup.clear() + for i in jugadores_disponibles.size(): + popup.add_item(jugadores_disponibles[i].nombre, i) + +func _on_jugador_seleccionado(index: int): + var jugador = jugadores_disponibles[index] + jugadores_seleccionados.append(jugador) + jugadores_disponibles.erase(jugador) + _actualizar_menu() + _agregar_jugador_visual(jugador.nombre) + + if warning_label.visible: + warning_label.visible = false + +func _agregar_jugador_visual(nombre: String): + var boton = Button.new() + boton.text = nombre + " ❌" + boton.name = nombre + boton.pressed.connect(Callable(self, "_quitar_jugador").bind(nombre)) + seleccionados_container.add_child(boton) + +func _quitar_jugador(nombre: String): + # Quitar de la vista + var boton = seleccionados_container.get_node(nombre) + if boton: + seleccionados_container.remove_child(boton) + boton.queue_free() + + # Buscar el jugador por nombre + for jugador in jugadores_seleccionados: + if jugador.nombre == nombre: + jugadores_seleccionados.erase(jugador) + jugadores_disponibles.append(jugador) + break + + jugadores_disponibles.sort_custom(func(a, b): return a.nombre < b.nombre) + _actualizar_menu() + + if jugadores_seleccionados.is_empty(): + warning_label.visible = true + + +func _on_directions_pressed(button : Button): + # Desmarcar todos los botones + button_2_directions.button_pressed = false + button_4_directions.button_pressed = false + button_8_directions.button_pressed = false + + # Marcar el botón seleccionado + button.button_pressed = true + + # Actualizar el valor de directions + match button: + button_2_directions: + directions = 2 + level = 0 + button_4_directions: + directions = 4 + level = 1 + button_8_directions: + directions = 8 + level = 2 + +func _on_play_button_pressed(): + for child in $Warning/Panel.get_children(): + $Warning/Panel.remove_child(child) + child.queue_free() + + var warning_text = Label.new() + warning_text.text = "" + if jugadores_seleccionados.is_empty() : + warning_text.text = " - Debe seleccionar al menos un jugador\n" + if seconds_input.text.is_empty(): + warning_text.text += " - Debe insertar un numero de segundos\n" + if directions == 0: + warning_text.text += " - Debe selecionar las direcciones\n" + if repeats_per_direction_input.text.is_empty(): + warning_text.text += " - Debe insertar numero de obejtos por direccion" + + if warning_text.text != "": + $Warning/Panel.add_child(warning_text) + $Warning.popup_centered(Vector2(500, 200)) + return + + var game_scene = preload("res://scenes/game.tscn").instantiate() + + game_scene.bg_color = bg_color_picker.color + game_scene.arrow_color = arrow_color_picker.color + + game_scene.interval = int(seconds_input.text) + game_scene.direction_count = directions + game_scene.max_repeats_per_direction = repeats_per_direction_input.text + game_scene.selected_players = jugadores_seleccionados + + for jugador in jugadores_seleccionados: + GameData.start_game(int(jugador.id), level) + + ScreenManager.change_scene(game_scene, self) diff --git a/flecha/scripts/configuration.gd.uid b/flecha/scripts/configuration.gd.uid new file mode 100644 index 0000000..b1b3834 --- /dev/null +++ b/flecha/scripts/configuration.gd.uid @@ -0,0 +1 @@ +uid://b0v2rmxwitij6 diff --git a/flecha/scripts/game.gd b/flecha/scripts/game.gd new file mode 100644 index 0000000..a260eb0 --- /dev/null +++ b/flecha/scripts/game.gd @@ -0,0 +1,115 @@ +extends Control + +@export var bg_color: Color = Color(1, 0, 0) +@export var arrow_color: Color = Color(1, 0, 0) +@export var direction_count = -1 +@export var interval = 2 +@export var margin_ratio = 0.1 +@export var max_repeats_per_direction: int = 3 + +@export var selected_players = [] +var ganador = -1 +@onready var winner_selector = $WinnerSelector +@onready var menu_players = $WinnerSelector/VBoxContainer/MenuPlayers + +var directions: Array[int] = [] +var direction_usage: Dictionary = {} +var arrow: Polygon2D +var last_angle: int = -1 +var direction_timer: Timer +var end_popup: Popup + +func _ready(): + RenderingServer.set_default_clear_color(bg_color) + get_viewport().connect("size_changed", Callable(self, "_on_viewport_resized")) + + # Crear flecha + arrow = Polygon2D.new() + add_child(arrow) + arrow.polygon = _generate_arrow_shape() + arrow.color = arrow_color + _update_arrow_transform() + + # Configurar posibles direcciones + _set_possible_directions() + change_direction() + + # Crear y configurar Timer + direction_timer = Timer.new() + direction_timer.wait_time = interval + direction_timer.autostart = true + direction_timer.one_shot = false + direction_timer.connect("timeout", Callable(self, "change_direction")) + add_child(direction_timer) + direction_timer.start() + +func _generate_arrow_shape() -> PackedVector2Array: + return [ + Vector2(0, -1), + Vector2(0.4, 0.4), + Vector2(0.2, 0.4), + Vector2(0.2, 1), + Vector2(-0.2, 1), + Vector2(-0.2, 0.4), + Vector2(-0.4, 0.4), + ] + +func _update_arrow_transform(): + var screen_size = get_viewport().get_visible_rect().size + var min_dim = min(screen_size.x, screen_size.y) + var usable_space = min_dim * (1.0 - margin_ratio * 2) + + arrow.scale = Vector2(usable_space / 2, usable_space / 2) + arrow.position = screen_size / 2 + +func _on_viewport_resized(): + _update_arrow_transform() + +func _set_possible_directions(): + match direction_count: + 2: + directions = [0, 180] + 4: + directions = [0, 90, 180, 270] + 8: + directions = [0, 45, 90, 135, 180, 225, 270, 315] + + direction_usage.clear() + for dir in directions: + direction_usage[dir] = 0 + +func change_direction(): + var possible = directions.filter(func(d): + return direction_usage[d] < max_repeats_per_direction + ) + + if last_angle != -1 and possible.size() > 1: + possible = possible.filter(func(d): + return d != last_angle + ) + + if possible.is_empty(): + print("Todas las direcciones alcanzaron su máximo.") + direction_timer.stop() + end_of_game() + return + + var angle = possible[randi() % possible.size()] + last_angle = angle + direction_usage[angle] += 1 + arrow.rotation_degrees = angle + +func end_of_game(): + for i in selected_players.size(): + menu_players.get_popup().add_item(selected_players[i].nombre, i) + menu_players.get_popup().connect("id_pressed", Callable(self, "_on_jugador_seleccionado")) + winner_selector.show() + $Blocker.visible = true + +func _on_jugador_seleccionado(index: int): + ganador = selected_players[index].id + +func _on_winner_button_pressed(): + if ganador != -1: + GameData.end_game(ganador) + ScreenManager.go_back_to_previous_scene() diff --git a/flecha/node_2d.gd.uid b/flecha/scripts/game.gd.uid similarity index 100% rename from flecha/node_2d.gd.uid rename to flecha/scripts/game.gd.uid diff --git a/flecha/scripts/game_data.gd b/flecha/scripts/game_data.gd new file mode 100644 index 0000000..31621c6 --- /dev/null +++ b/flecha/scripts/game_data.gd @@ -0,0 +1,220 @@ +extends Node +# Este script se encarga de comunicarse con la API + + +#Señales para saber cuando se recibe los datos +signal users_received(users) +signal residents_received(residents) +signal games_received(games) + +var all_users = [] +var all_residents = [] +var all_games = [] + +var resident_playing = -1 +var start_time: int = 0 +var end_time: int = 0 +var level_game = -1 + +var partidas_activas: Array = [] +var id_user = -1 + +### Metodo para inicar partida +func start_game(resident, level): + var partida = { + "idUsuario": id_user, + "idResidente": resident, + "start_time": Time.get_unix_time_from_system(), + "nivel": level + } + partidas_activas.append(partida) + +### Metodo para finalizar partida +func end_game(ganador): + var end_time = Time.get_unix_time_from_system() + + var games = await get_games_loaded() + var game_id = 0; + for game in games: + if game.nombre == "Flecha y reacciona": + game_id = 2 #game.id + for partida in partidas_activas: + var fallos = 0 + print(ganador) + print(partida["idResidente"]) + if partida["idResidente"] == ganador: + fallos = 1 + var duracion: int = end_time - partida["start_time"] + + var data = { + "idJuego": game_id, + "idResidente": partida["idResidente"], + "idUsuario": partida["idUsuario"], + "fallos": fallos, + "duracion": duracion, + "dificultad": partida["nivel"] + } + send_game_data(data) + + partidas_activas.clear() + +### Metodo para calcular la duracion entre el incio y el final de la partida (en segundos) +func get_duration() -> int: + return end_time - start_time + +#-------------------------------------GET USERS------------------------------------------------------- + +func get_users(): + var http_request = HTTPRequest.new() + get_tree().root.add_child(http_request) + + var status = http_request.connect( + "request_completed", + Callable(self, "_on_request_get_users").bind(http_request) + ) + + var url = "http://localhost:8080/resi/users" + var headers = ["User-Agent: Godot"] + var error = http_request.request(url, headers) + + if error != OK: + print("Error al hacer GET:", error) + +### Metodo para parsear json de residentes y que emite una señal cuando lo tenga +func _on_request_get_users(result, response_code, headers, body, request_node): + print("Código de respuesta:", response_code) + + if response_code == 200: + var response_text = body.get_string_from_utf8() + var parsed = JSON.parse_string(response_text) + + if parsed != null: + all_users = parsed + print("Users obtenidos:", all_users) + + # Emitir la señal para notificar a quien esté conectado + emit_signal("users_received", all_users) + else: + print("Error al parsear JSON") + else: + print("Error del servidor o conexión:", response_code) + + request_node.queue_free() # Liberar para evitar error 31 + +### Metodo que espera a la señal de que se han obtenido y parseado los residentes y los devuelve. +func get_users_loaded() -> Array: + print("Hola") + get_users() + var result = await self.users_received + return result + +#--------------------------------------GET RESIDENTES----------------------------------------------- + +### Metodo para hacer un get a la api de todos los residentes +func get_residents(): + var http_request = HTTPRequest.new() + get_tree().root.add_child(http_request) + + var status = http_request.connect( + "request_completed", + Callable(self, "_on_request_get_residents").bind(http_request) + ) + + var url = "http://localhost:8080/resi/residents" + var headers = ["User-Agent: Godot"] + var error = http_request.request(url, headers) + + if error != OK: + print("Error al hacer GET:", error) + +### Metodo para parsear json de residentes y que emite una señal cuando lo tenga +func _on_request_get_residents(result, response_code, headers, body, request_node): + print("Código de respuesta:", response_code) + + if response_code == 200: + var response_text = body.get_string_from_utf8() + var parsed = JSON.parse_string(response_text) + + if parsed != null: + all_residents = parsed + print("Residentes obtenidos:", all_residents) + + # Emitir la señal para notificar a quien esté conectado + emit_signal("residents_received", all_residents) + else: + print("Error al parsear JSON") + else: + print("Error del servidor o conexión:", response_code) + + request_node.queue_free() # Liberar para evitar error 31 + +### Metodo que espera a la señal de que se han obtenido y parseado los residentes y los devuelve. +func get_residents_loaded() -> Array: + get_residents() + var result = await self.residents_received + return result + + +# ----------------------------- GET JUEGOS -------------------------------------------- +func get_games(): + var http_request = HTTPRequest.new() + get_tree().root.add_child(http_request) + + var status = http_request.connect( + "request_completed", + Callable(self, "_on_request_get_games").bind(http_request) + ) + + var url = "http://localhost:8080/resi/juegos" + var headers = ["User-Agent: Godot"] + var error = http_request.request(url, headers) + + if error != OK: + print("Error al hacer GET en juegos:", error) + +### Metodo para parsear json de residentes y que emite una señal cuando lo tenga +func _on_request_get_games(result, response_code, headers, body, request_node): + print("Código de respuesta en juegos:", response_code) + + if response_code == 200: + var response_text = body.get_string_from_utf8() + var parsed = JSON.parse_string(response_text) + + if parsed != null: + all_games = parsed + print("Juegos obtenidos:", all_games) + + # Emitir la señal para notificar a quien esté conectado + emit_signal("games_received", all_games) + else: + print("Error al parsear JSON de juegos") + else: + print("Error del servidor o conexión en juegos:", response_code) + + request_node.queue_free() # Liberar para evitar error 31 + +### Metodo que espera a la señal de que se han obtenido y parseado los residentes y los devuelve. +func get_games_loaded() -> Array: + get_games() + var result = await self.games_received + return result + + + +# ------------------------------- POST PARTIDA ------------------------------------ + +func send_game_data(data: Dictionary): + var http_request = HTTPRequest.new() + get_tree().root.add_child(http_request) + + var json_body = JSON.stringify(data) + var headers = ["Content-Type: application/json"] + var url = "http://localhost:8080/resi/juegos/stats/add" + + http_request.connect("request_completed", Callable(self, "_on_game_data_sent").bind(http_request)) + var error = http_request.request(url, headers, HTTPClient.METHOD_POST, json_body) + + if error != OK: + print("Error al enviar los datos:", error) + + diff --git a/flecha/scripts/game_data.gd.uid b/flecha/scripts/game_data.gd.uid new file mode 100644 index 0000000..d65fc59 --- /dev/null +++ b/flecha/scripts/game_data.gd.uid @@ -0,0 +1 @@ +uid://0b8wsfuxfu3q diff --git a/flecha/scripts/screen_manager.gd b/flecha/scripts/screen_manager.gd new file mode 100644 index 0000000..c20b63b --- /dev/null +++ b/flecha/scripts/screen_manager.gd @@ -0,0 +1,22 @@ +extends Node +var previous_scene: Node = null +var current_scene: Node = null + +# Cambiar de escena: Agregar la nueva escena al árbol +func change_scene(new_scene: Node, actual_scene: Node): + previous_scene = actual_scene.duplicate() # Guardamos la escena anterior antes de liberar + current_scene = new_scene # Establecemos la nueva escena como la actual + actual_scene.queue_free() # Liberamos la escena actual + get_tree().root.add_child(current_scene) # Añadimos la nueva escena al árbol + print(previous_scene) + +# Volver a la escena anterior +func go_back_to_previous_scene(): + print(previous_scene) + if previous_scene: + current_scene.queue_free() # Liberamos la escena actual + get_tree().root.add_child(previous_scene) # Volver a agregar la escena anterior + current_scene = previous_scene # Establecemos la escena actual como la anterior + previous_scene = null # Limpiamos la referencia a la escena anterior + else: + print("No hay una escena anterior para volver.") diff --git a/flecha/scripts/screen_manager.gd.uid b/flecha/scripts/screen_manager.gd.uid new file mode 100644 index 0000000..a2d92f1 --- /dev/null +++ b/flecha/scripts/screen_manager.gd.uid @@ -0,0 +1 @@ +uid://d37ymp5ypg7yy diff --git a/seguir-la-linea/.godot/editor/GameScene.tscn-editstate-e2c04f88cc384ae305072b7c73076002.cfg b/seguir-la-linea/.godot/editor/GameScene.tscn-editstate-e2c04f88cc384ae305072b7c73076002.cfg index 6f66838..982ce32 100644 --- a/seguir-la-linea/.godot/editor/GameScene.tscn-editstate-e2c04f88cc384ae305072b7c73076002.cfg +++ b/seguir-la-linea/.godot/editor/GameScene.tscn-editstate-e2c04f88cc384ae305072b7c73076002.cfg @@ -192,4 +192,4 @@ Game={ "hide_selection": false, "select_mode": 0 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game")]) diff --git a/seguir-la-linea/.godot/editor/GameScene.tscn-folding-15024b5764635ac5d5eac182fd173676.cfg b/seguir-la-linea/.godot/editor/GameScene.tscn-folding-15024b5764635ac5d5eac182fd173676.cfg new file mode 100644 index 0000000..1d019fa --- /dev/null +++ b/seguir-la-linea/.godot/editor/GameScene.tscn-folding-15024b5764635ac5d5eac182fd173676.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[] +resource_unfolds=[] +nodes_folded=[] diff --git a/seguir-la-linea/.godot/editor/Main.tscn-editstate-bcb0d2eb5949c52b6a65bfe9de3e985b.cfg b/seguir-la-linea/.godot/editor/Main.tscn-editstate-bcb0d2eb5949c52b6a65bfe9de3e985b.cfg index 596f58a..982ce32 100644 --- a/seguir-la-linea/.godot/editor/Main.tscn-editstate-bcb0d2eb5949c52b6a65bfe9de3e985b.cfg +++ b/seguir-la-linea/.godot/editor/Main.tscn-editstate-bcb0d2eb5949c52b6a65bfe9de3e985b.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-680.193, -158.742), +"ofs": Vector2(-480.714, -205.194), "primary_grid_step": Vector2i(8, 8), "show_group_gizmos": true, "show_guides": true, @@ -34,7 +34,7 @@ Anim={ "snap_rotation_step": 0.261799, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 0.424098 +"zoom": 1.21 } 3D={ "fov": 70.01, @@ -192,4 +192,4 @@ Game={ "hide_selection": false, "select_mode": 0 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game")]) diff --git a/seguir-la-linea/.godot/editor/TextBox.tscn-editstate-e6a7070c3a999e756c325a4044202cff.cfg b/seguir-la-linea/.godot/editor/TextBox.tscn-editstate-e6a7070c3a999e756c325a4044202cff.cfg index 811b8b2..5a61cb4 100644 --- a/seguir-la-linea/.godot/editor/TextBox.tscn-editstate-e6a7070c3a999e756c325a4044202cff.cfg +++ b/seguir-la-linea/.godot/editor/TextBox.tscn-editstate-e6a7070c3a999e756c325a4044202cff.cfg @@ -192,4 +192,4 @@ Game={ "hide_selection": false, "select_mode": 0 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game")]) diff --git a/seguir-la-linea/.godot/editor/TextBox.tscn-editstate-fe3689df56c6ce64add0212fa01129e9.cfg b/seguir-la-linea/.godot/editor/TextBox.tscn-editstate-fe3689df56c6ce64add0212fa01129e9.cfg new file mode 100644 index 0000000..5a61cb4 --- /dev/null +++ b/seguir-la-linea/.godot/editor/TextBox.tscn-editstate-fe3689df56c6ce64add0212fa01129e9.cfg @@ -0,0 +1,195 @@ +[editor_states] + +Anim={ +"visible": false +} +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(-118.455, -99.2727), +"primary_grid_step": Vector2i(8, 8), +"show_group_gizmos": true, +"show_guides": true, +"show_helpers": false, +"show_lock_gizmos": true, +"show_origin": true, +"show_position_gizmos": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.261799, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 1.1 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"MeshInstance3DCustomAABB": 0, +"NavigationLink3D": 0, +"NavigationObstacle3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Particles3DEmissionShape": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"SpringBoneCollision3D": 0, +"SpringBoneSimulator3D": 0, +"VehicleWheel3D": 0, +"VisibleOnScreenNotifier3D": 0, +"VoxelGI": 0 +}, +"local_coords": false, +"preview_sun_env": { +"environ_ao_enabled": false, +"environ_enabled": true, +"environ_energy": 1.0, +"environ_gi_enabled": false, +"environ_glow_enabled": false, +"environ_ground_color": Color(0.2, 0.169, 0.133, 1), +"environ_sky_color": Color(0.385, 0.454, 0.55, 1), +"environ_tonemap_enabled": true, +"sun_color": Color(1, 1, 1, 1), +"sun_enabled": true, +"sun_energy": 1.0, +"sun_max_distance": 100.0, +"sun_rotation": Vector2(-1.0472, 2.61799) +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +Game={ +"camera_override_mode": 2, +"hide_selection": false, +"select_mode": 0 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game")]) diff --git a/seguir-la-linea/.godot/editor/TextBox.tscn-folding-fe3689df56c6ce64add0212fa01129e9.cfg b/seguir-la-linea/.godot/editor/TextBox.tscn-folding-fe3689df56c6ce64add0212fa01129e9.cfg new file mode 100644 index 0000000..be96980 --- /dev/null +++ b/seguir-la-linea/.godot/editor/TextBox.tscn-folding-fe3689df56c6ce64add0212fa01129e9.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Layout"), NodePath("Dragger"), PackedStringArray("Mouse"), NodePath("LineEdit"), PackedStringArray("Layout", "Layout/Transform", "Visibility", "Ordering")] +resource_unfolds=[] +nodes_folded=[NodePath("Dragger"), NodePath("LineEdit")] diff --git a/seguir-la-linea/.godot/editor/editor_layout.cfg b/seguir-la-linea/.godot/editor/editor_layout.cfg index a187025..9223f9d 100644 --- a/seguir-la-linea/.godot/editor/editor_layout.cfg +++ b/seguir-la-linea/.godot/editor/editor_layout.cfg @@ -9,7 +9,7 @@ dock_filesystem_v_split_offset=0 dock_filesystem_display_mode=0 dock_filesystem_file_sort=0 dock_filesystem_file_list_display_mode=1 -dock_filesystem_selected_paths=PackedStringArray("res://GameScene.tscn") +dock_filesystem_selected_paths=PackedStringArray("res://images/") dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://") dock_node_current_tab=0 dock_history_include_scene=true @@ -28,8 +28,8 @@ dock_5="Inspector,Node,History" [EditorNode] -open_scenes=PackedStringArray("res://GameScene.tscn", "res://Main.tscn", "res://TextBox.tscn") -current_scene="res://GameScene.tscn" +open_scenes=PackedStringArray("res://scenes/GameScene.tscn", "res://scenes/Main.tscn", "res://scenes/TextBox.tscn") +current_scene="res://scenes/GameScene.tscn" center_split_offset=0 selected_default_debugger_tab_idx=0 selected_main_editor_idx=2 @@ -44,8 +44,8 @@ size=Vector2i(1024, 1000) [ScriptEditor] -open_scripts=["res://circulo_dibujado.gd", "res://game.gd", "res://main.gd", "res://Screen_manager.gd", "res://text_box.gd"] -selected_script="res://game.gd" +open_scripts=["res://scripts/game.gd", "res://scripts/main.gd", "res://scripts/Screen_manager.gd", "res://scripts/text_box.gd"] +selected_script="res://scripts/game.gd" open_help=[] script_split_offset=243 list_split_offset=0 diff --git a/seguir-la-linea/.godot/editor/filesystem_cache10 b/seguir-la-linea/.godot/editor/filesystem_cache10 index 2b45756..611c0d1 100644 --- a/seguir-la-linea/.godot/editor/filesystem_cache10 +++ b/seguir-la-linea/.godot/editor/filesystem_cache10 @@ -1,14 +1,17 @@ fc8a56933c4b1c8d796fdb8f7a9f9475 -::res://::1744470359 -banner seguir la línea.PNG::CompressedTexture2D/CompressedTexture2D::2138696205684449453::1744193294::1744193295::1::::<><><>0<>0<>c81335d8132b64696edaae0d3e34b2a7<>res://.godot/imported/banner seguir la línea.PNG-aa4912a02e76f08951bd4fb055564167.ctex:: -circulo_dibujado.gd::GDScript/GDScript::8474484448996869988::1744188136::0::1::::<>Node2D<><>0<>0<><>:: -export_presets.cfg::TextFile/TextFile::-1::1744194992::0::1::::<><><>0<>0<><>:: -game.gd::GDScript/GDScript::5181317563796977305::1744128607::0::1::::<>Node2D<><>0<>0<><>:: -GameScene.tscn::PackedScene/PackedScene::752493434133658467::1744194315::0::1::::<><><>0<>0<><>::uid://cf24sqa5714px::::res://game.gd<>uid://ds0drx8caitrw::::res://circulo_dibujado.gd<>uid://cwudtop42vbi8::::res://luvvoice.com-20250407-SAuUo3.mp3 +::res://::1744749350 +export_presets.cfg::TextFile/TextFile::-1::1744472152::0::1::::<><><>0<>0<><>:: icon.svg::CompressedTexture2D/CompressedTexture2D::7094470329652126289::1744020302::1744020473::1::::<><><>0<>0<>068136cd8bf1b36c0453a3bc404a6d3f<>res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex:: -luvvoice.com-20250407-SAuUo3.mp3::AudioStreamMP3/AudioStreamMP3::6358500323420105965::1744034182::1744034183::1::::<><><>0<>0<>6a6d0ad0741a3a27fe935101ca8972b5<>res://.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-fbe753bdd2b6ddb02ed056f6d12828c9.mp3str:: +::res://audio/::1744749336 +luvvoice.com-20250407-SAuUo3.mp3::AudioStreamMP3/AudioStreamMP3::6358500323420105965::1744034182::1744749336::1::::<><><>0<>0<>4fc2cadacc3271dfae0d86c76ffeda50<>res://.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.mp3str:: +::res://images/::1744749350 +banner seguir la línea.PNG::CompressedTexture2D::2138696205684449453::1744193294::1744749350::1::::<><><>0<>0<>303375b10bdc2c7048d9f707035ccde7<>res://.godot/imported/banner seguir la línea.PNG-18b1bd0ffe9d1f9a371d2d99f4d49cef.ctex:: +::res://scenes/::1744749303 +GameScene.tscn::PackedScene/PackedScene::752493434133658467::1744749281::0::1::::<><><>0<>0<><>::uid://cf24sqa5714px::::res://scripts/game.gd +Main.tscn::PackedScene/PackedScene::5940762510215876866::1744749292::0::1::::<><><>0<>0<><>::uid://rcrqfnlhe4bb::::res://scripts/main.gd +TextBox.tscn::PackedScene/PackedScene::6616005849565071626::1744749303::0::1::::<><><>0<>0<><>::uid://c5hl1b751qw8l::::res://scripts/text_box.gd +::res://scripts/::1744749308 +game.gd::GDScript/GDScript::5181317563796977305::1744743565::0::1::::<>Node2D<><>0<>0<><>:: main.gd::GDScript/GDScript::1198400142142721223::1744194328::0::1::::<>Control<><>0<>0<><>:: -Main.tscn::PackedScene/PackedScene::5940762510215876866::1744194971::0::1::::<><><>0<>0<><>::uid://rcrqfnlhe4bb::::res://main.gd Screen_manager.gd::GDScript/GDScript::6896330064229503535::1744129195::0::1::::<>Node<><>0<>0<><>:: -TextBox.tscn::PackedScene/PackedScene::6616005849565071626::1744194315::0::1::::<><><>0<>0<><>::uid://c5hl1b751qw8l::::res://text_box.gd text_box.gd::GDScript/GDScript::6893671741723104805::1744122961::0::1::::TextBox<>BoxContainer<><>0<>0<><>:: diff --git a/seguir-la-linea/.godot/editor/filesystem_update4 b/seguir-la-linea/.godot/editor/filesystem_update4 index bbc2182..7abd5d4 100644 --- a/seguir-la-linea/.godot/editor/filesystem_update4 +++ b/seguir-la-linea/.godot/editor/filesystem_update4 @@ -1,4 +1,5 @@ res://GameScene.tscn -res://game.gd res://Main.tscn res://TextBox.tscn +res://game.gd +res://scenes/TextBox.tscn diff --git a/seguir-la-linea/.godot/editor/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.mp3str-folding-6a041da1504e491b04243370ffc25a37.cfg b/seguir-la-linea/.godot/editor/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.mp3str-folding-6a041da1504e491b04243370ffc25a37.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/seguir-la-linea/.godot/editor/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.mp3str-folding-6a041da1504e491b04243370ffc25a37.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/seguir-la-linea/.godot/editor/project_metadata.cfg b/seguir-la-linea/.godot/editor/project_metadata.cfg index c556d9a..770fd52 100644 --- a/seguir-la-linea/.godot/editor/project_metadata.cfg +++ b/seguir-la-linea/.godot/editor/project_metadata.cfg @@ -22,7 +22,7 @@ last_selected_language="GDScript" [recent_files] scripts=["res://radius_slider.gd", "res://export_presets.cfg", "res://Screen_manager.gd", "res://text_box.gd", "res://menu_game.gd", "res://circle_scene.gd", "res://main.gd", "res://juego.tscn::GDScript_gvuhb", "res://collision_polygon_2d.gd", "res://touch_detector.gd"] -scenes=["res://GameScene.tscn", "res://juego.tscn"] +scenes=["res://scenes/TextBox.tscn", "res://Main.tscn", "res://GameScene.tscn", "res://juego.tscn"] [game_view] diff --git a/seguir-la-linea/.godot/editor/script_editor_cache.cfg b/seguir-la-linea/.godot/editor/script_editor_cache.cfg index 877a88b..c93e5bf 100644 --- a/seguir-la-linea/.godot/editor/script_editor_cache.cfg +++ b/seguir-la-linea/.godot/editor/script_editor_cache.cfg @@ -1,17 +1,3 @@ -[res://circulo_dibujado.gd] - -state={ -"bookmarks": PackedInt32Array(), -"breakpoints": PackedInt32Array(), -"column": 18, -"folded_lines": Array[int]([]), -"h_scroll_position": 0, -"row": 13, -"scroll_position": 0.0, -"selection": false, -"syntax_highlighter": "GDScript" -} - [res://export_presets.cfg] state={ @@ -26,7 +12,21 @@ state={ "syntax_highlighter": "Texto Sin Formato" } -[res://main.gd] +[res://scripts/game.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 28, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 19, +"scroll_position": 3.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://scripts/main.gd] state={ "bookmarks": PackedInt32Array(), @@ -40,21 +40,7 @@ state={ "syntax_highlighter": "GDScript" } -[res://game.gd] - -state={ -"bookmarks": PackedInt32Array(), -"breakpoints": PackedInt32Array(), -"column": 48, -"folded_lines": Array[int]([]), -"h_scroll_position": 0, -"row": 22, -"scroll_position": 0.0, -"selection": false, -"syntax_highlighter": "GDScript" -} - -[res://text_box.gd] +[res://scripts/text_box.gd] state={ "bookmarks": PackedInt32Array(), @@ -68,7 +54,7 @@ state={ "syntax_highlighter": "GDScript" } -[res://Screen_manager.gd] +[res://scripts/Screen_manager.gd] state={ "bookmarks": PackedInt32Array(), diff --git a/seguir-la-linea/.godot/global_script_class_cache.cfg b/seguir-la-linea/.godot/global_script_class_cache.cfg index 3930521..e925435 100644 --- a/seguir-la-linea/.godot/global_script_class_cache.cfg +++ b/seguir-la-linea/.godot/global_script_class_cache.cfg @@ -5,5 +5,5 @@ list=[{ "is_abstract": false, "is_tool": false, "language": &"GDScript", -"path": "res://text_box.gd" +"path": "res://scripts/text_box.gd" }] diff --git a/seguir-la-linea/.godot/imported/banner seguir la línea.PNG-18b1bd0ffe9d1f9a371d2d99f4d49cef.ctex b/seguir-la-linea/.godot/imported/banner seguir la línea.PNG-18b1bd0ffe9d1f9a371d2d99f4d49cef.ctex new file mode 100644 index 0000000..cd272b5 Binary files /dev/null and b/seguir-la-linea/.godot/imported/banner seguir la línea.PNG-18b1bd0ffe9d1f9a371d2d99f4d49cef.ctex differ diff --git a/seguir-la-linea/.godot/imported/banner seguir la línea.PNG-18b1bd0ffe9d1f9a371d2d99f4d49cef.md5 b/seguir-la-linea/.godot/imported/banner seguir la línea.PNG-18b1bd0ffe9d1f9a371d2d99f4d49cef.md5 new file mode 100644 index 0000000..529d445 --- /dev/null +++ b/seguir-la-linea/.godot/imported/banner seguir la línea.PNG-18b1bd0ffe9d1f9a371d2d99f4d49cef.md5 @@ -0,0 +1,3 @@ +source_md5="4773a81dc7828377fa7480236e3aeee7" +dest_md5="3215981a4aa0ebc837778df8676de02d" + diff --git a/seguir-la-linea/.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.md5 b/seguir-la-linea/.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.md5 new file mode 100644 index 0000000..355c3ce --- /dev/null +++ b/seguir-la-linea/.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.md5 @@ -0,0 +1,3 @@ +source_md5="e7b44f20033a89835dc76f8c9d1cc619" +dest_md5="fa7c27d3376942e2d1886f2ed03661a0" + diff --git a/seguir-la-linea/.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.mp3str b/seguir-la-linea/.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.mp3str new file mode 100644 index 0000000..7cb869f Binary files /dev/null and b/seguir-la-linea/.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.mp3str differ diff --git a/seguir-la-linea/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/1975435a9f21605e984ea4e75fa9cba591aa0cb4.cache b/seguir-la-linea/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/1975435a9f21605e984ea4e75fa9cba591aa0cb4.cache new file mode 100644 index 0000000..396a548 Binary files /dev/null and b/seguir-la-linea/.godot/shader_cache/CanvasShaderGLES3/af1e45340710144fa58a5a9b5577e24451b1efb795a8fe8836ad0010f335ea30/1975435a9f21605e984ea4e75fa9cba591aa0cb4.cache differ diff --git a/seguir-la-linea/.godot/uid_cache.bin b/seguir-la-linea/.godot/uid_cache.bin index 94f4116..b181ef0 100644 Binary files a/seguir-la-linea/.godot/uid_cache.bin and b/seguir-la-linea/.godot/uid_cache.bin differ diff --git a/seguir-la-linea/luvvoice.com-20250407-SAuUo3.mp3 b/seguir-la-linea/audio/luvvoice.com-20250407-SAuUo3.mp3 similarity index 100% rename from seguir-la-linea/luvvoice.com-20250407-SAuUo3.mp3 rename to seguir-la-linea/audio/luvvoice.com-20250407-SAuUo3.mp3 diff --git a/seguir-la-linea/luvvoice.com-20250407-SAuUo3.mp3.import b/seguir-la-linea/audio/luvvoice.com-20250407-SAuUo3.mp3.import similarity index 50% rename from seguir-la-linea/luvvoice.com-20250407-SAuUo3.mp3.import rename to seguir-la-linea/audio/luvvoice.com-20250407-SAuUo3.mp3.import index 952ca2f..9933c2a 100644 --- a/seguir-la-linea/luvvoice.com-20250407-SAuUo3.mp3.import +++ b/seguir-la-linea/audio/luvvoice.com-20250407-SAuUo3.mp3.import @@ -3,12 +3,12 @@ importer="mp3" type="AudioStreamMP3" uid="uid://cwudtop42vbi8" -path="res://.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-fbe753bdd2b6ddb02ed056f6d12828c9.mp3str" +path="res://.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.mp3str" [deps] -source_file="res://luvvoice.com-20250407-SAuUo3.mp3" -dest_files=["res://.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-fbe753bdd2b6ddb02ed056f6d12828c9.mp3str"] +source_file="res://audio/luvvoice.com-20250407-SAuUo3.mp3" +dest_files=["res://.godot/imported/luvvoice.com-20250407-SAuUo3.mp3-b7be173b3e0e9d610b788dc8159ee0a6.mp3str"] [params] diff --git a/seguir-la-linea/circulo_dibujado.gd b/seguir-la-linea/circulo_dibujado.gd deleted file mode 100644 index 28d33aa..0000000 --- a/seguir-la-linea/circulo_dibujado.gd +++ /dev/null @@ -1,261 +0,0 @@ -extends Node2D - -@export var shapes: Array = [] -@export var radius: float = 300 -@export var width: float = 5 -@export var circle_color: Color = Color(1, 1, 1, 1) - -var num_points = 100 -var points = [] -var segment_colors = [] - -# === ESTADÍSTICAS === -var start_time : int -var end_time : int -var fallos : int = 0 -var segmentos_visitados = [] -var resultados_formas = {} # Diccionario para guardar los resultados de cada forma - -var juego_finalizado = false -var forma_actual_index = 0 # Índice de la forma actual en el array 'shapes' -var forma_actual_nombre : String # Nombre de la forma actual - -func _ready(): - iniciar_forma() - -func iniciar_forma(): - if forma_actual_index < shapes.size(): - forma_actual_nombre = shapes[forma_actual_index] - print("Empezando forma:", forma_actual_nombre) - start_time = Time.get_unix_time_from_system() - fallos = 0 - segmentos_visitados.clear() - points = get_shape_points() - segment_colors.resize(points.size() - 1) - segmentos_visitados.resize(points.size() - 1) - for i in range(segment_colors.size()): - segment_colors[i] = circle_color - segmentos_visitados[i] = false - juego_finalizado = false - queue_redraw() - else: - finalizar_juego() - -func _process(delta): - update_center() - -func update_center(): - var screen_size = get_viewport_rect().size - position = screen_size / 2 - -func _draw(): - points = get_shape_points() - for i in range(points.size() - 1): - draw_line(points[i], points[i + 1], segment_colors[i], width) - for point in points: - draw_circle(point, width / 2, circle_color) - - -func _input(event): - if juego_finalizado: - return - - if event is InputEventScreenDrag: - var local_pos = to_local(event.position) - var closest_index = get_closest_point_index(local_pos) - if closest_index != -1: - segment_colors[closest_index] = Color(0, 1, 0, 1) - segmentos_visitados[closest_index] = true - if is_completed(): - finalizar_nivel() - else: - fallos += 1 - queue_redraw() - -func get_closest_point_index(pos: Vector2) -> int: - var min_dist = 20 - var closest_index = -1 - for i in range(points.size() - 1): - var mid_point = (points[i] + points[i + 1]) / 2 - var dist = pos.distance_to(mid_point) - if dist < min_dist: - min_dist = dist - closest_index = i - return closest_index - -# === DETECCIÓN DE FINALIZACIÓN === - -func is_completed() -> bool: - for visited in segmentos_visitados: - if not visited: - return false - return true - -func finalizar_nivel(): - end_time = Time.get_unix_time_from_system() - juego_finalizado = true - guardar_resultado_forma() - forma_actual_index += 1 - iniciar_forma() - -func guardar_resultado_forma(): - var duracion = end_time - start_time - resultados_formas[forma_actual_nombre] = { - "tiempo": duracion, - "fallos": fallos - } - print("Resultados de", forma_actual_nombre, ":", resultados_formas[forma_actual_nombre]) - -func finalizar_juego(): - var mensaje_final = "🎉 ¡Juego Completado!\n\nResultados por forma:\n" - for forma in resultados_formas: - var resultado = resultados_formas[forma] - mensaje_final += "%s: Tiempo: %s seg, Fallos: %s\n" % [forma, resultado.tiempo, resultado.fallos] - - var popup = Label.new() - popup.text = mensaje_final - popup.position = Vector2(50, 50) - popup.add_theme_color_override("font_color", Color(1,1,1)) - popup.add_theme_font_size_override("font_size", 20) - add_child(popup) - -# === Formas === - -func get_shape_points(): - match forma_actual_nombre : # Usamos la forma actual para dibujar - "CircleButton": return get_circle_points() - "StarButton": return get_star_points() - "heart": return get_heart_points() - "TriangleButton": return get_polygon_points(3) - "SquareButton": return get_square_points() - "diamond": return get_polygon_points(4, true) - "cross": return get_cross_points() - "arrow": return get_arrow_points() - "HouseButton": return get_house_points() - "UmbrellaButton": return get_umbrella_points() - _: return [] - -func get_circle_points(): - var result = [] - for i in range(num_points + 1): - var angle = i * (2 * PI / num_points) - result.append(Vector2(cos(angle), sin(angle)) * radius) - return result - -func get_square_points(): - var result = [] - # Definimos la mitad del tamaño del lado del cuadrado basado en el radio del círculo para que sea similar en tamaño - var half_side = radius * 0.5 - - # Definimos las cuatro esquinas del cuadrado - result.append(Vector2(-half_side, -half_side)) # Esquina superior izquierda - result.append(Vector2(half_side, -half_side)) # Esquina superior derecha - result.append(Vector2(half_side, half_side)) # Esquina inferior derecha - result.append(Vector2(-half_side, half_side)) # Esquina inferior izquierda - result.append(Vector2(-half_side, -half_side)) # Volvemos a la primera esquina para cerrar el cuadrado - - # Ahora, vamos a añadir puntos intermedios entre las esquinas para que se puedan colorear los segmentos - var num_segments = 10 # Podemos ajustar cuántos puntos hay en cada lado - - var points_per_segment = num_points / 4 # Repartimos los puntos entre los 4 lados - - result.clear() # Empezamos de nuevo con los puntos para los segmentos - - for i in range(points_per_segment + 1): - var t = float(i) / points_per_segment - result.append(lerp(Vector2(-half_side, -half_side), Vector2(half_side, -half_side), t)) # Lado superior - for i in range(points_per_segment + 1): - var t = float(i) / points_per_segment - result.append(lerp(Vector2(half_side, -half_side), Vector2(half_side, half_side), t)) # Lado derecho - for i in range(points_per_segment + 1): - var t = float(i) / points_per_segment - result.append(lerp(Vector2(half_side, half_side), Vector2(-half_side, half_side), t)) # Lado inferior - for i in range(points_per_segment + 1): - var t = float(i) / points_per_segment - result.append(lerp(Vector2(-half_side, half_side), Vector2(-half_side, -half_side), t)) # Lado izquierdo - result.append(Vector2(-half_side, -half_side)) # Cerramos la figura - - return result - -func get_star_points(): - var result = [] - var num_puntas = 5 # Número de puntas de la estrella - var double_points = num_puntas * 2 - var angle_step = TAU / double_points # TAU = 2 * PI - var outer_radius = radius * 0.8 - var inner_radius = radius * 0.4 - - for i in range(double_points + 1): # +1 para cerrar la figura - var angle = i * angle_step - PI / 2 # Rota para que una punta quede arriba - var r = outer_radius if i % 2 == 0 else inner_radius - result.append(Vector2(cos(angle), sin(angle)) * r) - - return result - - - -func get_heart_points(): - var result = [] - for i in range(num_points + 1): - var t = i * (2 * PI / num_points) - var x = 16 * pow(sin(t), 3) - var y = -(13 * cos(t) - 5 * cos(2*t) - 2 * cos(3*t) - cos(4*t)) # Invertir para que mire hacia arriba - result.append(Vector2(x, y) * (radius / 15.0)) # Escalar para que quepa - return result - -func get_polygon_points(sides: int, rotated := false): - var result = [] - var angle_offset = PI / sides if rotated else 0 - for i in range(sides + 1): - var angle = angle_offset + i * (2 * PI / sides) - result.append(Vector2(cos(angle), sin(angle)) * radius * 0.8) # Un poco más pequeño - return result - -func get_cross_points(): - var thickness = radius * 0.2 - var length = radius * 0.6 - return [ - Vector2(-thickness/2, -length/2), Vector2(thickness/2, -length/2), - Vector2(thickness/2, -thickness/2), Vector2(length/2, -thickness/2), - Vector2(length/2, thickness/2), Vector2(thickness/2, thickness/2), - Vector2(thickness/2, length/2), Vector2(-thickness/2, length/2), - Vector2(-thickness/2, thickness/2), Vector2(-length/2, thickness/2), - Vector2(-length/2, -thickness/2), Vector2(-thickness/2, -thickness/2), - Vector2(-thickness/2, -length/2) - ] - -func get_arrow_points(): - var head_width = radius * 0.4 - var head_height = radius * 0.5 - var tail_width = radius * 0.2 - var tail_height = radius * 0.6 - return [ - Vector2(-tail_width/2, tail_height/2), Vector2(tail_width/2, tail_height/2), - Vector2(tail_width/2, 0), Vector2(head_width/2, 0), - Vector2(0, -head_height/2), Vector2(-head_width/2, 0), - Vector2(-tail_width/2, 0), Vector2(-tail_width/2, tail_height/2) - ] - -func get_house_points(): - var base_width = radius * 0.8 - var base_height = radius * 0.6 - var roof_height = radius * 0.5 - return [ - Vector2(-base_width/2, base_height/2), Vector2(base_width/2, base_height/2), - Vector2(base_width/2, -base_height/2), Vector2(0, -(base_height/2 + roof_height)), - Vector2(-base_width/2, -base_height/2), Vector2(-base_width/2, base_height/2) - ] - -func get_umbrella_points(): - var result = [] - var steps = num_points / 2 - var umbrella_radius = radius * 0.7 - for i in range(steps + 1): - var angle = PI * i / steps - result.append(Vector2(cos(angle), sin(angle)) * umbrella_radius) - result.append(Vector2(0, umbrella_radius)) - result.append(Vector2(0, umbrella_radius * 1.3)) # Mango más largo - return result - -func get_diamond_points(): # Recuerda que en tu match "diamond" llama a get_polygon_points con rotated = true - return get_polygon_points(4, true) # Ya debería estar bien con los ajustes de get_polygon_points diff --git a/seguir-la-linea/circulo_dibujado.gd.uid b/seguir-la-linea/circulo_dibujado.gd.uid deleted file mode 100644 index 320feb9..0000000 --- a/seguir-la-linea/circulo_dibujado.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://ds0drx8caitrw diff --git a/seguir-la-linea/banner seguir la línea.PNG b/seguir-la-linea/images/banner seguir la línea.PNG similarity index 100% rename from seguir-la-linea/banner seguir la línea.PNG rename to seguir-la-linea/images/banner seguir la línea.PNG diff --git a/seguir-la-linea/banner seguir la línea.PNG.import b/seguir-la-linea/images/banner seguir la línea.PNG.import similarity index 68% rename from seguir-la-linea/banner seguir la línea.PNG.import rename to seguir-la-linea/images/banner seguir la línea.PNG.import index f5d2b4b..986a809 100644 --- a/seguir-la-linea/banner seguir la línea.PNG.import +++ b/seguir-la-linea/images/banner seguir la línea.PNG.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://5qaaqh3oj4nx" -path="res://.godot/imported/banner seguir la línea.PNG-aa4912a02e76f08951bd4fb055564167.ctex" +path="res://.godot/imported/banner seguir la línea.PNG-18b1bd0ffe9d1f9a371d2d99f4d49cef.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://banner seguir la línea.PNG" -dest_files=["res://.godot/imported/banner seguir la línea.PNG-aa4912a02e76f08951bd4fb055564167.ctex"] +source_file="res://images/banner seguir la línea.PNG" +dest_files=["res://.godot/imported/banner seguir la línea.PNG-18b1bd0ffe9d1f9a371d2d99f4d49cef.ctex"] [params] diff --git a/seguir-la-linea/project.godot b/seguir-la-linea/project.godot index a4b8b14..a39b3a2 100644 --- a/seguir-la-linea/project.godot +++ b/seguir-la-linea/project.godot @@ -17,7 +17,7 @@ config/icon="res://icon.svg" [autoload] -ScreenManager="*res://Screen_manager.gd" +ScreenManager="*res://scripts/Screen_manager.gd" [display] diff --git a/seguir-la-linea/GameScene.tscn b/seguir-la-linea/scenes/GameScene.tscn similarity index 89% rename from seguir-la-linea/GameScene.tscn rename to seguir-la-linea/scenes/GameScene.tscn index 3938ef7..9e544f6 100644 --- a/seguir-la-linea/GameScene.tscn +++ b/seguir-la-linea/scenes/GameScene.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://kyrpsg085djf"] -[ext_resource type="Script" uid="uid://cf24sqa5714px" path="res://game.gd" id="1_haeiw"] +[ext_resource type="Script" uid="uid://cf24sqa5714px" path="res://scripts/game.gd" id="1_haeiw"] [node name="Game" type="Node2D"] script = ExtResource("1_haeiw") diff --git a/seguir-la-linea/Main.tscn b/seguir-la-linea/scenes/Main.tscn similarity index 99% rename from seguir-la-linea/Main.tscn rename to seguir-la-linea/scenes/Main.tscn index 10a39b9..dc0c0f7 100644 --- a/seguir-la-linea/Main.tscn +++ b/seguir-la-linea/scenes/Main.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3 uid="uid://cqv0qxebb6ago"] -[ext_resource type="Script" uid="uid://rcrqfnlhe4bb" path="res://main.gd" id="1_glv2v"] +[ext_resource type="Script" uid="uid://rcrqfnlhe4bb" path="res://scripts/main.gd" id="1_glv2v"] [sub_resource type="ViewportTexture" id="ViewportTexture_glv2v"] diff --git a/seguir-la-linea/TextBox.tscn b/seguir-la-linea/scenes/TextBox.tscn similarity index 86% rename from seguir-la-linea/TextBox.tscn rename to seguir-la-linea/scenes/TextBox.tscn index 08e0763..f522851 100644 --- a/seguir-la-linea/TextBox.tscn +++ b/seguir-la-linea/scenes/TextBox.tscn @@ -1,13 +1,13 @@ [gd_scene load_steps=2 format=3 uid="uid://c1i3wddb8ev2q"] -[ext_resource type="Script" uid="uid://c5hl1b751qw8l" path="res://text_box.gd" id="1_1u4do"] +[ext_resource type="Script" uid="uid://c5hl1b751qw8l" path="res://scripts/text_box.gd" id="1_2g6gp"] [node name="TextBox" type="BoxContainer"] z_as_relative = false y_sort_enabled = true offset_right = 200.0 offset_bottom = 60.0 -script = ExtResource("1_1u4do") +script = ExtResource("1_2g6gp") [node name="Dragger" type="TextureRect" parent="."] layout_mode = 2 diff --git a/seguir-la-linea/scripts/Screen_manager.gd b/seguir-la-linea/scripts/Screen_manager.gd new file mode 100644 index 0000000..c20b63b --- /dev/null +++ b/seguir-la-linea/scripts/Screen_manager.gd @@ -0,0 +1,22 @@ +extends Node +var previous_scene: Node = null +var current_scene: Node = null + +# Cambiar de escena: Agregar la nueva escena al árbol +func change_scene(new_scene: Node, actual_scene: Node): + previous_scene = actual_scene.duplicate() # Guardamos la escena anterior antes de liberar + current_scene = new_scene # Establecemos la nueva escena como la actual + actual_scene.queue_free() # Liberamos la escena actual + get_tree().root.add_child(current_scene) # Añadimos la nueva escena al árbol + print(previous_scene) + +# Volver a la escena anterior +func go_back_to_previous_scene(): + print(previous_scene) + if previous_scene: + current_scene.queue_free() # Liberamos la escena actual + get_tree().root.add_child(previous_scene) # Volver a agregar la escena anterior + current_scene = previous_scene # Establecemos la escena actual como la anterior + previous_scene = null # Limpiamos la referencia a la escena anterior + else: + print("No hay una escena anterior para volver.") diff --git a/seguir-la-linea/Screen_manager.gd.uid b/seguir-la-linea/scripts/Screen_manager.gd.uid similarity index 100% rename from seguir-la-linea/Screen_manager.gd.uid rename to seguir-la-linea/scripts/Screen_manager.gd.uid diff --git a/seguir-la-linea/game.gd b/seguir-la-linea/scripts/game.gd similarity index 99% rename from seguir-la-linea/game.gd rename to seguir-la-linea/scripts/game.gd index 3da5ed4..659302d 100644 --- a/seguir-la-linea/game.gd +++ b/seguir-la-linea/scripts/game.gd @@ -2,7 +2,7 @@ extends Node2D @export var line_width: float = 25.0 @export var allowed_distance: float = 60.0 -@export var selected_shape: String = "rombo" +@export var selected_shape: String = "circulo" @export var shape_scale: float = 1.0 @export var margin_ratio: float = 0.1 diff --git a/seguir-la-linea/game.gd.uid b/seguir-la-linea/scripts/game.gd.uid similarity index 100% rename from seguir-la-linea/game.gd.uid rename to seguir-la-linea/scripts/game.gd.uid diff --git a/seguir-la-linea/main.gd b/seguir-la-linea/scripts/main.gd similarity index 100% rename from seguir-la-linea/main.gd rename to seguir-la-linea/scripts/main.gd diff --git a/seguir-la-linea/main.gd.uid b/seguir-la-linea/scripts/main.gd.uid similarity index 100% rename from seguir-la-linea/main.gd.uid rename to seguir-la-linea/scripts/main.gd.uid diff --git a/seguir-la-linea/text_box.gd b/seguir-la-linea/scripts/text_box.gd similarity index 100% rename from seguir-la-linea/text_box.gd rename to seguir-la-linea/scripts/text_box.gd diff --git a/seguir-la-linea/text_box.gd.uid b/seguir-la-linea/scripts/text_box.gd.uid similarity index 100% rename from seguir-la-linea/text_box.gd.uid rename to seguir-la-linea/scripts/text_box.gd.uid