diff --git a/.DS_Store b/.DS_Store index ea1cc77..3c50eed 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.godot/editor/create_recent.Node b/.godot/editor/create_recent.Node new file mode 100644 index 0000000..18825b0 --- /dev/null +++ b/.godot/editor/create_recent.Node @@ -0,0 +1,7 @@ +CollisionShape2D +CharacterBody2D +StaticBody2D +CollisionPolygon2D +Polygon2D +ColorRect +Sprite2D diff --git a/.godot/editor/editor_layout.cfg b/.godot/editor/editor_layout.cfg index 922ea53..62dc6f0 100644 --- a/.godot/editor/editor_layout.cfg +++ b/.godot/editor/editor_layout.cfg @@ -19,16 +19,16 @@ dock_filesystem_split=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://level_end.tscn") +dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://player/", "res://enemy/") dock_3="Scene,Import" dock_4="FileSystem" dock_5="Inspector,Node,History" [EditorNode] -open_scenes=PackedStringArray("res://main.tscn", "res://world.tscn", "res://player/player.tscn", "res://enemy/skeleton.tscn") -current_scene="res://world.tscn" +open_scenes=PackedStringArray("res://intro.tscn", "res://main.tscn", "res://pre-castle.tscn", "res://world.tscn", "res://player/player.tscn", "res://lava_zone.tscn", "res://enemy/smallslime.tscn", "res://level_end.tscn") +current_scene="res://level_end.tscn" center_split_offset=0 selected_default_debugger_tab_idx=0 selected_main_editor_idx=2 @@ -36,9 +36,9 @@ selected_bottom_panel_item=0 [ScriptEditor] -open_scripts=["res://main.gd", "res://player/player.gd", "res://shop (detection).gd", "res://shop_surface.gd", "res://enemy/skeleton.gd"] -selected_script="res://enemy/skeleton.gd" -open_help=[] +open_scripts=["res://enemy spawner.gd", "res://enemy/largeslime.gd", "res://enemy/largeslime_pre-castle.gd", "res://lava_zone.gd", "res://level_end.gd", "res://main.gd", "res://player/player.gd", "res://player/player_lavazone.gd", "res://player/player_pre-castle.gd", "res://pre-castle.gd", "res://settings.gd", "res://enemy/smallslime-pre-castle.gd", "res://enemy/smallslime.gd", "res://world.gd"] +selected_script="res://level_end.gd" +open_help=["Node"] script_split_offset=140 list_split_offset=0 diff --git a/.godot/editor/favorites b/.godot/editor/favorites new file mode 100644 index 0000000..e69de29 diff --git a/.godot/editor/favorites.Node b/.godot/editor/favorites.Node new file mode 100644 index 0000000..e69de29 diff --git a/.godot/editor/filesystem_cache8 b/.godot/editor/filesystem_cache8 index c3793ec..792f964 100644 --- a/.godot/editor/filesystem_cache8 +++ b/.godot/editor/filesystem_cache8 @@ -1,16 +1,41 @@ ea4bc82a6ad023ab7ee23ee620429895 -::res://::1723959907 -AnimationSheet_Character.png::CompressedTexture2D::430375940426237450::1723957695::1723958244::1::::<><>:: -icon.svg::CompressedTexture2D::9030182617461949109::1723957695::1723958244::1::::<><>:: -main.gd::GDScript::-1::1723958335::0::1::::<>Node2D<>:: -main.tscn::PackedScene::4784525461696859459::1723959870::0::1::::<><>::res://main.gd -shop (detection).gd::GDScript::-1::1723958335::0::1::::<>Area2D<>:: -shop_surface.gd::GDScript::-1::1723958335::0::1::::<>CollisionShape2D<>:: -Skeleton enemy.png::CompressedTexture2D::2026478523736852579::1723957695::1723958244::1::::<><>:: -world.tscn::PackedScene::7163943282554114354::1723959870::0::1::::<><>::uid://d3878vqnvxs82::::res://player/player.tscn<>uid://lybotj3vh6v7::::res://enemy/skeleton.tscn -::res://enemy/::1723959870 -skeleton.gd::GDScript::-1::1723958335::0::1::::<>CharacterBody2D<>:: -skeleton.tscn::PackedScene::821709077370684974::1723959870::0::1::::<><>::uid://34v2m3edfkgx::::res://Skeleton enemy.png<>res://enemy/skeleton.gd -::res://player/::1723959870 -player.gd::GDScript::-1::1723958335::0::1::::<>CharacterBody2D<>:: -player.tscn::PackedScene::9194677142122444141::1723959870::0::1::::<><>::res://player/player.gd<>uid://geqh1teab7u1::::res://AnimationSheet_Character.png +::res://::1727980386 +enemy spawner.gd::GDScript::-1::1727649993::0::1::::<>Node2D<>:: +global.gd::GDScript::-1::1727649993::0::1::::<>Node<>:: +intro.tscn::PackedScene::1986581228808288170::1727943012::0::1::::<><>::uid://lybotj3vh6v7::::res://enemy/smallslime.tscn<>uid://d3878vqnvxs82::::res://player/player.tscn +lava.gd::GDScript::-1::1725207903::0::1::::<>Control<>:: +lava_zone.gd::GDScript::-1::1727902130::0::1::::<>Node2D<>:: +lava_zone.tscn::PackedScene::5450374488388506918::1727943013::0::1::::<><>::uid://dbu0nqto3ojru::::res://platform-lava-zone.png<>res://lava_zone.gd<>uid://d3878vqnvxs82::::res://player/player.tscn<>uid://lybotj3vh6v7::::res://enemy/smallslime.tscn<>res://player/player_lavazone.gd<>uid://lr7eoqvmxf7h::::res://enemy/largeslime.tscn<>res://enemy/largeslime.gd<>res://enemy spawner.gd +level_end.gd::GDScript::-1::1727649993::0::1::::<>Node2D<>:: +level_end.tscn::PackedScene::8570103897671238411::1727878915::0::1::::<><>::res://level_end.gd +main.gd::GDScript::-1::1727843041::0::1::::<>Node2D<>:: +main.tscn::PackedScene::9115274986505807483::1727943012::0::1::::<><>::res://main.gd +platform-lava-zone.png::CompressedTexture2D::7272280460337417130::1727649993::1727650049::1::::<><>:: +pre-castle.jpg::CompressedTexture2D::552599507988880371::1727891228::1727891242::1::::<><>:: +pre-castle.tscn::PackedScene::7904203474640902218::1727943082::0::1::::<><>::res://lava.gd<>uid://d3878vqnvxs82::::res://player/player.tscn<>uid://h4xh6sfe3ajb::::res://pre-castle.jpg<>res://player/player_pre-castle.gd<>uid://lybotj3vh6v7::::res://enemy/smallslime.tscn<>res://enemy/smallslime-pre-castle.gd<>uid://lr7eoqvmxf7h::::res://enemy/largeslime.tscn<>res://enemy/largeslime_pre-castle.gd +respawn.gd::GDScript::-1::1727649993::0::1::::<>Node2D<>:: +respawn.tscn::PackedScene::4597698927359744203::1727649993::0::1::::<><>::res://respawn.gd +settings.gd::GDScript::-1::1727595856::0::1::::<>Control<>:: +settings.tscn::PackedScene::4733174058348197547::1727878915::0::1::::<><>::res://settings.gd +shop.gd::GDScript::-1::1727649935::0::1::::<>Node2D<>:: +shop.tscn::PackedScene::2422447429676863896::1727649935::0::1::::<><>::res://shop.gd +world.gd::GDScript::-1::1727649993::0::1::::<>Node2D<>:: +world.tscn::PackedScene::7163943282554114354::1727943013::0::1::::<><>::res://world.gd<>uid://d3878vqnvxs82::::res://player/player.tscn<>uid://lybotj3vh6v7::::res://enemy/smallslime.tscn +::res://enemy/::1727973610 +largeslime.gd::GDScript::-1::1727649993::0::1::::<>CharacterBody2D<>:: +LargeSlime.png::CompressedTexture2D::6976058010452513735::1727649993::1727650047::1::::<><>:: +largeslime.tscn::PackedScene::809122549796382323::1727842940::0::1::::<><>::res://enemy/smallslime.gd<>uid://c6niwkt73ja84::::res://enemy/LargeSlime.png +largeslime_pre-castle.gd::GDScript::-1::1727939079::0::1::::<>CharacterBody2D<>:: +Skeleton enemy.png::CompressedTexture2D::2026478523736852579::1727649993::1727650047::1::::<><>:: +smallslime-pre-castle.gd::GDScript::-1::1727937481::0::1::::<>CharacterBody2D<>:: +smallslime.gd::GDScript::-1::1727934759::0::1::::<>CharacterBody2D<>:: +SmallSlime.png::CompressedTexture2D::7376861851634367087::1727649993::1727650047::1::::<><>:: +smallslime.tscn::PackedScene::821709077370684974::1727943013::0::1::::<><>::res://enemy/smallslime.gd<>uid://dddn3pqo5ersh::::res://enemy/SmallSlime.png +::res://player/::1727973610 +Full Attack.png::CompressedTexture2D::2203859664253722896::1727649993::1727650047::1::::<><>:: +MCSpriteSheet.png::CompressedTexture2D::8073501254975280233::1727649993::1727650047::1::::<><>:: +player.gd::GDScript::-1::1727649993::0::1::::<>CharacterBody2D<>:: +player.tscn::PackedScene::9194677142122444141::1727943013::0::1::::<><>::res://player/player.gd<>uid://dna4nel554ucn::::res://player/MCSpriteSheet.png<>uid://cr2svmcl6jw8i::::res://player/spritesheet_no_attack.png<>uid://6ntinfuqmd4k::::res://player/Full Attack.png +player_lavazone.gd::GDScript::-1::1727649993::0::1::::<>CharacterBody2D<>:: +player_pre-castle.gd::GDScript::-1::1727939276::0::1::::<>CharacterBody2D<>:: +spritesheet_no_attack.png::CompressedTexture2D::6022920950045572698::1727649993::1727650047::1::::<><>:: diff --git a/.godot/editor/filesystem_update4 b/.godot/editor/filesystem_update4 index fe7b999..856c906 100644 --- a/.godot/editor/filesystem_update4 +++ b/.godot/editor/filesystem_update4 @@ -1,4 +1,10 @@ +res://intro.tscn res://main.tscn +res://pre-castle.tscn res://world.tscn res://player/player.tscn -res://enemy/skeleton.tscn +res://lava_zone.tscn +res://enemy/smallslime.tscn +res://pre-castle.gd +res://level_end.tscn +res://level_end.gd diff --git a/.godot/editor/intro.tscn-editstate-2dff5a063e418d17c9220ff5a6df7e7a.cfg b/.godot/editor/intro.tscn-editstate-2dff5a063e418d17c9220ff5a6df7e7a.cfg new file mode 100644 index 0000000..a48002c --- /dev/null +++ b/.godot/editor/intro.tscn-editstate-2dff5a063e418d17c9220ff5a6df7e7a.cfg @@ -0,0 +1,175 @@ +[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(-180, -125), +"primary_grid_step": Vector2i(8, 8), +"show_edit_locks": true, +"show_guides": true, +"show_helpers": false, +"show_origin": 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.25 +} +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, +"NavigationLink3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 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": true, +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17150/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/world/player")]) diff --git a/.godot/editor/intro.tscn-folding-2dff5a063e418d17c9220ff5a6df7e7a.cfg b/.godot/editor/intro.tscn-folding-2dff5a063e418d17c9220ff5a6df7e7a.cfg new file mode 100644 index 0000000..0df4f12 --- /dev/null +++ b/.godot/editor/intro.tscn-folding-2dff5a063e418d17c9220ff5a6df7e7a.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("floor"), PackedStringArray("Transform"), NodePath("floor/CollisionShape2D"), PackedStringArray("Transform"), NodePath("floor/ColorRect"), PackedStringArray("Layout")] +resource_unfolds=["res://intro.tscn::RectangleShape2D_ku54d", PackedStringArray("Resource")] +nodes_folded=[] diff --git a/.godot/editor/largeslime.tscn-editstate-728ff4685c3c789e6a0c3725b1ca7a4b.cfg b/.godot/editor/largeslime.tscn-editstate-728ff4685c3c789e6a0c3725b1ca7a4b.cfg new file mode 100644 index 0000000..67fed56 --- /dev/null +++ b/.godot/editor/largeslime.tscn-editstate-728ff4685c3c789e6a0c3725b1ca7a4b.cfg @@ -0,0 +1,175 @@ +[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(-876.056, -722.344), +"primary_grid_step": Vector2i(8, 8), +"show_edit_locks": true, +"show_guides": true, +"show_helpers": false, +"show_origin": 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.174227 +} +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, +"NavigationLink3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 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": true, +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +selected_nodes=Array[NodePath]([]) diff --git a/.godot/editor/largeslime.tscn-folding-728ff4685c3c789e6a0c3725b1ca7a4b.cfg b/.godot/editor/largeslime.tscn-folding-728ff4685c3c789e6a0c3725b1ca7a4b.cfg new file mode 100644 index 0000000..66b25e6 --- /dev/null +++ b/.godot/editor/largeslime.tscn-folding-728ff4685c3c789e6a0c3725b1ca7a4b.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Collision"), NodePath("CollisionShape2D"), PackedStringArray("Transform"), NodePath("AnimatedSprite2D"), PackedStringArray("Texture", "Transform", "Animation"), NodePath("Area2D (detection)"), PackedStringArray("Collision"), NodePath("Area2D (strike)"), PackedStringArray("Collision"), NodePath("Area2D (strike)/CollisionShape2D"), PackedStringArray("Transform"), NodePath("LargeSlimeBar"), PackedStringArray("Layout", "Theme Overrides")] +resource_unfolds=["res://enemy/largeslime.tscn::RectangleShape2D_qb0lt", PackedStringArray("Resource"), "res://enemy/largeslime.tscn::SpriteFrames_o17jh", PackedStringArray("Resource"), "res://enemy/largeslime.tscn::CircleShape2D_qfdxx", PackedStringArray("Resource"), "res://enemy/largeslime.tscn::RectangleShape2D_v7847", PackedStringArray("Resource"), "res://enemy/largeslime.tscn::StyleBoxFlat_8v4sy", PackedStringArray("Resource")] +nodes_folded=[] diff --git a/.godot/editor/largeslime_pre-castle.gd-folding-0dadf3ae9e3de7513e4d2433594c6044.cfg b/.godot/editor/largeslime_pre-castle.gd-folding-0dadf3ae9e3de7513e4d2433594c6044.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/largeslime_pre-castle.gd-folding-0dadf3ae9e3de7513e4d2433594c6044.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/lava_zone.gd-folding-7053d1fb26d7ba3500ca2d81d8f91403.cfg b/.godot/editor/lava_zone.gd-folding-7053d1fb26d7ba3500ca2d81d8f91403.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/lava_zone.gd-folding-7053d1fb26d7ba3500ca2d81d8f91403.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/lava_zone.tscn-editstate-fc56ba53c86f37b6373a1f8489a2b780.cfg b/.godot/editor/lava_zone.tscn-editstate-fc56ba53c86f37b6373a1f8489a2b780.cfg new file mode 100644 index 0000000..525e8ae --- /dev/null +++ b/.godot/editor/lava_zone.tscn-editstate-fc56ba53c86f37b6373a1f8489a2b780.cfg @@ -0,0 +1,175 @@ +[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(51.2089, -98.8247), +"primary_grid_step": Vector2i(8, 8), +"show_edit_locks": true, +"show_guides": true, +"show_helpers": false, +"show_origin": 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.420545 +} +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, +"NavigationLink3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 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": true, +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17150/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/world/player")]) diff --git a/.godot/editor/lava_zone.tscn-folding-fc56ba53c86f37b6373a1f8489a2b780.cfg b/.godot/editor/lava_zone.tscn-folding-fc56ba53c86f37b6373a1f8489a2b780.cfg new file mode 100644 index 0000000..4d20827 --- /dev/null +++ b/.godot/editor/lava_zone.tscn-folding-fc56ba53c86f37b6373a1f8489a2b780.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("Platform-lava-zone"), PackedStringArray("Transform"), NodePath("player/player"), PackedStringArray("Transform", "Collision"), NodePath("Panel"), PackedStringArray("Visibility", "Layout"), NodePath("Area2D"), PackedStringArray("Collision"), NodePath("Area2D/lava"), PackedStringArray("Transform"), NodePath("enemy walls"), PackedStringArray("Collision"), NodePath("enemy walls/wall1"), PackedStringArray("Transform"), NodePath("enemy walls/wall2"), PackedStringArray("Transform"), NodePath("StaticBody2D"), PackedStringArray("Collision"), NodePath("StaticBody2D/lava"), PackedStringArray("Transform", "Visibility", "Ordering", "Texture", "Material", "Process", "Process/Thread Group"), NodePath("StaticBody2D/left wall"), PackedStringArray("Transform"), NodePath("StaticBody2D/right wall"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform2"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform3"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform4"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform5"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform6"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform7"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform8"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform9"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform10"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform11"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform12"), PackedStringArray("Transform"), NodePath("StaticBody2D/platform13"), PackedStringArray("Transform"), NodePath("StaticBody2D/Panel"), PackedStringArray("Layout"), NodePath("StaticBody2D/Panel2"), PackedStringArray("Layout"), NodePath("StaticBody2D/Panel3"), PackedStringArray("Layout"), NodePath("StaticBody2D/Panel4"), PackedStringArray("Layout"), NodePath("StaticBody2D/Panel5"), PackedStringArray("Layout"), NodePath("StaticBody2D/Panel6"), PackedStringArray("Layout"), NodePath("StaticBody2D/ColorRect"), PackedStringArray("Ordering", "Layout"), NodePath("StaticBody2D2"), PackedStringArray("Collision"), NodePath("StaticBody2D2/CollisionShape2D2"), PackedStringArray("Transform"), NodePath("large_slime"), PackedStringArray("Transform", "Collision"), NodePath("enemy spawner"), PackedStringArray("Transform")] +resource_unfolds=["res://lava_zone.tscn::RectangleShape2D_ak2ud", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_5p8ap", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_t8ne3", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_e12k0", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_srmwd", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_stj0s", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_g5gup", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_48uio", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_vu76q", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_6pv2x", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_cwi8w", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_spg6n", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_bosbu", PackedStringArray("Resource"), "res://lava_zone.tscn::RectangleShape2D_ojljr", PackedStringArray("Resource")] +nodes_folded=[] diff --git a/.godot/editor/level_end.gd-folding-5d347ac515d3ffd7f942a676e1a45607.cfg b/.godot/editor/level_end.gd-folding-5d347ac515d3ffd7f942a676e1a45607.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/level_end.gd-folding-5d347ac515d3ffd7f942a676e1a45607.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/level_end.tscn-editstate-3e970eec62a0426eb7ef7143ec989b58.cfg b/.godot/editor/level_end.tscn-editstate-3e970eec62a0426eb7ef7143ec989b58.cfg new file mode 100644 index 0000000..f8c756f --- /dev/null +++ b/.godot/editor/level_end.tscn-editstate-3e970eec62a0426eb7ef7143ec989b58.cfg @@ -0,0 +1,175 @@ +[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(-552, -173), +"primary_grid_step": Vector2i(8, 8), +"show_edit_locks": true, +"show_guides": true, +"show_helpers": false, +"show_origin": 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.25 +} +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, +"NavigationLink3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 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": true, +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +selected_nodes=Array[NodePath]([]) diff --git a/.godot/editor/level_end.tscn-folding-3e970eec62a0426eb7ef7143ec989b58.cfg b/.godot/editor/level_end.tscn-folding-3e970eec62a0426eb7ef7143ec989b58.cfg new file mode 100644 index 0000000..269b508 --- /dev/null +++ b/.godot/editor/level_end.tscn-folding-3e970eec62a0426eb7ef7143ec989b58.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("back to town"), PackedStringArray("Layout", "Theme Overrides"), NodePath("next level"), PackedStringArray("Layout", "Theme Overrides")] +resource_unfolds=[] +nodes_folded=[] diff --git a/.godot/editor/main.tscn-editstate-3070c538c03ee49b7677ff960a3f5195.cfg b/.godot/editor/main.tscn-editstate-3070c538c03ee49b7677ff960a3f5195.cfg index 79b1155..1d42512 100644 --- a/.godot/editor/main.tscn-editstate-3070c538c03ee49b7677ff960a3f5195.cfg +++ b/.godot/editor/main.tscn-editstate-3070c538c03ee49b7677ff960a3f5195.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-180, -125), +"ofs": Vector2(-369.6, -254.599), "primary_grid_step": Vector2i(8, 8), "show_edit_locks": true, "show_guides": true, @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17150/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/world/player")]) diff --git a/.godot/editor/player.tscn-editstate-753d15e03e0182f9d550ac833b42bb41.cfg b/.godot/editor/player.tscn-editstate-753d15e03e0182f9d550ac833b42bb41.cfg index 8d4bee1..e46250f 100644 --- a/.godot/editor/player.tscn-editstate-753d15e03e0182f9d550ac833b42bb41.cfg +++ b/.godot/editor/player.tscn-editstate-753d15e03e0182f9d550ac833b42bb41.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-121.092, -153.836), +"ofs": Vector2(-1720.64, -1017.94), "primary_grid_step": Vector2i(8, 8), "show_edit_locks": true, "show_guides": true, @@ -32,7 +32,7 @@ Anim={ "snap_rotation_step": 0.261799, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 1.25252 +"zoom": 0.184345 } 3D={ "fov": 70.01, @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17150/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/world/player")]) diff --git a/.godot/editor/player.tscn-folding-753d15e03e0182f9d550ac833b42bb41.cfg b/.godot/editor/player.tscn-folding-753d15e03e0182f9d550ac833b42bb41.cfg index 19c8b06..669aeaf 100644 --- a/.godot/editor/player.tscn-folding-753d15e03e0182f9d550ac833b42bb41.cfg +++ b/.godot/editor/player.tscn-folding-753d15e03e0182f9d550ac833b42bb41.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[NodePath("."), PackedStringArray("Collision"), NodePath("CollisionShape2D"), PackedStringArray("Transform"), NodePath("AnimatedSprite2D"), PackedStringArray("Texture", "Transform", "Animation")] -resource_unfolds=["res://player/player.tscn::RectangleShape2D_7lh2s", PackedStringArray("Resource"), "res://player/player.tscn::SpriteFrames_poakt", PackedStringArray("Resource")] +node_unfolds=[NodePath("."), PackedStringArray("Collision"), NodePath("CollisionShape2D"), PackedStringArray("Transform"), NodePath("AnimatedSprite2D"), PackedStringArray("Texture", "Transform", "Animation"), NodePath("Camera2D"), PackedStringArray("Visibility", "Ordering", "Texture", "Material", "Process", "Process/Thread Group")] +resource_unfolds=["res://player/player.tscn::RectangleShape2D_7lh2s", PackedStringArray("Resource"), "res://player/player.tscn::SpriteFrames_poakt", PackedStringArray("Resource"), "res://player/player.tscn::StyleBoxFlat_a6f86", PackedStringArray(), "res://player/player.tscn::RectangleShape2D_tnohn", PackedStringArray()] nodes_folded=[] diff --git a/.godot/editor/player_pre-castle.gd-folding-82c709328053476cab9d2dd5123a63a5.cfg b/.godot/editor/player_pre-castle.gd-folding-82c709328053476cab9d2dd5123a63a5.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/player_pre-castle.gd-folding-82c709328053476cab9d2dd5123a63a5.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/pre-castle.gd-folding-4ea0beba00e1867dfa3f6c30be7c258f.cfg b/.godot/editor/pre-castle.gd-folding-4ea0beba00e1867dfa3f6c30be7c258f.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/pre-castle.gd-folding-4ea0beba00e1867dfa3f6c30be7c258f.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/pre-castle.tscn-editstate-7b9b7a0f3b091b32e7b6b100ff923095.cfg b/.godot/editor/pre-castle.tscn-editstate-7b9b7a0f3b091b32e7b6b100ff923095.cfg new file mode 100644 index 0000000..808a476 --- /dev/null +++ b/.godot/editor/pre-castle.tscn-editstate-7b9b7a0f3b091b32e7b6b100ff923095.cfg @@ -0,0 +1,175 @@ +[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(1013.25, 103.244), +"primary_grid_step": Vector2i(8, 8), +"show_edit_locks": true, +"show_guides": true, +"show_helpers": false, +"show_origin": 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.690909 +} +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, +"NavigationLink3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 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": true, +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17150/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/world/player")]) diff --git a/.godot/editor/pre-castle.tscn-folding-7b9b7a0f3b091b32e7b6b100ff923095.cfg b/.godot/editor/pre-castle.tscn-folding-7b9b7a0f3b091b32e7b6b100ff923095.cfg new file mode 100644 index 0000000..6a69291 --- /dev/null +++ b/.godot/editor/pre-castle.tscn-folding-7b9b7a0f3b091b32e7b6b100ff923095.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("floor"), PackedStringArray("Collision"), NodePath("floor/floor"), PackedStringArray("Transform"), NodePath("floor/floor2"), PackedStringArray("Layout"), NodePath("Lava"), PackedStringArray("Layout"), NodePath("Lava/TextureRect"), PackedStringArray("Layout"), NodePath("checkpoint"), PackedStringArray("Collision"), NodePath("checkpoint/checkpoint"), PackedStringArray("Transform"), NodePath("checkpoint/Polygon2D"), PackedStringArray("Data"), NodePath("block1"), PackedStringArray("Collision"), NodePath("block1/block1"), PackedStringArray("Transform"), NodePath("block1/Polygon2D"), PackedStringArray("Transform", "Texture", "Data"), NodePath("block2"), PackedStringArray("Transform", "Collision"), NodePath("block2/block2"), PackedStringArray("Transform"), NodePath("block2/Polygon2D"), PackedStringArray("Data"), NodePath("block3"), PackedStringArray("Transform", "Collision"), NodePath("block3/block3"), PackedStringArray("Transform"), NodePath("block3/ColorRect"), PackedStringArray("Layout"), NodePath("block4"), PackedStringArray("Visibility", "Collision"), NodePath("block4/block4"), PackedStringArray("Transform"), NodePath("block4/ColorRect"), PackedStringArray("Layout"), NodePath("block5"), PackedStringArray("physics_material_override", "Collision"), NodePath("Sprite2D"), PackedStringArray("texture", "Visibility"), NodePath("block6"), PackedStringArray("Collision"), NodePath("block7"), PackedStringArray("Collision"), NodePath("block8"), PackedStringArray("Collision"), NodePath("block9"), PackedStringArray("Collision"), NodePath("block10"), PackedStringArray("Collision"), NodePath("block11"), PackedStringArray("Collision"), NodePath("block12"), PackedStringArray("Collision"), NodePath("block13"), PackedStringArray("Collision"), NodePath("block14"), PackedStringArray("Collision"), NodePath("block15"), PackedStringArray("Collision"), NodePath("block16"), PackedStringArray("Collision"), NodePath("large slime2"), PackedStringArray("Visibility")] +resource_unfolds=["res://pre-castle.tscn::PhysicsMaterial_7p7ml", PackedStringArray("Resource"), "res://pre-castle.tscn::RectangleShape2D_romv4", PackedStringArray("Resource"), "res://pre-castle.tscn::NoiseTexture2D_u83ja", PackedStringArray("Resource"), "res://pre-castle.tscn::GDScript_cqy56", PackedStringArray("Resource"), "res://pre-castle.tscn::RectangleShape2D_0cyjy", PackedStringArray("Resource"), "res://pre-castle.tscn::RectangleShape2D_olbp5", PackedStringArray("Resource"), "res://pre-castle.tscn::RectangleShape2D_arhvb", PackedStringArray(), "res://pre-castle.tscn::RectangleShape2D_rs7gu", PackedStringArray(), "res://pre-castle.tscn::RectangleShape2D_gnrcu", PackedStringArray(), "res://pre-castle.tscn::RectangleShape2D_t4i58", PackedStringArray(), "res://pre-castle.tscn::RectangleShape2D_v760m", PackedStringArray(), "res://pre-castle.tscn::RectangleShape2D_bbl7k", PackedStringArray(), "res://pre-castle.tscn::RectangleShape2D_wogpj", PackedStringArray(), "res://pre-castle.tscn::RectangleShape2D_fk5gd", PackedStringArray(), "res://pre-castle.tscn::RectangleShape2D_ip3l7", PackedStringArray(), "res://pre-castle.tscn::RectangleShape2D_mxbx8", PackedStringArray()] +nodes_folded=[NodePath("Lava"), NodePath("checkpoint"), NodePath("block2"), NodePath("block3"), NodePath("block4"), NodePath("block7"), NodePath("block8"), NodePath("block10"), NodePath("block11"), NodePath("block12"), NodePath("block15"), NodePath("player")] diff --git a/.godot/editor/project_metadata.cfg b/.godot/editor/project_metadata.cfg index fdc95a9..0fbf8f4 100644 --- a/.godot/editor/project_metadata.cfg +++ b/.godot/editor/project_metadata.cfg @@ -1,6 +1,6 @@ [editor_metadata] -executable_path="/private/var/folders/q3/5_2c3qgd7hs_m8wkyzqfbjgh0000gn/T/AppTranslocation/5C34C71A-3012-4C5A-9F32-6C87ADC02719/d/Godot.app/Contents/MacOS/Godot" +executable_path="/Applications/Godot.app/Contents/MacOS/Godot" [debug_options] @@ -9,11 +9,35 @@ run_reload_scripts=true [recent_files] -scenes=["res://global.tscn", "res://enemy/skeleton.tscn", "res://player/player.tscn", "res://world.tscn", "res://main.tscn"] -scripts=["res://global.gd", "res://enemy/skeleton.gd", "res://player/player.gd", "res://shop_surface.gd", "res://shop (detection).gd", "res://main.gd"] +scenes=["res://level_end.tscn", "res://enemy/smallslime.tscn", "res://lava_zone.tscn", "res://player/player.tscn", "res://world.tscn", "res://pre-castle.tscn", "res://main.tscn", "res://intro.tscn", "res://settings.tscn", "res://enemy/largeslime.tscn"] +scripts=["res://pre-castle.gd", "Node", "res://enemy/largeslime_pre-castle.gd", "res://enemy/smallslime-pre-castle.gd", "res://enemy spawner.gd", "res://player/player_pre-castle.gd", "res://player/player_lavazone.gd", "res://main.gd", "res://main.tscn::GDScript_a1tx7", "res://enemy/smallslime.gd"] [linked_properties] Node2D:scale=true CharacterBody2D:scale=true Panel:scale=true +StaticBody2D:scale=true +TextureRect:scale=true +Control:scale=true +OptionButton:scale=true +VBoxContainer:scale=true +AnimatedSprite2D:scale=true +Camera2D:zoom=true +Camera2D:scale=true +Area2D:scale=true +ColorRect:scale=true +CollisionShape2D:scale=true +CollisionPolygon2D:scale=true +Polygon2D:texture_scale=true +Polygon2D:scale=true +Sprite2D:scale=true + +[dialog_bounds] + +create_new_node=Rect2(540, 200, 1800, 1400) +project_settings=Rect2(540, 200, 1800, 1400) + +[script_setup] + +last_selected_language="GDScript" diff --git a/.godot/editor/recent_dirs b/.godot/editor/recent_dirs new file mode 100644 index 0000000..7eeb8d1 --- /dev/null +++ b/.godot/editor/recent_dirs @@ -0,0 +1 @@ +res:// diff --git a/.godot/editor/script_editor_cache.cfg b/.godot/editor/script_editor_cache.cfg index 6b5e8d7..0500416 100644 --- a/.godot/editor/script_editor_cache.cfg +++ b/.godot/editor/script_editor_cache.cfg @@ -1,18 +1,60 @@ -[res://main.gd] +[res://player/player.gd] state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 0, +"column": 45, +"folded_lines": Array[int]([]), +"h_scroll_position": 624, +"row": 158, +"scroll_position": 147.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://world.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 52, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 0, -"scroll_position": 0.0, +"row": 13, +"scroll_position": 4.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://lava_zone.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 27, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 13, +"scroll_position": 4.0, "selection": false, "syntax_highlighter": "GDScript" } -[res://shop (detection).gd] +[res://level_end.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 50, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 22, +"scroll_position": 2.76, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://settings.gd] state={ "bookmarks": PackedInt32Array(), @@ -26,7 +68,35 @@ state={ "syntax_highlighter": "GDScript" } -[res://shop_surface.gd] +[res://enemy/largeslime.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 57, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 187, +"scroll_position": 169.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://enemy/smallslime.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 29, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 32, +"scroll_position": 45.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://main.gd] state={ "bookmarks": PackedInt32Array(), @@ -40,7 +110,39 @@ state={ "syntax_highlighter": "GDScript" } -[res://player/player.gd] +[res://player/player_lavazone.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 22, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 56, +"scroll_position": 47.0, +"selection": true, +"selection_from_column": 16, +"selection_from_line": 56, +"selection_to_column": 22, +"selection_to_line": 56, +"syntax_highlighter": "GDScript" +} + +[res://player/player_pre-castle.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 27, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 31, +"scroll_position": 30.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://enemy spawner.gd] state={ "bookmarks": PackedInt32Array(), @@ -49,12 +151,26 @@ state={ "folded_lines": Array[int]([]), "h_scroll_position": 0, "row": 0, -"scroll_position": 0.0, +"scroll_position": 5.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://enemy/smallslime-pre-castle.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 29, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 33, +"scroll_position": 22.0, "selection": false, "syntax_highlighter": "GDScript" } -[res://enemy/skeleton.gd] +[res://enemy/largeslime_pre-castle.gd] state={ "bookmarks": PackedInt32Array(), @@ -62,8 +178,22 @@ state={ "column": 0, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 8, -"scroll_position": 9.3, +"row": 3, +"scroll_position": 38.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://pre-castle.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 64, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 3, +"scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" } diff --git a/.godot/editor/settings.tscn-editstate-5e6299b8d8c40760f2987e3552e86b12.cfg b/.godot/editor/settings.tscn-editstate-5e6299b8d8c40760f2987e3552e86b12.cfg new file mode 100644 index 0000000..633f9fc --- /dev/null +++ b/.godot/editor/settings.tscn-editstate-5e6299b8d8c40760f2987e3552e86b12.cfg @@ -0,0 +1,175 @@ +[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(-451.216, -421.256), +"primary_grid_step": Vector2i(8, 8), +"show_edit_locks": true, +"show_guides": true, +"show_helpers": false, +"show_origin": 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.193159 +} +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, +"NavigationLink3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 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": true, +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +selected_nodes=Array[NodePath]([]) diff --git a/.godot/editor/settings.tscn-folding-5e6299b8d8c40760f2987e3552e86b12.cfg b/.godot/editor/settings.tscn-folding-5e6299b8d8c40760f2987e3552e86b12.cfg new file mode 100644 index 0000000..f9e0b4e --- /dev/null +++ b/.godot/editor/settings.tscn-folding-5e6299b8d8c40760f2987e3552e86b12.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Layout"), NodePath("MarginContainer"), PackedStringArray("Layout"), NodePath("MarginContainer/VBoxContainer"), PackedStringArray("Layout"), NodePath("MarginContainer/VBoxContainer/Label2"), PackedStringArray("Layout"), NodePath("MarginContainer/VBoxContainer/Volume"), PackedStringArray("Layout"), NodePath("MarginContainer/VBoxContainer/Label"), PackedStringArray("Layout"), NodePath("MarginContainer/VBoxContainer/CheckBox"), PackedStringArray("Layout"), NodePath("MarginContainer/VBoxContainer/Resolutions"), PackedStringArray("Layout")] +resource_unfolds=[] +nodes_folded=[] diff --git a/.godot/editor/smallslime-pre-castle.gd-folding-1daff5aadd3b479a9acf05d993ba51cc.cfg b/.godot/editor/smallslime-pre-castle.gd-folding-1daff5aadd3b479a9acf05d993ba51cc.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/smallslime-pre-castle.gd-folding-1daff5aadd3b479a9acf05d993ba51cc.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/smallslime.gd-folding-56eae12d79c2c44904ada831a464f74d.cfg b/.godot/editor/smallslime.gd-folding-56eae12d79c2c44904ada831a464f74d.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/smallslime.gd-folding-56eae12d79c2c44904ada831a464f74d.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/smallslime.tscn-editstate-9912ca0662d9e8c8ccbc3cad039c7815.cfg b/.godot/editor/smallslime.tscn-editstate-9912ca0662d9e8c8ccbc3cad039c7815.cfg new file mode 100644 index 0000000..6ce8b7b --- /dev/null +++ b/.godot/editor/smallslime.tscn-editstate-9912ca0662d9e8c8ccbc3cad039c7815.cfg @@ -0,0 +1,175 @@ +[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(-739.2, -434.6), +"primary_grid_step": Vector2i(8, 8), +"show_edit_locks": true, +"show_guides": true, +"show_helpers": false, +"show_origin": 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.25 +} +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, +"NavigationLink3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 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": true, +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"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": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17150/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/world/player")]) diff --git a/.godot/editor/smallslime.tscn-folding-9912ca0662d9e8c8ccbc3cad039c7815.cfg b/.godot/editor/smallslime.tscn-folding-9912ca0662d9e8c8ccbc3cad039c7815.cfg new file mode 100644 index 0000000..cb1257f --- /dev/null +++ b/.godot/editor/smallslime.tscn-folding-9912ca0662d9e8c8ccbc3cad039c7815.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Collision"), NodePath("CollisionShape2D"), PackedStringArray("Transform"), NodePath("AnimatedSprite2D"), PackedStringArray("Texture", "Transform", "Animation"), NodePath("Area2D (detection)"), PackedStringArray("Collision"), NodePath("Area2D (strike)"), PackedStringArray("Collision"), NodePath("Area2D (strike)/CollisionShape2D"), PackedStringArray("Transform"), NodePath("SmallSlimeBar"), PackedStringArray("Layout", "Theme Overrides")] +resource_unfolds=["res://enemy/smallslime.tscn::RectangleShape2D_qb0lt", PackedStringArray("Resource"), "res://enemy/smallslime.tscn::SpriteFrames_o17jh", PackedStringArray("Resource"), "res://enemy/smallslime.tscn::CircleShape2D_qfdxx", PackedStringArray("Resource"), "res://enemy/smallslime.tscn::RectangleShape2D_v7847", PackedStringArray("Resource"), "res://enemy/smallslime.tscn::StyleBoxFlat_8v4sy", PackedStringArray("Resource")] +nodes_folded=[] diff --git a/.godot/editor/world.tscn-editstate-76e0adcbc83681695885bae615f516ae.cfg b/.godot/editor/world.tscn-editstate-76e0adcbc83681695885bae615f516ae.cfg index f004160..ab0a8ad 100644 --- a/.godot/editor/world.tscn-editstate-76e0adcbc83681695885bae615f516ae.cfg +++ b/.godot/editor/world.tscn-editstate-76e0adcbc83681695885bae615f516ae.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-150.074, -165.085), +"ofs": Vector2(-103.876, -143.008), "primary_grid_step": Vector2i(8, 8), "show_edit_locks": true, "show_guides": true, @@ -32,7 +32,7 @@ Anim={ "snap_rotation_step": 0.261799, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 0.548887 +"zoom": 0.568514 } 3D={ "fov": 70.01, @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17150/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/world/player")]) diff --git a/.godot/editor/world.tscn-folding-76e0adcbc83681695885bae615f516ae.cfg b/.godot/editor/world.tscn-folding-76e0adcbc83681695885bae615f516ae.cfg index 3a1108d..5109806 100644 --- a/.godot/editor/world.tscn-folding-76e0adcbc83681695885bae615f516ae.cfg +++ b/.godot/editor/world.tscn-folding-76e0adcbc83681695885bae615f516ae.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[NodePath("player/player"), PackedStringArray("Visibility", "Transform"), NodePath("enemies/skeleton"), PackedStringArray("Transform"), NodePath("StaticBody2D/floor"), PackedStringArray("Transform"), NodePath("StaticBody2D/left wall"), PackedStringArray("Transform"), NodePath("StaticBody2D/right wall"), PackedStringArray("Transform"), NodePath("Panel"), PackedStringArray("Layout"), NodePath("CanvasLayer (ui)/HP"), PackedStringArray("Layout", "Theme Overrides", "BiDi")] -resource_unfolds=["res://world.tscn::RectangleShape2D_1qawu", PackedStringArray("Resource"), "res://world.tscn::RectangleShape2D_8ese3", PackedStringArray("Resource"), "res://world.tscn::GDScript_5f6qr", PackedStringArray("Resource")] +node_unfolds=[NodePath("player/player"), PackedStringArray("Visibility", "Transform"), NodePath("StaticBody2D/floor"), PackedStringArray("Transform"), NodePath("StaticBody2D/left wall"), PackedStringArray("Transform"), NodePath("StaticBody2D/right wall"), PackedStringArray("Transform"), NodePath("Panel"), PackedStringArray("Layout")] +resource_unfolds=["res://world.tscn::RectangleShape2D_1qawu", PackedStringArray("Resource"), "res://world.tscn::RectangleShape2D_8ese3", PackedStringArray("Resource"), "res://world.tscn::RectangleShape2D_5gsot", PackedStringArray(), "res://world.tscn::RectangleShape2D_tgynu", PackedStringArray(), "res://world.tscn::RectangleShape2D_a0875", PackedStringArray(), "res://world.tscn::RectangleShape2D_2d067", PackedStringArray(), "res://world.tscn::GDScript_5f6qr", PackedStringArray("Resource")] nodes_folded=[] diff --git a/.godot/imported/Full Attack.png-ed0349afb84c273e8a26be111dd5600e.ctex b/.godot/imported/Full Attack.png-ed0349afb84c273e8a26be111dd5600e.ctex new file mode 100644 index 0000000..574d66a Binary files /dev/null and b/.godot/imported/Full Attack.png-ed0349afb84c273e8a26be111dd5600e.ctex differ diff --git a/.godot/imported/Full Attack.png-ed0349afb84c273e8a26be111dd5600e.md5 b/.godot/imported/Full Attack.png-ed0349afb84c273e8a26be111dd5600e.md5 new file mode 100644 index 0000000..086eedb --- /dev/null +++ b/.godot/imported/Full Attack.png-ed0349afb84c273e8a26be111dd5600e.md5 @@ -0,0 +1,3 @@ +source_md5="72d9bd97d50618b634edaa0ba541dd97" +dest_md5="b6ab1ab8b0a034085118f12191ed8018" + diff --git a/.godot/imported/IMG_9284.jpg-5fb0d3597842c42f4d0bc7143bc9391d.ctex b/.godot/imported/IMG_9284.jpg-5fb0d3597842c42f4d0bc7143bc9391d.ctex new file mode 100644 index 0000000..cbb2631 Binary files /dev/null and b/.godot/imported/IMG_9284.jpg-5fb0d3597842c42f4d0bc7143bc9391d.ctex differ diff --git a/.godot/imported/IMG_9284.jpg-5fb0d3597842c42f4d0bc7143bc9391d.md5 b/.godot/imported/IMG_9284.jpg-5fb0d3597842c42f4d0bc7143bc9391d.md5 new file mode 100644 index 0000000..87e2d2c --- /dev/null +++ b/.godot/imported/IMG_9284.jpg-5fb0d3597842c42f4d0bc7143bc9391d.md5 @@ -0,0 +1,3 @@ +source_md5="13086b85bb96d4ab21dd4e757456edf0" +dest_md5="ffe736cc79c0b79a573e5e4307aae290" + diff --git a/.godot/imported/LargeSlime.png-09a06dec02b89f76a4b850818dcf1f39.ctex b/.godot/imported/LargeSlime.png-09a06dec02b89f76a4b850818dcf1f39.ctex new file mode 100644 index 0000000..e2afe0e Binary files /dev/null and b/.godot/imported/LargeSlime.png-09a06dec02b89f76a4b850818dcf1f39.ctex differ diff --git a/.godot/imported/LargeSlime.png-09a06dec02b89f76a4b850818dcf1f39.md5 b/.godot/imported/LargeSlime.png-09a06dec02b89f76a4b850818dcf1f39.md5 new file mode 100644 index 0000000..7bd5962 --- /dev/null +++ b/.godot/imported/LargeSlime.png-09a06dec02b89f76a4b850818dcf1f39.md5 @@ -0,0 +1,3 @@ +source_md5="35a112bc0f3298ba52257d51f2a9425d" +dest_md5="041983d46c964d4765c2eabf2d494864" + diff --git a/.godot/imported/MCSpriteSheet.png-43bf85f7a3cab1cd57c5ff09467d9252.ctex b/.godot/imported/MCSpriteSheet.png-43bf85f7a3cab1cd57c5ff09467d9252.ctex new file mode 100644 index 0000000..e18237e Binary files /dev/null and b/.godot/imported/MCSpriteSheet.png-43bf85f7a3cab1cd57c5ff09467d9252.ctex differ diff --git a/.godot/imported/MCSpriteSheet.png-43bf85f7a3cab1cd57c5ff09467d9252.md5 b/.godot/imported/MCSpriteSheet.png-43bf85f7a3cab1cd57c5ff09467d9252.md5 new file mode 100644 index 0000000..bf51b99 --- /dev/null +++ b/.godot/imported/MCSpriteSheet.png-43bf85f7a3cab1cd57c5ff09467d9252.md5 @@ -0,0 +1,3 @@ +source_md5="5c87c4a337ed446de05925f11579c07e" +dest_md5="8989c4e5f2e7f79dba9c64f85f8094ee" + diff --git a/.godot/imported/Skeleton enemy.png-63aa422dce713abc6a8d5ef2d6a2bc09.ctex b/.godot/imported/Skeleton enemy.png-63aa422dce713abc6a8d5ef2d6a2bc09.ctex new file mode 100644 index 0000000..aa49d15 Binary files /dev/null and b/.godot/imported/Skeleton enemy.png-63aa422dce713abc6a8d5ef2d6a2bc09.ctex differ diff --git a/.godot/imported/Skeleton enemy.png-63aa422dce713abc6a8d5ef2d6a2bc09.md5 b/.godot/imported/Skeleton enemy.png-63aa422dce713abc6a8d5ef2d6a2bc09.md5 new file mode 100644 index 0000000..51a300a --- /dev/null +++ b/.godot/imported/Skeleton enemy.png-63aa422dce713abc6a8d5ef2d6a2bc09.md5 @@ -0,0 +1,3 @@ +source_md5="6c1fb8edea735f46b203751fa0ad3a82" +dest_md5="d719c3da8b0b3c640ef51ecb95f62d62" + diff --git a/.godot/imported/SmallSlime.png-87439ade497edeea6e93cca16b94fe5f.ctex b/.godot/imported/SmallSlime.png-87439ade497edeea6e93cca16b94fe5f.ctex new file mode 100644 index 0000000..4a21d2f Binary files /dev/null and b/.godot/imported/SmallSlime.png-87439ade497edeea6e93cca16b94fe5f.ctex differ diff --git a/.godot/imported/SmallSlime.png-87439ade497edeea6e93cca16b94fe5f.md5 b/.godot/imported/SmallSlime.png-87439ade497edeea6e93cca16b94fe5f.md5 new file mode 100644 index 0000000..9002446 --- /dev/null +++ b/.godot/imported/SmallSlime.png-87439ade497edeea6e93cca16b94fe5f.md5 @@ -0,0 +1,3 @@ +source_md5="77c73c21ea326c1f8676a1cedb2828c0" +dest_md5="da92bb0d6159268031ecda55fb57db18" + diff --git a/.godot/imported/platform-lava-zone.png-4bbea53d4ea14a7c74a7c12218cd5fcf.ctex b/.godot/imported/platform-lava-zone.png-4bbea53d4ea14a7c74a7c12218cd5fcf.ctex new file mode 100644 index 0000000..f806aa9 Binary files /dev/null and b/.godot/imported/platform-lava-zone.png-4bbea53d4ea14a7c74a7c12218cd5fcf.ctex differ diff --git a/.godot/imported/platform-lava-zone.png-4bbea53d4ea14a7c74a7c12218cd5fcf.md5 b/.godot/imported/platform-lava-zone.png-4bbea53d4ea14a7c74a7c12218cd5fcf.md5 new file mode 100644 index 0000000..de3df37 --- /dev/null +++ b/.godot/imported/platform-lava-zone.png-4bbea53d4ea14a7c74a7c12218cd5fcf.md5 @@ -0,0 +1,3 @@ +source_md5="3cbf1ee4e820b9e6cc3db8c7a874086c" +dest_md5="52f7a84404136559b27a978689d8334c" + diff --git a/.godot/imported/pre-castle.JPG-1a77aa9261866c4c1a7f559d4f17d52f.md5 b/.godot/imported/pre-castle.JPG-1a77aa9261866c4c1a7f559d4f17d52f.md5 new file mode 100644 index 0000000..ec24ab5 --- /dev/null +++ b/.godot/imported/pre-castle.JPG-1a77aa9261866c4c1a7f559d4f17d52f.md5 @@ -0,0 +1,3 @@ +source_md5="fd024f53aac5082543aee8a685e34fa8" +dest_md5="8a37c48ae8fe1228efc94c4074a76659" + diff --git a/.godot/imported/pre-castle.jpg-22eaf288d11291e98dc8b197c5651e8e.ctex b/.godot/imported/pre-castle.jpg-22eaf288d11291e98dc8b197c5651e8e.ctex new file mode 100644 index 0000000..cbb2631 Binary files /dev/null and b/.godot/imported/pre-castle.jpg-22eaf288d11291e98dc8b197c5651e8e.ctex differ diff --git a/.godot/imported/pre-castle.jpg-22eaf288d11291e98dc8b197c5651e8e.md5 b/.godot/imported/pre-castle.jpg-22eaf288d11291e98dc8b197c5651e8e.md5 new file mode 100644 index 0000000..87e2d2c --- /dev/null +++ b/.godot/imported/pre-castle.jpg-22eaf288d11291e98dc8b197c5651e8e.md5 @@ -0,0 +1,3 @@ +source_md5="13086b85bb96d4ab21dd4e757456edf0" +dest_md5="ffe736cc79c0b79a573e5e4307aae290" + diff --git a/.godot/imported/spritesheet_no_attack.png-70f67061f6894e60543be51942c7b9dd.ctex b/.godot/imported/spritesheet_no_attack.png-70f67061f6894e60543be51942c7b9dd.ctex new file mode 100644 index 0000000..aad65a0 Binary files /dev/null and b/.godot/imported/spritesheet_no_attack.png-70f67061f6894e60543be51942c7b9dd.ctex differ diff --git a/.godot/imported/spritesheet_no_attack.png-70f67061f6894e60543be51942c7b9dd.md5 b/.godot/imported/spritesheet_no_attack.png-70f67061f6894e60543be51942c7b9dd.md5 new file mode 100644 index 0000000..9f7fe68 --- /dev/null +++ b/.godot/imported/spritesheet_no_attack.png-70f67061f6894e60543be51942c7b9dd.md5 @@ -0,0 +1,3 @@ +source_md5="680518d8355a9c29cd8016dc588462ab" +dest_md5="66dd13891d379a7b74214b6ca971be9d" + diff --git a/.godot/uid_cache.bin b/.godot/uid_cache.bin index 9eb199e..27cb858 100644 Binary files a/.godot/uid_cache.bin and b/.godot/uid_cache.bin differ diff --git a/AnimationSheet_Character.png b/AnimationSheet_Character.png deleted file mode 100644 index 394211f..0000000 Binary files a/AnimationSheet_Character.png and /dev/null differ diff --git a/enemy spawner.gd b/enemy spawner.gd new file mode 100644 index 0000000..31f270d --- /dev/null +++ b/enemy spawner.gd @@ -0,0 +1,24 @@ +extends Node2D + +@export var enemy_scene: PackedScene # Drag and drop your Enemy.tscn here in the editor +@export var min_enemies: int = 1 +@export var max_enemies: int = 3 +@export var spawn_area_size: Vector2 = Vector2(1000, -100) # Adjust to fit your needs + +func _ready(): + spawn_random_enemies() + +func spawn_random_enemies(): + # Get a random number of enemies to spawn + var number_of_enemies = randi_range(min_enemies, max_enemies) + Global.num_enemies += number_of_enemies + + for i in range(number_of_enemies): + var enemy_instance = enemy_scene.instantiate() # Create an instance of the enemy + if enemy_instance: + # Set a random position within the defined spawn area + var random_x = randf_range(100, spawn_area_size.x) + var random_y = randf_range(-600, spawn_area_size.y) + enemy_instance.position = Vector2(random_x, random_y) + # Add the enemy instance to the scene + add_child(enemy_instance) diff --git a/enemy/LargeSlime.png b/enemy/LargeSlime.png new file mode 100644 index 0000000..e5f4d97 Binary files /dev/null and b/enemy/LargeSlime.png differ diff --git a/AnimationSheet_Character.png.import b/enemy/LargeSlime.png.import similarity index 65% rename from AnimationSheet_Character.png.import rename to enemy/LargeSlime.png.import index e530479..6383160 100644 --- a/AnimationSheet_Character.png.import +++ b/enemy/LargeSlime.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://geqh1teab7u1" -path="res://.godot/imported/AnimationSheet_Character.png-180187841cf5dc54e553e7fb3b1c09a2.ctex" +uid="uid://c6niwkt73ja84" +path="res://.godot/imported/LargeSlime.png-09a06dec02b89f76a4b850818dcf1f39.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://AnimationSheet_Character.png" -dest_files=["res://.godot/imported/AnimationSheet_Character.png-180187841cf5dc54e553e7fb3b1c09a2.ctex"] +source_file="res://enemy/LargeSlime.png" +dest_files=["res://.godot/imported/LargeSlime.png-09a06dec02b89f76a4b850818dcf1f39.ctex"] [params] diff --git a/Skeleton enemy.png b/enemy/Skeleton enemy.png similarity index 100% rename from Skeleton enemy.png rename to enemy/Skeleton enemy.png diff --git a/Skeleton enemy.png.import b/enemy/Skeleton enemy.png.import similarity index 71% rename from Skeleton enemy.png.import rename to enemy/Skeleton enemy.png.import index b5b6b9e..2db128e 100644 --- a/Skeleton enemy.png.import +++ b/enemy/Skeleton enemy.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://34v2m3edfkgx" -path="res://.godot/imported/Skeleton enemy.png-4c3c0c3c52487fb9c1cc41cb0e8706ad.ctex" +path="res://.godot/imported/Skeleton enemy.png-63aa422dce713abc6a8d5ef2d6a2bc09.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://Skeleton enemy.png" -dest_files=["res://.godot/imported/Skeleton enemy.png-4c3c0c3c52487fb9c1cc41cb0e8706ad.ctex"] +source_file="res://enemy/Skeleton enemy.png" +dest_files=["res://.godot/imported/Skeleton enemy.png-63aa422dce713abc6a8d5ef2d6a2bc09.ctex"] [params] diff --git a/enemy/SmallSlime.png b/enemy/SmallSlime.png new file mode 100644 index 0000000..9d65bcf Binary files /dev/null and b/enemy/SmallSlime.png differ diff --git a/enemy/SmallSlime.png.import b/enemy/SmallSlime.png.import new file mode 100644 index 0000000..f94a4e9 --- /dev/null +++ b/enemy/SmallSlime.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dddn3pqo5ersh" +path="res://.godot/imported/SmallSlime.png-87439ade497edeea6e93cca16b94fe5f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://enemy/SmallSlime.png" +dest_files=["res://.godot/imported/SmallSlime.png-87439ade497edeea6e93cca16b94fe5f.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/enemy/largeslime.gd b/enemy/largeslime.gd new file mode 100644 index 0000000..59f136d --- /dev/null +++ b/enemy/largeslime.gd @@ -0,0 +1,188 @@ +extends CharacterBody2D + +@onready var player = $"../player/player" + +const SPEED = 50.0 +var health = 20 +var current_health = health +var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") +var chase = false +var is_striking = false + +@export var knockback_force : float = 500.0 +var knockback_duration : float = 0.2 +var is_knocked_back : bool = false +var knockback_direction : Vector2 + +var invincible = false +var invincibility_duration = 0.7 + +var pace_left = false +var pace_right = true + +const DASH_ATTACK_SPEED = 200 +var dash_chance: int +var can_dash = false +var is_dashing = false +var dash_duration = 2 + +func _physics_process(delta): + # Add the gravity. + if not is_on_floor(): + velocity.y += gravity * delta + + if invincible: + invincibility_duration -= delta + if invincibility_duration <= 0: + invincible = false + + if not invincible and abs(player.position - self.position) < Vector2(50,50) and player.is_striking: + self.health -= 3 + invincibility() + + if health < current_health and health > 0: + get_node("AnimatedSprite2D").play("hurt") + await get_node("AnimatedSprite2D").animation_finished + current_health = health + $LargeSlimeBar.value=current_health + + if is_knocked_back: + velocity = knockback_direction.normalized() * knockback_force + knockback_duration -= delta + if knockback_duration <= 0: + is_knocked_back = false + velocity = Vector2.ZERO + + if health <= 0: + Global.enemy_respawn = false + Global.enemy_health = 0 + is_striking = false + chase = false + var player_health = player.health + $LargeSlimeBar.value=0 + get_node("AnimatedSprite2D").play("death") + await get_node("AnimatedSprite2D").animation_finished + self.queue_free() + Global.num_enemies -= 1 + if Global.num_enemies > 0: + Global.kill_all_enemies = true + player.is_knocked_back = false + player.health = player_health + level_end_scene() + + if chase: + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "attack_heavy" and \ + get_node("AnimatedSprite2D").animation != "attack_dash" and \ + get_node("AnimatedSprite2D").animation != "hurt": + get_node("AnimatedSprite2D").play("walk") + var direction = (player.position - self.position).normalized() + if direction.x > 0: + get_node("AnimatedSprite2D").flip_h = true + Global.enemy_direction_left = true + if direction.x < 0: + get_node("AnimatedSprite2D").flip_h = false + Global.enemy_direction_left = false + if dash_chance == 2 and can_dash and dash_duration > 0: + dash_duration -= delta + is_dashing = true + get_node("AnimatedSprite2D").play("attack_dash") + velocity.x = direction.x * DASH_ATTACK_SPEED + else: + velocity.x = direction.x * SPEED + get_node("AnimatedSprite2D").play("walk") + elif pace_left: + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "attack_heavy" and \ + get_node("AnimatedSprite2D").animation != "attack_dash" and \ + get_node("AnimatedSprite2D").animation != "hurt": + get_node("AnimatedSprite2D").play("walk") + get_node("AnimatedSprite2D").flip_h = false + Global.enemy_direction_left = false + velocity.x = -SPEED + elif pace_right: + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "attack_heavy" and \ + get_node("AnimatedSprite2D").animation != "attack_dash" and \ + get_node("AnimatedSprite2D").animation != "hurt": + get_node("AnimatedSprite2D").play("walk") + get_node("AnimatedSprite2D").flip_h = true + Global.enemy_direction_left = true + velocity.x = SPEED + + move_and_slide() + + if health > 0: + Global.enemy_health = self.health + $LargeSlimeBar.value=current_health + +func _on_area_2d_player_detection_body_entered(body): + if body.name == "player": + chase = true + pace_left = false + pace_right = false + can_dash = true + dash_duration = 2 + dash_chance = randi_range(1, 2) + get_node("AnimatedSprite2D").play("walk") + +func _on_area_2d_player_detection_body_exited(body): + if body.name == "player": + chase = false + pace_left = true + can_dash = false + get_node("AnimatedSprite2D").play("walk") + +func _on_area_2d_strike_body_entered(body): + if body.name == "player" and body.health > 0: + is_striking = true + if is_striking and can_dash and is_dashing: + body.health -= 7 + var direction = (body.position - position).normalized() + body.call("apply_knockback", direction * knockback_force) + can_dash = false + is_dashing = false + if body.health <= 0: + is_striking = false + if is_striking: + can_dash = false + chase = false + while is_striking: + velocity.x = 0 + var light_or_heavy = randi_range(1, 5) + if light_or_heavy == 5: + get_node("AnimatedSprite2D").play("attack_heavy") + await get_node("AnimatedSprite2D").animation_finished + body.health -= 10 + var direction = (body.position - position).normalized() + body.call("apply_knockback", direction * knockback_force) + else: + get_node("AnimatedSprite2D").play("attack_basic") + await get_node("AnimatedSprite2D").animation_finished + body.health -= 5 + var direction = (body.position - position).normalized() + body.call("apply_knockback", direction * knockback_force) + if body.health <= 0: + is_striking = false + +func _on_area_2d_strike_body_exited(body): + if body.name == "player": + is_striking = false + chase = true + can_dash = true + dash_duration = 2 + dash_chance = randi_range(1, 2) + get_node("AnimatedSprite2D").play("walk") + +func apply_knockback(direction: Vector2) -> void: + is_knocked_back = true + knockback_direction = direction + knockback_duration = 0.2 # Reset the duration + +func invincibility() -> void: + invincible = true + invincibility_duration = 0.7 + +func level_end_scene() -> void: + if get_tree(): #and get_node("AnimatedSprite2D").animation != "death": + get_tree().change_scene_to_file("res://level_end.tscn") diff --git a/enemy/largeslime.tscn b/enemy/largeslime.tscn new file mode 100644 index 0000000..2444bf2 --- /dev/null +++ b/enemy/largeslime.tscn @@ -0,0 +1,473 @@ +[gd_scene load_steps=61 format=3 uid="uid://lr7eoqvmxf7h"] + +[ext_resource type="Script" path="res://enemy/smallslime.gd" id="1_1rsld"] +[ext_resource type="Texture2D" uid="uid://c6niwkt73ja84" path="res://enemy/LargeSlime.png" id="2_a8ec6"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_qb0lt"] +size = Vector2(58, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1h3p7"] +atlas = ExtResource("2_a8ec6") +region = Rect2(0, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wrgn5"] +atlas = ExtResource("2_a8ec6") +region = Rect2(32, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8wuqs"] +atlas = ExtResource("2_a8ec6") +region = Rect2(64, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2ecd6"] +atlas = ExtResource("2_a8ec6") +region = Rect2(96, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3st7l"] +atlas = ExtResource("2_a8ec6") +region = Rect2(128, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cunxe"] +atlas = ExtResource("2_a8ec6") +region = Rect2(160, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_f4hb0"] +atlas = ExtResource("2_a8ec6") +region = Rect2(192, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bry5f"] +atlas = ExtResource("2_a8ec6") +region = Rect2(224, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y16bc"] +atlas = ExtResource("2_a8ec6") +region = Rect2(256, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5mocl"] +atlas = ExtResource("2_a8ec6") +region = Rect2(288, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ndrau"] +atlas = ExtResource("2_a8ec6") +region = Rect2(320, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qv0fj"] +atlas = ExtResource("2_a8ec6") +region = Rect2(352, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_18khc"] +atlas = ExtResource("2_a8ec6") +region = Rect2(0, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ltgnl"] +atlas = ExtResource("2_a8ec6") +region = Rect2(32, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bao6l"] +atlas = ExtResource("2_a8ec6") +region = Rect2(64, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_t5h3a"] +atlas = ExtResource("2_a8ec6") +region = Rect2(96, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0lp7j"] +atlas = ExtResource("2_a8ec6") +region = Rect2(128, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_adr43"] +atlas = ExtResource("2_a8ec6") +region = Rect2(160, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lksov"] +atlas = ExtResource("2_a8ec6") +region = Rect2(192, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vtbm0"] +atlas = ExtResource("2_a8ec6") +region = Rect2(224, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5n4ao"] +atlas = ExtResource("2_a8ec6") +region = Rect2(256, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_utmmc"] +atlas = ExtResource("2_a8ec6") +region = Rect2(288, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h6eqf"] +atlas = ExtResource("2_a8ec6") +region = Rect2(320, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3y8jf"] +atlas = ExtResource("2_a8ec6") +region = Rect2(352, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_v2wa6"] +atlas = ExtResource("2_a8ec6") +region = Rect2(384, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_sd8vu"] +atlas = ExtResource("2_a8ec6") +region = Rect2(0, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0klxr"] +atlas = ExtResource("2_a8ec6") +region = Rect2(64, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rcrd8"] +atlas = ExtResource("2_a8ec6") +region = Rect2(96, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4syci"] +atlas = ExtResource("2_a8ec6") +region = Rect2(128, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_23j55"] +atlas = ExtResource("2_a8ec6") +region = Rect2(160, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ftrd0"] +atlas = ExtResource("2_a8ec6") +region = Rect2(192, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_e1j4v"] +atlas = ExtResource("2_a8ec6") +region = Rect2(224, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_totpe"] +atlas = ExtResource("2_a8ec6") +region = Rect2(256, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1bshs"] +atlas = ExtResource("2_a8ec6") +region = Rect2(288, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ymega"] +atlas = ExtResource("2_a8ec6") +region = Rect2(320, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gcyha"] +atlas = ExtResource("2_a8ec6") +region = Rect2(352, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wr1lx"] +atlas = ExtResource("2_a8ec6") +region = Rect2(0, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_v8xkx"] +atlas = ExtResource("2_a8ec6") +region = Rect2(32, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mhlm2"] +atlas = ExtResource("2_a8ec6") +region = Rect2(64, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_801ou"] +atlas = ExtResource("2_a8ec6") +region = Rect2(96, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_e8x10"] +atlas = ExtResource("2_a8ec6") +region = Rect2(128, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_htsrw"] +atlas = ExtResource("2_a8ec6") +region = Rect2(160, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_k3kvt"] +atlas = ExtResource("2_a8ec6") +region = Rect2(192, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tntg2"] +atlas = ExtResource("2_a8ec6") +region = Rect2(224, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xfufn"] +atlas = ExtResource("2_a8ec6") +region = Rect2(256, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_drt21"] +atlas = ExtResource("2_a8ec6") +region = Rect2(288, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_41gun"] +atlas = ExtResource("2_a8ec6") +region = Rect2(0, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nql4d"] +atlas = ExtResource("2_a8ec6") +region = Rect2(32, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1v5fm"] +atlas = ExtResource("2_a8ec6") +region = Rect2(0, 170, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lqow3"] +atlas = ExtResource("2_a8ec6") +region = Rect2(32, 170, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8k0px"] +atlas = ExtResource("2_a8ec6") +region = Rect2(64, 170, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_du37c"] +atlas = ExtResource("2_a8ec6") +region = Rect2(96, 170, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gh2pb"] +atlas = ExtResource("2_a8ec6") +region = Rect2(128, 170, 32, 34) + +[sub_resource type="SpriteFrames" id="SpriteFrames_o17jh"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_1h3p7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wrgn5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8wuqs") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2ecd6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3st7l") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_cunxe") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_f4hb0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bry5f") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_y16bc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5mocl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ndrau") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qv0fj") +}], +"loop": false, +"name": &"attack_basic", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_18khc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ltgnl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bao6l") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_t5h3a") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0lp7j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_adr43") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lksov") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vtbm0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5n4ao") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_utmmc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h6eqf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3y8jf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_v2wa6") +}], +"loop": false, +"name": &"attack_dash", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_sd8vu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0klxr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rcrd8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4syci") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_23j55") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ftrd0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_e1j4v") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_totpe") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1bshs") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ymega") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gcyha") +}], +"loop": false, +"name": &"attack_heavy", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_wr1lx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_v8xkx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mhlm2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_801ou") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_e8x10") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_htsrw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_k3kvt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tntg2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xfufn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_drt21") +}], +"loop": false, +"name": &"death", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_41gun") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nql4d") +}], +"loop": false, +"name": &"hurt", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_1v5fm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lqow3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8k0px") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_du37c") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gh2pb") +}], +"loop": true, +"name": &"walk", +"speed": 5.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_qfdxx"] +radius = 266.002 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_v7847"] +size = Vector2(42, 58) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8v4sy"] +bg_color = Color(0.501961, 0.141176, 0.6, 1) + +[node name="large slime" type="CharacterBody2D"] +collision_layer = 4 +collision_mask = 4 +script = ExtResource("1_1rsld") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(4, 4) +shape = SubResource("RectangleShape2D_qb0lt") +metadata/_edit_lock_ = true + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(0.499999, 1.07288e-06) +scale = Vector2(2.17188, 2.03125) +sprite_frames = SubResource("SpriteFrames_o17jh") +animation = &"walk" +autoplay = "walk" +frame_progress = 0.42568 +metadata/_edit_lock_ = true + +[node name="Area2D (detection)" type="Area2D" parent="."] +collision_layer = 7 +collision_mask = 7 +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D (detection)"] +shape = SubResource("CircleShape2D_qfdxx") +metadata/_edit_lock_ = true + +[node name="Area2D (strike)" type="Area2D" parent="."] +collision_layer = 7 +collision_mask = 7 +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D (strike)"] +position = Vector2(-1, -1) +shape = SubResource("RectangleShape2D_v7847") +metadata/_edit_lock_ = true + +[node name="LargeSlimeBar" type="ProgressBar" parent="."] +offset_left = -61.0 +offset_top = -70.0 +offset_right = 62.0 +offset_bottom = -43.0 +theme_override_styles/background = SubResource("StyleBoxFlat_8v4sy") +max_value = 20.0 +value = 20.0 + +[connection signal="body_entered" from="Area2D (detection)" to="." method="_on_area_2d_player_detection_body_entered"] +[connection signal="body_exited" from="Area2D (detection)" to="." method="_on_area_2d_player_detection_body_exited"] +[connection signal="body_entered" from="Area2D (strike)" to="." method="_on_area_2d_strike_body_entered"] +[connection signal="body_exited" from="Area2D (strike)" to="." method="_on_area_2d_strike_body_exited"] diff --git a/enemy/largeslime_pre-castle.gd b/enemy/largeslime_pre-castle.gd new file mode 100644 index 0000000..a8f83e0 --- /dev/null +++ b/enemy/largeslime_pre-castle.gd @@ -0,0 +1,188 @@ +extends CharacterBody2D + +@onready var player = $"../player" + +const SPEED = 50.0 +var health = 20 +var current_health = health +var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") +var chase = false +var is_striking = false + +@export var knockback_force : float = 500.0 +var knockback_duration : float = 0.2 +var is_knocked_back : bool = false +var knockback_direction : Vector2 + +var invincible = false +var invincibility_duration = 0.7 + +var pace_left = false +var pace_right = true + +const DASH_ATTACK_SPEED = 200 +var dash_chance: int +var can_dash = false +var is_dashing = false +var dash_duration = 2 + +func _physics_process(delta): + # Add the gravity. + if not is_on_floor(): + velocity.y += gravity * delta + + if invincible: + invincibility_duration -= delta + if invincibility_duration <= 0: + invincible = false + + if not invincible and abs(player.position - self.position) < Vector2(50,50) and player.is_striking: + self.health -= 3 + invincibility() + + if health < current_health and health > 0: + get_node("AnimatedSprite2D").play("hurt") + await get_node("AnimatedSprite2D").animation_finished + current_health = health + $LargeSlimeBar.value=current_health + + if is_knocked_back: + velocity = knockback_direction.normalized() * knockback_force + knockback_duration -= delta + if knockback_duration <= 0: + is_knocked_back = false + velocity = Vector2.ZERO + + if health <= 0: + Global.enemy_respawn = false + Global.enemy_health = 0 + is_striking = false + chase = false + var player_health = player.health + $LargeSlimeBar.value=0 + get_node("AnimatedSprite2D").play("death") + await get_node("AnimatedSprite2D").animation_finished + self.queue_free() + Global.num_enemies -= 1 + if Global.num_enemies > 0: + Global.kill_all_enemies = true + player.is_knocked_back = false + player.health = player_health + level_end_scene() + + if chase: + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "attack_heavy" and \ + get_node("AnimatedSprite2D").animation != "attack_dash" and \ + get_node("AnimatedSprite2D").animation != "hurt": + get_node("AnimatedSprite2D").play("walk") + var direction = (player.position - self.position).normalized() + if direction.x > 0: + get_node("AnimatedSprite2D").flip_h = true + Global.enemy_direction_left = true + if direction.x < 0: + get_node("AnimatedSprite2D").flip_h = false + Global.enemy_direction_left = false + if dash_chance == 2 and can_dash and dash_duration > 0: + dash_duration -= delta + is_dashing = true + get_node("AnimatedSprite2D").play("attack_dash") + velocity.x = direction.x * DASH_ATTACK_SPEED + else: + velocity.x = direction.x * SPEED + get_node("AnimatedSprite2D").play("walk") + elif pace_left: + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "attack_heavy" and \ + get_node("AnimatedSprite2D").animation != "attack_dash" and \ + get_node("AnimatedSprite2D").animation != "hurt": + get_node("AnimatedSprite2D").play("walk") + get_node("AnimatedSprite2D").flip_h = false + Global.enemy_direction_left = false + velocity.x = -SPEED + elif pace_right: + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "attack_heavy" and \ + get_node("AnimatedSprite2D").animation != "attack_dash" and \ + get_node("AnimatedSprite2D").animation != "hurt": + get_node("AnimatedSprite2D").play("walk") + get_node("AnimatedSprite2D").flip_h = true + Global.enemy_direction_left = true + velocity.x = SPEED + + move_and_slide() + + if health > 0: + Global.enemy_health = self.health + $LargeSlimeBar.value=current_health + +func _on_area_2d_player_detection_body_entered(body): + if body.name == "player": + chase = true + pace_left = false + pace_right = false + can_dash = true + dash_duration = 2 + dash_chance = randi_range(1, 2) + get_node("AnimatedSprite2D").play("walk") + +func _on_area_2d_player_detection_body_exited(body): + if body.name == "player": + chase = false + pace_left = true + can_dash = false + get_node("AnimatedSprite2D").play("walk") + +func _on_area_2d_strike_body_entered(body): + if body.name == "player" and body.health > 0: + is_striking = true + if is_striking and can_dash and is_dashing: + body.health -= 7 + var direction = (body.position - position).normalized() + body.call("apply_knockback", direction * knockback_force) + can_dash = false + is_dashing = false + if body.health <= 0: + is_striking = false + if is_striking: + can_dash = false + chase = false + while is_striking: + velocity.x = 0 + var light_or_heavy = randi_range(1, 5) + if light_or_heavy == 5: + get_node("AnimatedSprite2D").play("attack_heavy") + await get_node("AnimatedSprite2D").animation_finished + body.health -= 10 + var direction = (body.position - position).normalized() + body.call("apply_knockback", direction * knockback_force) + else: + get_node("AnimatedSprite2D").play("attack_basic") + await get_node("AnimatedSprite2D").animation_finished + body.health -= 5 + var direction = (body.position - position).normalized() + body.call("apply_knockback", direction * knockback_force) + if body.health <= 0: + is_striking = false + +func _on_area_2d_strike_body_exited(body): + if body.name == "player": + is_striking = false + chase = true + can_dash = true + dash_duration = 2 + dash_chance = randi_range(1, 2) + get_node("AnimatedSprite2D").play("walk") + +func apply_knockback(direction: Vector2) -> void: + is_knocked_back = true + knockback_direction = direction + knockback_duration = 0.2 # Reset the duration + +func invincibility() -> void: + invincible = true + invincibility_duration = 0.7 + +func level_end_scene() -> void: + if get_tree() and get_node("AnimatedSprite2D").animation != "death": + get_tree().change_scene_to_file("res://level_end.tscn") diff --git a/enemy/skeleton.tscn b/enemy/skeleton.tscn deleted file mode 100644 index 196cbbc..0000000 --- a/enemy/skeleton.tscn +++ /dev/null @@ -1,391 +0,0 @@ -[gd_scene load_steps=51 format=3 uid="uid://lybotj3vh6v7"] - -[ext_resource type="Texture2D" uid="uid://34v2m3edfkgx" path="res://Skeleton enemy.png" id="1_isreu"] -[ext_resource type="Script" path="res://enemy/skeleton.gd" id="1_v5ttj"] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_qb0lt"] -size = Vector2(42, 0) - -[sub_resource type="AtlasTexture" id="AtlasTexture_4onye"] -atlas = ExtResource("1_isreu") -region = Rect2(0, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_h352y"] -atlas = ExtResource("1_isreu") -region = Rect2(64, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_cf845"] -atlas = ExtResource("1_isreu") -region = Rect2(128, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0svg4"] -atlas = ExtResource("1_isreu") -region = Rect2(192, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_l45aj"] -atlas = ExtResource("1_isreu") -region = Rect2(256, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_p0r3y"] -atlas = ExtResource("1_isreu") -region = Rect2(320, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_7uvwm"] -atlas = ExtResource("1_isreu") -region = Rect2(384, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_sxt33"] -atlas = ExtResource("1_isreu") -region = Rect2(448, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_062qp"] -atlas = ExtResource("1_isreu") -region = Rect2(512, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_x618d"] -atlas = ExtResource("1_isreu") -region = Rect2(576, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_1mc1c"] -atlas = ExtResource("1_isreu") -region = Rect2(640, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_500rm"] -atlas = ExtResource("1_isreu") -region = Rect2(704, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_4c7gc"] -atlas = ExtResource("1_isreu") -region = Rect2(768, 64, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_bhqiu"] -atlas = ExtResource("1_isreu") -region = Rect2(0, 256, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ujwkl"] -atlas = ExtResource("1_isreu") -region = Rect2(64, 256, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_d75mr"] -atlas = ExtResource("1_isreu") -region = Rect2(0, 192, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_nqvlc"] -atlas = ExtResource("1_isreu") -region = Rect2(64, 192, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_id2ct"] -atlas = ExtResource("1_isreu") -region = Rect2(128, 192, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6ks3n"] -atlas = ExtResource("1_isreu") -region = Rect2(192, 192, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_hjcrg"] -atlas = ExtResource("1_isreu") -region = Rect2(0, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_e6o3d"] -atlas = ExtResource("1_isreu") -region = Rect2(64, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_thbqw"] -atlas = ExtResource("1_isreu") -region = Rect2(128, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_h0va8"] -atlas = ExtResource("1_isreu") -region = Rect2(192, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8uiqb"] -atlas = ExtResource("1_isreu") -region = Rect2(256, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_lr7pi"] -atlas = ExtResource("1_isreu") -region = Rect2(320, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_gb1pj"] -atlas = ExtResource("1_isreu") -region = Rect2(384, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kjyl5"] -atlas = ExtResource("1_isreu") -region = Rect2(448, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_qw1go"] -atlas = ExtResource("1_isreu") -region = Rect2(512, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_3ul7n"] -atlas = ExtResource("1_isreu") -region = Rect2(576, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_el6sp"] -atlas = ExtResource("1_isreu") -region = Rect2(640, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_xmp50"] -atlas = ExtResource("1_isreu") -region = Rect2(704, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_5ngb0"] -atlas = ExtResource("1_isreu") -region = Rect2(768, 0, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_qwx1b"] -atlas = ExtResource("1_isreu") -region = Rect2(0, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6jwak"] -atlas = ExtResource("1_isreu") -region = Rect2(64, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6u7y3"] -atlas = ExtResource("1_isreu") -region = Rect2(128, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_naimm"] -atlas = ExtResource("1_isreu") -region = Rect2(192, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_7m7t3"] -atlas = ExtResource("1_isreu") -region = Rect2(256, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_7a5um"] -atlas = ExtResource("1_isreu") -region = Rect2(320, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_hxymt"] -atlas = ExtResource("1_isreu") -region = Rect2(384, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_q3kj0"] -atlas = ExtResource("1_isreu") -region = Rect2(448, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_nlnwb"] -atlas = ExtResource("1_isreu") -region = Rect2(512, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_cf6lv"] -atlas = ExtResource("1_isreu") -region = Rect2(576, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_lpyg6"] -atlas = ExtResource("1_isreu") -region = Rect2(640, 128, 64, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_tpojy"] -atlas = ExtResource("1_isreu") -region = Rect2(704, 128, 64, 64) - -[sub_resource type="SpriteFrames" id="SpriteFrames_o17jh"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_4onye") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_h352y") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_cf845") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0svg4") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_l45aj") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_p0r3y") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_7uvwm") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_sxt33") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_062qp") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_x618d") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_1mc1c") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_500rm") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_4c7gc") -}], -"loop": false, -"name": &"death", -"speed": 5.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_bhqiu") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ujwkl") -}], -"loop": false, -"name": &"hurt", -"speed": 5.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_d75mr") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_nqvlc") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_id2ct") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6ks3n") -}], -"loop": true, -"name": &"idle", -"speed": 5.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_hjcrg") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_e6o3d") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_thbqw") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_h0va8") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_8uiqb") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_lr7pi") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_gb1pj") -}], -"loop": false, -"name": &"strike", -"speed": 20.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_kjyl5") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_qw1go") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_3ul7n") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_el6sp") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_xmp50") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_5ngb0") -}], -"loop": false, -"name": &"strike2", -"speed": 20.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_qwx1b") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6jwak") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6u7y3") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_naimm") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_7m7t3") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_7a5um") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_hxymt") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_q3kj0") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_nlnwb") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_cf6lv") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_lpyg6") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_tpojy") -}], -"loop": true, -"name": &"walk", -"speed": 5.0 -}] - -[sub_resource type="CircleShape2D" id="CircleShape2D_qfdxx"] -radius = 266.002 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_v7847"] -size = Vector2(124, 64) - -[node name="skeleton" type="CharacterBody2D"] -script = ExtResource("1_v5ttj") - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(-5, 32) -shape = SubResource("RectangleShape2D_qb0lt") -metadata/_edit_lock_ = true - -[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] -texture_filter = 1 -position = Vector2(0.499999, 1.07288e-06) -scale = Vector2(2.17188, 2.03125) -sprite_frames = SubResource("SpriteFrames_o17jh") -animation = &"idle" -autoplay = "idle" -metadata/_edit_lock_ = true - -[node name="Area2D (detection)" type="Area2D" parent="."] -visible = false -metadata/_edit_lock_ = true - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D (detection)"] -shape = SubResource("CircleShape2D_qfdxx") -metadata/_edit_lock_ = true - -[node name="Area2D (strike)" type="Area2D" parent="."] -metadata/_edit_lock_ = true - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D (strike)"] -position = Vector2(-1, 0) -shape = SubResource("RectangleShape2D_v7847") - -[connection signal="body_entered" from="Area2D (detection)" to="." method="_on_area_2d_player_detection_body_entered"] -[connection signal="body_exited" from="Area2D (detection)" to="." method="_on_area_2d_player_detection_body_exited"] -[connection signal="body_entered" from="Area2D (strike)" to="." method="_on_area_2d_strike_body_entered"] -[connection signal="body_exited" from="Area2D (strike)" to="." method="_on_area_2d_strike_body_exited"] diff --git a/enemy/smallslime-pre-castle.gd b/enemy/smallslime-pre-castle.gd new file mode 100644 index 0000000..6d40e10 --- /dev/null +++ b/enemy/smallslime-pre-castle.gd @@ -0,0 +1,137 @@ +extends CharacterBody2D + +const SPEED = 50.0 +var health = 20 +var current_health = health +var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") +var chase = false +var is_striking = false + +@export var knockback_force : float = 700.0 +var knockback_duration : float = 0.2 +var is_knocked_back : bool = false +var knockback_direction : Vector2 + +var invincible = false +var invincibility_duration = 0.7 + +var pace_left = false +var pace_right = false + +func _ready(): + if Global.enemy_respawn == false: + self.queue_free() + if Global.enemy_health: + self.health = Global.enemy_health + $SmallSlimeBar.value=self.health + if Global.enemy_direction_left: + $AnimatedSprite2D.flip_h = false + get_node("AnimatedSprite2D").play("idle") + +@onready var player = get_node("../player") + + +func _physics_process(delta): + # Add the gravity. + if not is_on_floor(): + velocity.y += gravity * delta + + if invincible: + invincibility_duration -= delta + if invincibility_duration <= 0: + invincible = false + + if not invincible and abs(player.position - self.position) < Vector2(50,50) and player.is_striking: + self.health -= 5 + invincibility() + + if health < current_health and health > 0: + get_node("AnimatedSprite2D").play("hurt") + await get_node("AnimatedSprite2D").animation_finished + current_health = health + $SmallSlimeBar.value=current_health + + if is_knocked_back: + velocity = knockback_direction.normalized() * knockback_force + knockback_duration -= delta + if knockback_duration <= 0: + is_knocked_back = false + velocity = Vector2.ZERO + + if health <= 0 or Global.kill_all_enemies : + is_striking = false + chase = false + var player_health = player.health + Global.enemy_respawn = false + Global.enemy_health = 0 + $SmallSlimeBar.value=0 + get_node("AnimatedSprite2D").play("death") + await get_node("AnimatedSprite2D").animation_finished + self.queue_free() + Global.num_enemies -= 1 + player.is_knocked_back = false + player.health = player_health + + if chase: + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "hurt": + get_node("AnimatedSprite2D").play("walk") + var direction = (player.position - self.position).normalized() + if direction.x > 0: + get_node("AnimatedSprite2D").flip_h = true + Global.enemy_direction_left = true + if direction.x < 0: + get_node("AnimatedSprite2D").flip_h = false + Global.enemy_direction_left = false + velocity.x = direction.x * SPEED + else: + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "hurt": + get_node("AnimatedSprite2D").play("idle") + velocity.x = 0 + + move_and_slide() + + if health > 0: + Global.enemy_health = self.health + $SmallSlimeBar.value=current_health + +func _on_area_2d_player_detection_body_entered(body): + if body.name == "player": + chase = true + get_node("AnimatedSprite2D").play("walk") + +func _on_area_2d_player_detection_body_exited(body): + if body.name == "player": + chase = false + get_node("AnimatedSprite2D").play("idle") + +func _on_area_2d_strike_body_entered(body): + if body.name == "player": + self.is_striking = true + chase = false + while self.is_striking: + velocity.x = 0 + get_node("AnimatedSprite2D").play("attack_basic") + await get_node("AnimatedSprite2D").animation_finished + if not body.invincible: + body.health -= 5 + var direction = (body.position - position).normalized() + body.call("apply_knockback", direction * knockback_force) + if body.health <= 0: + self.is_striking = false + +func _on_area_2d_strike_body_exited(body): + if body.name == "player": + is_striking = false + chase = true + get_node("AnimatedSprite2D").play("walk") + +func apply_knockback(direction: Vector2) -> void: + is_knocked_back = true + knockback_direction = direction + knockback_duration = 0.2 # Reset the duration + +func invincibility() -> void: + invincible = true + invincibility_duration = 0.7 diff --git a/enemy/skeleton.gd b/enemy/smallslime.gd similarity index 52% rename from enemy/skeleton.gd rename to enemy/smallslime.gd index 5dd940e..f727153 100644 --- a/enemy/skeleton.gd +++ b/enemy/smallslime.gd @@ -7,15 +7,25 @@ var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") var chase = false var is_striking = false +@export var knockback_force : float = 700.0 +var knockback_duration : float = 0.2 +var is_knocked_back : bool = false +var knockback_direction : Vector2 + +var invincible = false +var invincibility_duration = 0.7 + +var pace_left = false +var pace_right = false + func _ready(): if Global.enemy_respawn == false: self.queue_free() - if Global.enemy_position: - self.position = Global.enemy_position if Global.enemy_health: self.health = Global.enemy_health + $SmallSlimeBar.value=self.health if Global.enemy_direction_left: - $AnimatedSprite2D.flip_h = true + $AnimatedSprite2D.flip_h = false get_node("AnimatedSprite2D").play("idle") @onready var player = get_node("../../player/player") @@ -25,40 +35,65 @@ func _physics_process(delta): if not is_on_floor(): velocity.y += gravity * delta + if invincible: + invincibility_duration -= delta + if invincibility_duration <= 0: + invincible = false + + if not invincible and abs(player.position - self.position) < Vector2(50,50) and player.is_striking: + self.health -= 5 + invincibility() + if health < current_health and health > 0: - velocity.x = 0 get_node("AnimatedSprite2D").play("hurt") await get_node("AnimatedSprite2D").animation_finished current_health = health + $SmallSlimeBar.value=current_health + + if is_knocked_back: + velocity = knockback_direction.normalized() * knockback_force + knockback_duration -= delta + if knockback_duration <= 0: + is_knocked_back = false + velocity = Vector2.ZERO - if health <= 0: + if health <= 0 or Global.kill_all_enemies : + is_striking = false + chase = false + var player_health = player.health Global.enemy_respawn = false Global.enemy_health = 0 + $SmallSlimeBar.value=0 get_node("AnimatedSprite2D").play("death") await get_node("AnimatedSprite2D").animation_finished self.queue_free() + Global.num_enemies -= 1 + player.is_knocked_back = false + player.health = player_health if chase: - if get_node("AnimatedSprite2D").animation != "strike" and get_node("AnimatedSprite2D").animation != "strike2" and get_node("AnimatedSprite2D").animation != "hurt": + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "hurt": get_node("AnimatedSprite2D").play("walk") var direction = (player.position - self.position).normalized() if direction.x > 0: - get_node("AnimatedSprite2D").flip_h = false - Global.enemy_direction_left = false - if direction.x < 0: get_node("AnimatedSprite2D").flip_h = true Global.enemy_direction_left = true + if direction.x < 0: + get_node("AnimatedSprite2D").flip_h = false + Global.enemy_direction_left = false velocity.x = direction.x * SPEED else: - if get_node("AnimatedSprite2D").animation != "strike" and get_node("AnimatedSprite2D").animation != "strike2" and get_node("AnimatedSprite2D").animation != "hurt": + if get_node("AnimatedSprite2D").animation != "attack_basic" and \ + get_node("AnimatedSprite2D").animation != "hurt": get_node("AnimatedSprite2D").play("idle") velocity.x = 0 move_and_slide() - Global.enemy_position = self.position if health > 0: Global.enemy_health = self.health + $SmallSlimeBar.value=current_health func _on_area_2d_player_detection_body_entered(body): if body.name == "player": @@ -72,20 +107,30 @@ func _on_area_2d_player_detection_body_exited(body): func _on_area_2d_strike_body_entered(body): if body.name == "player": - is_striking = true + self.is_striking = true chase = false - while is_striking: + while self.is_striking: velocity.x = 0 - get_node("AnimatedSprite2D").play("strike") - await get_node("AnimatedSprite2D").animation_finished - body.health -= 5 - get_node("AnimatedSprite2D").play("strike2") + get_node("AnimatedSprite2D").play("attack_basic") await get_node("AnimatedSprite2D").animation_finished + if not body.invincible: + body.health -= 5 + var direction = (body.position - position).normalized() + body.call("apply_knockback", direction * knockback_force) if body.health <= 0: - is_striking = false + self.is_striking = false func _on_area_2d_strike_body_exited(body): if body.name == "player": is_striking = false chase = true get_node("AnimatedSprite2D").play("walk") + +func apply_knockback(direction: Vector2) -> void: + is_knocked_back = true + knockback_direction = direction + knockback_duration = 0.2 # Reset the duration + +func invincibility() -> void: + invincible = true + invincibility_duration = 0.7 diff --git a/enemy/smallslime.tscn b/enemy/smallslime.tscn new file mode 100644 index 0000000..c5b3d23 --- /dev/null +++ b/enemy/smallslime.tscn @@ -0,0 +1,298 @@ +[gd_scene load_steps=37 format=3 uid="uid://lybotj3vh6v7"] + +[ext_resource type="Script" path="res://enemy/smallslime.gd" id="1_d41hx"] +[ext_resource type="Texture2D" uid="uid://dddn3pqo5ersh" path="res://enemy/SmallSlime.png" id="2_7v1db"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_qb0lt"] +size = Vector2(39, 40) + +[sub_resource type="AtlasTexture" id="AtlasTexture_glkje"] +atlas = ExtResource("2_7v1db") +region = Rect2(0, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fqkch"] +atlas = ExtResource("2_7v1db") +region = Rect2(32, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ifl38"] +atlas = ExtResource("2_7v1db") +region = Rect2(64, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h13hi"] +atlas = ExtResource("2_7v1db") +region = Rect2(96, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gpma1"] +atlas = ExtResource("2_7v1db") +region = Rect2(128, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_d0if6"] +atlas = ExtResource("2_7v1db") +region = Rect2(160, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4vulu"] +atlas = ExtResource("2_7v1db") +region = Rect2(192, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wxn33"] +atlas = ExtResource("2_7v1db") +region = Rect2(224, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mffql"] +atlas = ExtResource("2_7v1db") +region = Rect2(256, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5rgog"] +atlas = ExtResource("2_7v1db") +region = Rect2(288, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6lpeg"] +atlas = ExtResource("2_7v1db") +region = Rect2(320, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_oq8vk"] +atlas = ExtResource("2_7v1db") +region = Rect2(352, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nmytj"] +atlas = ExtResource("2_7v1db") +region = Rect2(0, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_inxur"] +atlas = ExtResource("2_7v1db") +region = Rect2(32, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fw4a8"] +atlas = ExtResource("2_7v1db") +region = Rect2(64, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5mues"] +atlas = ExtResource("2_7v1db") +region = Rect2(96, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gnl6c"] +atlas = ExtResource("2_7v1db") +region = Rect2(128, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gji5a"] +atlas = ExtResource("2_7v1db") +region = Rect2(160, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ig0hk"] +atlas = ExtResource("2_7v1db") +region = Rect2(192, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_toi60"] +atlas = ExtResource("2_7v1db") +region = Rect2(224, 34, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x420b"] +atlas = ExtResource("2_7v1db") +region = Rect2(0, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1bj1s"] +atlas = ExtResource("2_7v1db") +region = Rect2(32, 102, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0jhkq"] +atlas = ExtResource("2_7v1db") +region = Rect2(0, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1hccb"] +atlas = ExtResource("2_7v1db") +region = Rect2(32, 0, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_obb1w"] +atlas = ExtResource("2_7v1db") +region = Rect2(0, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x288u"] +atlas = ExtResource("2_7v1db") +region = Rect2(32, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kf6sh"] +atlas = ExtResource("2_7v1db") +region = Rect2(64, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1krhj"] +atlas = ExtResource("2_7v1db") +region = Rect2(96, 68, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_eow5u"] +atlas = ExtResource("2_7v1db") +region = Rect2(128, 68, 32, 34) + +[sub_resource type="SpriteFrames" id="SpriteFrames_o17jh"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_glkje") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fqkch") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ifl38") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h13hi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gpma1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_d0if6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4vulu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wxn33") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mffql") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5rgog") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6lpeg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_oq8vk") +}], +"loop": false, +"name": &"attack_basic", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_nmytj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_inxur") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fw4a8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5mues") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gnl6c") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gji5a") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ig0hk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_toi60") +}], +"loop": false, +"name": &"death", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_x420b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1bj1s") +}], +"loop": false, +"name": &"hurt", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_0jhkq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1hccb") +}], +"loop": true, +"name": &"idle", +"speed": 1.5 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_obb1w") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_x288u") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kf6sh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1krhj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_eow5u") +}], +"loop": true, +"name": &"walk", +"speed": 5.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_qfdxx"] +radius = 266.002 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_v7847"] +size = Vector2(34, 36) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8v4sy"] +bg_color = Color(0.501961, 0.141176, 0.6, 1) + +[node name="small slime" type="CharacterBody2D"] +collision_layer = 4 +collision_mask = 4 +script = ExtResource("1_d41hx") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0.5, 0) +shape = SubResource("RectangleShape2D_qb0lt") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(0.499999, 1.07288e-06) +scale = Vector2(2.17188, 2.03125) +sprite_frames = SubResource("SpriteFrames_o17jh") +animation = &"attack_basic" +autoplay = "idle" +metadata/_edit_lock_ = true + +[node name="Area2D (detection)" type="Area2D" parent="."] +collision_layer = 7 +collision_mask = 7 +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D (detection)"] +shape = SubResource("CircleShape2D_qfdxx") +metadata/_edit_lock_ = true + +[node name="Area2D (strike)" type="Area2D" parent="."] +collision_layer = 7 +collision_mask = 7 +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D (strike)"] +position = Vector2(-7, 2) +shape = SubResource("RectangleShape2D_v7847") +metadata/_edit_lock_ = true + +[node name="SmallSlimeBar" type="ProgressBar" parent="."] +offset_left = -61.0 +offset_top = -70.0 +offset_right = 62.0 +offset_bottom = -43.0 +theme_override_styles/background = SubResource("StyleBoxFlat_8v4sy") +max_value = 20.0 +value = 20.0 + +[connection signal="body_entered" from="Area2D (detection)" to="." method="_on_area_2d_player_detection_body_entered"] +[connection signal="body_exited" from="Area2D (detection)" to="." method="_on_area_2d_player_detection_body_exited"] +[connection signal="body_entered" from="Area2D (strike)" to="." method="_on_area_2d_strike_body_entered"] +[connection signal="body_exited" from="Area2D (strike)" to="." method="_on_area_2d_strike_body_exited"] diff --git a/global.gd b/global.gd index 0bf1c23..2c85288 100644 --- a/global.gd +++ b/global.gd @@ -3,8 +3,12 @@ extends Node var player_position = Vector2() var player_health: int var player_direction_left: bool +var respawn = true var enemy_position = Vector2() var enemy_health: int var enemy_direction_left: bool var enemy_respawn: bool = true + +var num_enemies: int = 1 +var kill_all_enemies: bool = false diff --git a/intro.tscn b/intro.tscn new file mode 100644 index 0000000..4cdb32a --- /dev/null +++ b/intro.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=4 format=3 uid="uid://3kkx5g2om8ta"] + +[ext_resource type="PackedScene" uid="uid://lybotj3vh6v7" path="res://enemy/smallslime.tscn" id="1_62prp"] +[ext_resource type="PackedScene" uid="uid://d3878vqnvxs82" path="res://player/player.tscn" id="1_tqa8s"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ku54d"] +size = Vector2(2313, 215) + +[node name="Intro" type="Node2D"] + +[node name="floor" type="StaticBody2D" parent="."] +position = Vector2(-25, 2) +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="floor"] +position = Vector2(1155, 1180) +shape = SubResource("RectangleShape2D_ku54d") + +[node name="ColorRect" type="ColorRect" parent="floor"] +offset_left = 29.0 +offset_top = 1091.0 +offset_right = 2336.0 +offset_bottom = 1281.0 + +[node name="player" parent="." instance=ExtResource("1_tqa8s")] + +[node name="skeleton" parent="." instance=ExtResource("1_62prp")] diff --git a/lava zone background.webp b/lava zone background.webp new file mode 100644 index 0000000..143e05c Binary files /dev/null and b/lava zone background.webp differ diff --git a/lava zone background.webp.import b/lava zone background.webp.import new file mode 100644 index 0000000..34aeeed --- /dev/null +++ b/lava zone background.webp.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dm2m3mygb5wsm" +path="res://.godot/imported/lava zone background.webp-b58d527c4e1ded50db0bcaf028309d01.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://lava zone background.webp" +dest_files=["res://.godot/imported/lava zone background.webp-b58d527c4e1ded50db0bcaf028309d01.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/lava.gd b/lava.gd new file mode 100644 index 0000000..3a7da6d --- /dev/null +++ b/lava.gd @@ -0,0 +1,17 @@ +@tool +extends Control + +@export var speed: Vector3 +var off:Vector3 = Vector3.ZERO + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + off += speed*delta + $"TextureRect".texture.noise.offset=off + diff --git a/lava_zone.gd b/lava_zone.gd new file mode 100644 index 0000000..eb52611 --- /dev/null +++ b/lava_zone.gd @@ -0,0 +1,21 @@ +extends Node2D + +@onready var player = $player/player +@onready var large_slime = $large_slime + +func _on_area_2d_body_entered(body): + if body == player: + Global.player_health = 0 + player.health = 0 + +func _on_enemy_walls_body_entered(body): + if body.name == "large_slime": + if body.chase: + body.velocity.x = 0 + elif body.pace_left: + body.pace_right = true + body.pace_left = false + else: + body.pace_right = false + body.pace_left = true + diff --git a/lava_zone.tscn b/lava_zone.tscn new file mode 100644 index 0000000..3b42ba4 --- /dev/null +++ b/lava_zone.tscn @@ -0,0 +1,168 @@ +[gd_scene load_steps=23 format=3 uid="uid://cjwg4vp8v0uoc"] + +[ext_resource type="Script" path="res://lava_zone.gd" id="1_q7ome"] +[ext_resource type="Texture2D" uid="uid://dm2m3mygb5wsm" path="res://lava zone background.webp" id="2_1x0rw"] +[ext_resource type="PackedScene" uid="uid://d3878vqnvxs82" path="res://player/player.tscn" id="2_4yvpt"] +[ext_resource type="PackedScene" uid="uid://lybotj3vh6v7" path="res://enemy/smallslime.tscn" id="4_8f5un"] +[ext_resource type="Script" path="res://player/player_lavazone.gd" id="4_ck0vk"] +[ext_resource type="PackedScene" uid="uid://lr7eoqvmxf7h" path="res://enemy/largeslime.tscn" id="5_wrtx5"] +[ext_resource type="Script" path="res://enemy/largeslime.gd" id="6_utmt3"] +[ext_resource type="Script" path="res://enemy spawner.gd" id="7_ghddh"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ak2ud"] +size = Vector2(828, 93) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_5clcn"] +size = Vector2(630.5, 42.5) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_5p8ap"] +size = Vector2(5, 62) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_t8ne3"] +size = Vector2(10, 60.75) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_e12k0"] +size = Vector2(825, 92) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_h83d5"] +size = Vector2(632, 40) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_srmwd"] +size = Vector2(55, 695) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_stj0s"] +size = Vector2(45.5, 685.5) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_g5gup"] +size = Vector2(411.625, 48.75) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_48uio"] +size = Vector2(415, 45.5) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_vu76q"] +size = Vector2(469.188, 48.1243) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_bosbu"] +size = Vector2(201, 14) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_odaw1"] +size = Vector2(465, 46) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ojljr"] +size = Vector2(764.75, 23) + +[node name="lava zone" type="Node2D"] +script = ExtResource("1_q7ome") + +[node name="Platform-lava-zone" type="Sprite2D" parent="."] +position = Vector2(725.404, 360.46) +scale = Vector2(0.809817, 0.70418) +texture = ExtResource("2_1x0rw") + +[node name="player" type="Node2D" parent="."] + +[node name="player" parent="player" instance=ExtResource("2_4yvpt")] +position = Vector2(1229, 266) +script = ExtResource("4_ck0vk") + +[node name="Panel" type="Panel" parent="."] +visible = false +offset_left = -3.0 +offset_top = 1101.0 +offset_right = 2306.0 +offset_bottom = 1306.0 + +[node name="Area2D" type="Area2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="lava" type="CollisionShape2D" parent="Area2D"] +position = Vector2(411, 673) +shape = SubResource("RectangleShape2D_ak2ud") + +[node name="lava2" type="CollisionShape2D" parent="Area2D"] +position = Vector2(1137.75, 680.75) +shape = SubResource("RectangleShape2D_5clcn") + +[node name="enemy walls" type="Area2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="wall1" type="CollisionShape2D" parent="enemy walls"] +position = Vector2(60, 314) +shape = SubResource("RectangleShape2D_5p8ap") + +[node name="wall2" type="CollisionShape2D" parent="enemy walls"] +position = Vector2(358, 314) +shape = SubResource("RectangleShape2D_t8ne3") + +[node name="StaticBody2D" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="lava" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(412.5, 680) +shape = SubResource("RectangleShape2D_e12k0") + +[node name="lava2" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(1135, 685) +shape = SubResource("RectangleShape2D_h83d5") + +[node name="left wall" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(-31.5, 337.5) +shape = SubResource("RectangleShape2D_srmwd") + +[node name="right wall" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(1474, 343) +shape = SubResource("RectangleShape2D_stj0s") + +[node name="platform" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(203.188, 366.625) +shape = SubResource("RectangleShape2D_g5gup") + +[node name="platform2" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(201.5, 173.25) +shape = SubResource("RectangleShape2D_48uio") + +[node name="platform3" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(230.406, 499) +shape = SubResource("RectangleShape2D_vu76q") + +[node name="platform7" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(251.5, 620) +shape = SubResource("RectangleShape2D_bosbu") + +[node name="platform9" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(1217.5, 315) +shape = SubResource("RectangleShape2D_odaw1") + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"] +polygon = PackedVector2Array(904, 459, 1063, 461, 1065, 481, 1099, 482, 1099, 499, 1129, 499, 1131, 518, 1158, 518, 1159, 532, 1185, 533, 1185, 549, 1212, 550, 1221, 570, 1250, 569, 1253, 591, 1280, 592, 1283, 607, 1311, 606, 1312, 617, 1341, 617, 1339, 634, 1366, 634, 1366, 649, 1391, 649, 1390, 660, 1390, 660, 1366, 659, 1339, 658, 1065, 572, 1015, 501, 904, 501) + +[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="StaticBody2D"] +position = Vector2(0, -1) +polygon = PackedVector2Array(477, 374, 563, 374, 565, 389, 591, 390, 592, 405, 616, 406, 617, 419, 642, 420, 644, 437, 669, 438, 670, 455, 696, 456, 697, 470, 722, 471, 725, 492, 750, 492, 751, 508, 774, 507, 776, 525, 802, 527, 802, 546, 828, 547, 828, 561, 850, 562, 851, 573, 875, 574, 876, 591, 898, 591, 900, 603, 925, 604, 925, 617, 952, 617, 952, 625, 977, 626, 977, 635, 1004, 635, 1004, 644, 1027, 644, 1028, 654, 1053, 654, 1054, 666, 833, 620, 725, 544, 568, 421, 477, 417) + +[node name="StaticBody2D2" type="StaticBody2D" parent="."] +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape2D2" type="CollisionShape2D" parent="StaticBody2D2"] +position = Vector2(344.25, 622) +shape = SubResource("RectangleShape2D_ojljr") + +[node name="CollisionShape2D3" type="CollisionShape2D" parent="StaticBody2D2"] +position = Vector2(1072.62, 684) +shape = SubResource("RectangleShape2D_ojljr") + +[node name="large_slime" parent="." instance=ExtResource("5_wrtx5")] +position = Vector2(131, 311) +script = ExtResource("6_utmt3") +knockback_force = 500.0 + +[node name="enemy spawner" type="Node2D" parent="."] +script = ExtResource("7_ghddh") +enemy_scene = ExtResource("4_8f5un") + +[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] +[connection signal="body_entered" from="enemy walls" to="." method="_on_enemy_walls_body_entered"] diff --git a/level_end.gd b/level_end.gd new file mode 100644 index 0000000..ed41028 --- /dev/null +++ b/level_end.gd @@ -0,0 +1,25 @@ +extends Node2D + + + +func _on_back_to_town_pressed(): + Global.player_position = Vector2(0, 0) + Global.player_health = 100 + Global.player_direction_left = false + Global.respawn = true + + + #Global.enemy_position = Vector2(847, 222) + + Global.enemy_health = 20 + Global.enemy_direction_left = false + Global.enemy_respawn = true + + Global.num_enemies = 1 + Global.kill_all_enemies = false + + get_tree().change_scene_to_file("res://world.tscn") + + +func _on_next_level_pressed(): + get_tree().change_scene_to_file("res://pre-castle.tscn") diff --git a/level_end.tscn b/level_end.tscn new file mode 100644 index 0000000..17c0ac1 --- /dev/null +++ b/level_end.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=2 format=3 uid="uid://dudomhdsu20h8"] + +[ext_resource type="Script" path="res://level_end.gd" id="1_lbs8y"] + +[node name="level_end" type="Node2D"] +script = ExtResource("1_lbs8y") + +[node name="back to town" type="Button" parent="."] +offset_left = 671.0 +offset_top = 220.0 +offset_right = 1510.0 +offset_bottom = 512.0 +theme_override_font_sizes/font_size = 80 +text = "back to town" + +[node name="next level" type="Button" parent="."] +offset_left = 673.0 +offset_top = 678.0 +offset_right = 1531.0 +offset_bottom = 959.0 +theme_override_font_sizes/font_size = 80 +text = "next level" + +[connection signal="pressed" from="back to town" to="." method="_on_back_to_town_pressed"] +[connection signal="pressed" from="next level" to="." method="_on_next_level_pressed"] diff --git a/main.gd b/main.gd index 996b888..7ebddc5 100644 --- a/main.gd +++ b/main.gd @@ -5,3 +5,7 @@ func _on_quit_pressed(): func _on_play_pressed(): get_tree().change_scene_to_file("res://world.tscn") + + +func _on_settings_pressed(): + get_tree().change_scene_to_file("res://settings.tscn") diff --git a/main.tscn b/main.tscn index 09a01c1..17fca5b 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=2 format=3 uid="uid://cafwo2icd161t"] +[gd_scene load_steps=2 format=3 uid="uid://d24rin3xanwvr"] [ext_resource type="Script" path="res://main.gd" id="1_fage4"] @@ -8,20 +8,38 @@ script = ExtResource("1_fage4") [node name="play" type="Button" parent="."] offset_left = 725.0 offset_top = 162.0 -offset_right = 1555.0 -offset_bottom = 501.0 -theme_override_font_sizes/font_size = 80 -text = "play" +offset_right = 1565.0 +offset_bottom = 293.0 +theme_override_font_sizes/font_size = 70 +text = "CONTINUE" [node name="quit" type="Button" parent="."] -offset_left = 730.0 -offset_top = 674.0 -offset_right = 1543.0 -offset_bottom = 1023.0 -theme_override_font_sizes/font_size = 80 -text = "quit" +offset_left = 721.0 +offset_top = 836.0 +offset_right = 1570.0 +offset_bottom = 975.0 +theme_override_font_sizes/font_size = 70 +text = "QUIT +" + +[node name="new_game" type="Button" parent="."] +offset_left = 722.0 +offset_top = 391.0 +offset_right = 1565.0 +offset_bottom = 532.0 +theme_override_font_sizes/font_size = 70 +text = "NEW GAME" + +[node name="Settings" type="Button" parent="."] +offset_left = 724.0 +offset_top = 621.0 +offset_right = 1566.0 +offset_bottom = 751.0 +theme_override_font_sizes/font_size = 70 +text = "SETTINGS" [connection signal="pressed" from="play" to="." method="_on_play_pressed"] [connection signal="pressed" from="play" to="play" method="_on_pressed"] [connection signal="pressed" from="quit" to="." method="_on_quit_pressed"] [connection signal="pressed" from="quit" to="play" method="_on_quit_pressed"] +[connection signal="pressed" from="Settings" to="." method="_on_settings_pressed"] diff --git a/platform-lava-zone.png b/platform-lava-zone.png new file mode 100644 index 0000000..67f5ea7 Binary files /dev/null and b/platform-lava-zone.png differ diff --git a/platform-lava-zone.png.import b/platform-lava-zone.png.import new file mode 100644 index 0000000..32641d1 --- /dev/null +++ b/platform-lava-zone.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbu0nqto3ojru" +path="res://.godot/imported/platform-lava-zone.png-4bbea53d4ea14a7c74a7c12218cd5fcf.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://platform-lava-zone.png" +dest_files=["res://.godot/imported/platform-lava-zone.png-4bbea53d4ea14a7c74a7c12218cd5fcf.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/player/Full Attack.png b/player/Full Attack.png new file mode 100644 index 0000000..449864b Binary files /dev/null and b/player/Full Attack.png differ diff --git a/player/Full Attack.png.import b/player/Full Attack.png.import new file mode 100644 index 0000000..22cfc71 --- /dev/null +++ b/player/Full Attack.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://6ntinfuqmd4k" +path="res://.godot/imported/Full Attack.png-ed0349afb84c273e8a26be111dd5600e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Full Attack.png" +dest_files=["res://.godot/imported/Full Attack.png-ed0349afb84c273e8a26be111dd5600e.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/player/MCSpriteSheet.png b/player/MCSpriteSheet.png new file mode 100644 index 0000000..cd4ed64 Binary files /dev/null and b/player/MCSpriteSheet.png differ diff --git a/player/MCSpriteSheet.png.import b/player/MCSpriteSheet.png.import new file mode 100644 index 0000000..f4c3d01 --- /dev/null +++ b/player/MCSpriteSheet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dna4nel554ucn" +path="res://.godot/imported/MCSpriteSheet.png-43bf85f7a3cab1cd57c5ff09467d9252.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/MCSpriteSheet.png" +dest_files=["res://.godot/imported/MCSpriteSheet.png-43bf85f7a3cab1cd57c5ff09467d9252.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/player/player.gd b/player/player.gd index a3e1e59..55e8b4e 100644 --- a/player/player.gd +++ b/player/player.gd @@ -2,25 +2,30 @@ extends CharacterBody2D var health = 100 var current_health = health -const SPEED = 300.0 +const SPEED = 200 const STRIKE_SPEED = 0.0 const JUMP_VELOCITY = -400.0 - -#@export var JUMP_FORCE: int = -300 +const DASH_SPEED = 600 var JUMP_COUNT = 0 var MAX_JUMP = 2 -@export var DASH_SPEED = 600 var DASHING = false var CAN_DASH = true +var knockback_force : float = 200.0 +var knockback_duration : float = 0.2 +var is_knocked_back : bool = false +var knockback_direction : Vector2 + +var invincible = false +var invincibility_duration = 0.7 + # Get the gravity from the project settings to be synced with RigidBody nodes. var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") - var is_striking = false # Flag to track if strike animation is active @onready var anim = $AnimationPlayer -@onready var skeleton = get_node("../../enemies/skeleton") +@onready var small_slime = $"../../enemies/small slime" func _ready() -> void: if Global.player_position: @@ -35,45 +40,63 @@ func _physics_process(delta): if not is_on_floor(): velocity.y += gravity * delta + if Global.respawn: + anim.play("respawn") + await anim.animation_finished + Global.respawn = false + + if Input.is_action_just_pressed("ui_space") and JUMP_COUNT < MAX_JUMP: + anim.play("jump") + velocity.y = JUMP_VELOCITY + JUMP_COUNT += 1 + if is_on_floor(): JUMP_COUNT = 0 if health <= 0: Global.player_health = 0 + $PlayerBar.value=0 anim.play("death") await anim.animation_finished respawn_scene() - #self.queue_free() + + if invincible: + invincibility_duration -= delta + if invincibility_duration <= 0: + invincible = false if health < current_health and health > 0: - velocity.x = 0 anim.play("hurt") await anim.animation_finished + invincibility() current_health = health + Global.player_health = health + $PlayerBar.value=health + + if is_knocked_back: + velocity = knockback_direction.normalized() * knockback_force + knockback_duration -= delta + if knockback_duration <= 0: + is_knocked_back = false + velocity = Vector2.ZERO if Input.is_action_just_pressed("ui_left_click"): if anim.current_animation != "strike": anim.play("strike") - is_striking = true # Set flag to prevent other animations - var distance = skeleton.position - self.position - if abs(distance.x) <= 30: - skeleton.health -= 5 - if skeleton.health <= 0: - is_striking = false - - # Handle jump. - #if Input.is_action_just_pressed("ui_space"): #and is_on_floor(): - #velocity.y = JUMP_VELOCITY - #anim.play("jump") + self.is_striking = true # Set flag to prevent other animations + if Global.enemy_health > 0: + var distance = small_slime.position - self.position + if abs(distance.x) <= 50: + var dir = (small_slime.position - self.position).normalized() + small_slime.call("apply_knockback", dir * knockback_force) + else: + self.is_striking = false if Input.is_action_just_pressed("ui_space") and JUMP_COUNT < MAX_JUMP: anim.play('jump') velocity.y = JUMP_VELOCITY JUMP_COUNT += 1 - if velocity.y > 0 and anim.current_animation != "strike" and anim.current_animation != "hurt": - anim.play("fall") - # Get the input direction and handle the movement/deceleration. # As good practice, you should replace UI actions with custom gameplay actions. var direction = Input.get_axis("ui_left", "ui_right") @@ -86,14 +109,15 @@ func _physics_process(delta): Global.player_direction_left = true if direction: - if DASHING and is_on_floor(): + if DASHING: velocity.x = direction * DASH_SPEED elif is_striking and is_on_floor(): velocity.x = direction * STRIKE_SPEED else: velocity.x = direction * SPEED - if velocity.y == 0 and anim.current_animation != "strike" and anim.current_animation != "hurt": + if velocity.y == 0 and anim.current_animation != "strike" and anim.current_animation != "hurt" and anim.current_animation != "dash": anim.play("run") + else: if is_striking and is_on_floor(): velocity.x = move_toward(velocity.x, 0, STRIKE_SPEED) @@ -102,11 +126,11 @@ func _physics_process(delta): if velocity.y == 0 and anim.current_animation != "strike" and anim.current_animation != "hurt": anim.play("idle") - move_and_slide() - Global.player_position = self.position + if health > 0: Global.player_health = health + $PlayerBar.value=health if is_striking and anim.current_animation != "strike": is_striking = false @@ -114,19 +138,29 @@ func _physics_process(delta): if Input.is_action_just_pressed("ui_shift") and CAN_DASH: DASHING = true CAN_DASH = false + anim.play("dash") $dash_duration.start() $dash_again.start() - + move_and_slide() func respawn_scene() -> void: if get_tree() and anim.current_animation != "death": get_tree().change_scene_to_file("res://respawn.tscn") - return - else: - print(":(") func _on_dash_duration_timeout(): DASHING = false - + func _on_dash_again_timeout(): CAN_DASH = true + +func apply_knockback(direction: Vector2) -> void: + is_knocked_back = true + knockback_direction = direction + knockback_duration = 0.2 # Reset the duration + +func invincibility() -> void: + invincible = true + invincibility_duration = 0.7 + +func _on_area_2d_body_entered(_body): + return diff --git a/player/player.tscn b/player/player.tscn index 90fe899..9f9933e 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -1,177 +1,348 @@ -[gd_scene load_steps=49 format=3 uid="uid://d3878vqnvxs82"] +[gd_scene load_steps=90 format=3 uid="uid://d3878vqnvxs82"] [ext_resource type="Script" path="res://player/player.gd" id="1_pnvwa"] -[ext_resource type="Texture2D" uid="uid://geqh1teab7u1" path="res://AnimationSheet_Character.png" id="2_suq8o"] +[ext_resource type="Texture2D" uid="uid://dna4nel554ucn" path="res://player/MCSpriteSheet.png" id="2_woivl"] +[ext_resource type="Texture2D" uid="uid://cr2svmcl6jw8i" path="res://player/spritesheet_no_attack.png" id="3_ne7uq"] +[ext_resource type="Texture2D" uid="uid://6ntinfuqmd4k" path="res://player/Full Attack.png" id="4_s7tn4"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_7lh2s"] -size = Vector2(26, 52) +size = Vector2(38, 43) -[sub_resource type="AtlasTexture" id="AtlasTexture_pu87c"] -atlas = ExtResource("2_suq8o") -region = Rect2(0, 224, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_3alsv"] +atlas = ExtResource("2_woivl") +region = Rect2(0, 0, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_5lm0g"] -atlas = ExtResource("2_suq8o") -region = Rect2(32, 224, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_ukptx"] +atlas = ExtResource("2_woivl") +region = Rect2(32, 0, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_h7v70"] -atlas = ExtResource("2_suq8o") -region = Rect2(64, 224, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_4om23"] +atlas = ExtResource("2_woivl") +region = Rect2(64, 0, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_jr013"] -atlas = ExtResource("2_suq8o") -region = Rect2(96, 224, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_y0mig"] +atlas = ExtResource("2_woivl") +region = Rect2(96, 0, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_dr5mg"] -atlas = ExtResource("2_suq8o") -region = Rect2(128, 224, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_lqofr"] +atlas = ExtResource("2_woivl") +region = Rect2(128, 0, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_venti"] -atlas = ExtResource("2_suq8o") -region = Rect2(160, 224, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_22k6n"] +atlas = ExtResource("2_woivl") +region = Rect2(160, 0, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_hh7yr"] -atlas = ExtResource("2_suq8o") -region = Rect2(192, 224, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_2827l"] +atlas = ExtResource("2_woivl") +region = Rect2(192, 0, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_0uqau"] -atlas = ExtResource("2_suq8o") -region = Rect2(224, 224, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_omo3l"] +atlas = ExtResource("2_woivl") +region = Rect2(0, 32, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_mwaa5"] -atlas = ExtResource("2_suq8o") -region = Rect2(32, 192, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_rmajq"] +atlas = ExtResource("2_woivl") +region = Rect2(32, 32, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_ap3cy"] -atlas = ExtResource("2_suq8o") -region = Rect2(0, 0, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_bs8ic"] +atlas = ExtResource("2_woivl") +region = Rect2(64, 32, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_m0fxr"] -atlas = ExtResource("2_suq8o") -region = Rect2(32, 0, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_oahcu"] +atlas = ExtResource("2_woivl") +region = Rect2(96, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tpmv4"] +atlas = ExtResource("2_woivl") +region = Rect2(128, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p2imy"] +atlas = ExtResource("2_woivl") +region = Rect2(160, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x3bjo"] +atlas = ExtResource("2_woivl") +region = Rect2(192, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bpc5i"] +atlas = ExtResource("2_woivl") +region = Rect2(224, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3agyn"] +atlas = ExtResource("2_woivl") +region = Rect2(256, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_njh8b"] +atlas = ExtResource("2_woivl") +region = Rect2(0, 64, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_n0w8q"] +atlas = ExtResource("2_woivl") +region = Rect2(0, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_m4x6x"] +atlas = ExtResource("2_woivl") +region = Rect2(32, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4yprj"] +atlas = ExtResource("2_woivl") +region = Rect2(64, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g84j5"] +atlas = ExtResource("2_woivl") +region = Rect2(96, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tcpaj"] +atlas = ExtResource("2_woivl") +region = Rect2(128, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jhdx5"] +atlas = ExtResource("3_ne7uq") +region = Rect2(0, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1hb70"] +atlas = ExtResource("3_ne7uq") +region = Rect2(32, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a2r08"] +atlas = ExtResource("3_ne7uq") +region = Rect2(64, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_d5x37"] +atlas = ExtResource("3_ne7uq") +region = Rect2(96, 136, 32, 34) -[sub_resource type="AtlasTexture" id="AtlasTexture_nrubx"] -atlas = ExtResource("2_suq8o") +[sub_resource type="AtlasTexture" id="AtlasTexture_wd1pf"] +atlas = ExtResource("3_ne7uq") +region = Rect2(128, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fqbgy"] +atlas = ExtResource("3_ne7uq") +region = Rect2(160, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_40mkl"] +atlas = ExtResource("3_ne7uq") +region = Rect2(192, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xptc1"] +atlas = ExtResource("3_ne7uq") +region = Rect2(224, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_uf73d"] +atlas = ExtResource("3_ne7uq") +region = Rect2(256, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_o8lhq"] +atlas = ExtResource("3_ne7uq") +region = Rect2(288, 136, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_s4m08"] +atlas = ExtResource("2_woivl") region = Rect2(0, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_fxtr6"] -atlas = ExtResource("2_suq8o") +[sub_resource type="AtlasTexture" id="AtlasTexture_jxbu3"] +atlas = ExtResource("2_woivl") region = Rect2(32, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_vsdrv"] -atlas = ExtResource("2_suq8o") +[sub_resource type="AtlasTexture" id="AtlasTexture_cjtxg"] +atlas = ExtResource("2_woivl") region = Rect2(64, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_mlbs3"] -atlas = ExtResource("2_suq8o") +[sub_resource type="AtlasTexture" id="AtlasTexture_pe3or"] +atlas = ExtResource("2_woivl") region = Rect2(96, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_pih6t"] -atlas = ExtResource("2_suq8o") +[sub_resource type="AtlasTexture" id="AtlasTexture_rr38q"] +atlas = ExtResource("2_woivl") region = Rect2(128, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_xk8p7"] -atlas = ExtResource("2_suq8o") +[sub_resource type="AtlasTexture" id="AtlasTexture_8150r"] +atlas = ExtResource("2_woivl") region = Rect2(160, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_tqssr"] -atlas = ExtResource("2_suq8o") +[sub_resource type="AtlasTexture" id="AtlasTexture_01fik"] +atlas = ExtResource("2_woivl") region = Rect2(192, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_mumjk"] -atlas = ExtResource("2_suq8o") +[sub_resource type="AtlasTexture" id="AtlasTexture_32eh1"] +atlas = ExtResource("2_woivl") region = Rect2(224, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_tl1aq"] -atlas = ExtResource("2_suq8o") -region = Rect2(0, 96, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_pb4ow"] +atlas = ExtResource("2_woivl") +region = Rect2(256, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_hr14g"] -atlas = ExtResource("2_suq8o") -region = Rect2(32, 96, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_xvdce"] +atlas = ExtResource("2_woivl") +region = Rect2(288, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_jropw"] -atlas = ExtResource("2_suq8o") -region = Rect2(64, 96, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_qyu0a"] +atlas = ExtResource("2_woivl") +region = Rect2(320, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_hijt7"] -atlas = ExtResource("2_suq8o") -region = Rect2(96, 96, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_ycvuy"] +atlas = ExtResource("2_woivl") +region = Rect2(352, 160, 32, 32) -[sub_resource type="AtlasTexture" id="AtlasTexture_mjm35"] -atlas = ExtResource("2_suq8o") -region = Rect2(128, 96, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_gwrjt"] +atlas = ExtResource("2_woivl") +region = Rect2(384, 160, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tk8u3"] +atlas = ExtResource("2_woivl") +region = Rect2(416, 160, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_t3ou8"] +atlas = ExtResource("2_woivl") +region = Rect2(448, 160, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6gdtu"] +atlas = ExtResource("2_woivl") +region = Rect2(480, 160, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pmgh3"] +atlas = ExtResource("2_woivl") +region = Rect2(512, 160, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_e7wci"] +atlas = ExtResource("2_woivl") +region = Rect2(544, 160, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hgd0s"] +atlas = ExtResource("2_woivl") +region = Rect2(576, 160, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_md6ua"] +atlas = ExtResource("3_ne7uq") +region = Rect2(0, 204, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tgy3j"] +atlas = ExtResource("3_ne7uq") +region = Rect2(32, 204, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l6qn0"] +atlas = ExtResource("3_ne7uq") +region = Rect2(64, 204, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qnkry"] +atlas = ExtResource("3_ne7uq") +region = Rect2(96, 204, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8md3u"] +atlas = ExtResource("3_ne7uq") +region = Rect2(128, 204, 32, 34) + +[sub_resource type="AtlasTexture" id="AtlasTexture_w2e5x"] +atlas = ExtResource("3_ne7uq") +region = Rect2(160, 204, 32, 34) -[sub_resource type="AtlasTexture" id="AtlasTexture_so401"] -atlas = ExtResource("2_suq8o") -region = Rect2(160, 96, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_sv3jv"] +atlas = ExtResource("3_ne7uq") +region = Rect2(192, 204, 32, 34) -[sub_resource type="AtlasTexture" id="AtlasTexture_lcfgp"] -atlas = ExtResource("2_suq8o") -region = Rect2(192, 96, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_ru0e4"] +atlas = ExtResource("3_ne7uq") +region = Rect2(224, 204, 32, 34) -[sub_resource type="AtlasTexture" id="AtlasTexture_de4my"] -atlas = ExtResource("2_suq8o") -region = Rect2(224, 96, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_xn2rm"] +atlas = ExtResource("3_ne7uq") +region = Rect2(256, 204, 32, 34) -[sub_resource type="AtlasTexture" id="AtlasTexture_rgqku"] -atlas = ExtResource("2_suq8o") -region = Rect2(0, 256, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_m8jff"] +atlas = ExtResource("3_ne7uq") +region = Rect2(288, 204, 32, 34) -[sub_resource type="AtlasTexture" id="AtlasTexture_nsab8"] -atlas = ExtResource("2_suq8o") -region = Rect2(32, 256, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_87v4s"] +atlas = ExtResource("4_s7tn4") +region = Rect2(0, 0, 64, 64) -[sub_resource type="AtlasTexture" id="AtlasTexture_k4x6c"] -atlas = ExtResource("2_suq8o") -region = Rect2(64, 256, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_f0mdo"] +atlas = ExtResource("4_s7tn4") +region = Rect2(64, 0, 64, 64) -[sub_resource type="AtlasTexture" id="AtlasTexture_xf4w2"] -atlas = ExtResource("2_suq8o") -region = Rect2(96, 256, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_d2pkx"] +atlas = ExtResource("4_s7tn4") +region = Rect2(128, 0, 64, 64) -[sub_resource type="AtlasTexture" id="AtlasTexture_tou8q"] -atlas = ExtResource("2_suq8o") -region = Rect2(128, 256, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_riouj"] +atlas = ExtResource("4_s7tn4") +region = Rect2(192, 0, 64, 64) -[sub_resource type="AtlasTexture" id="AtlasTexture_h8yw8"] -atlas = ExtResource("2_suq8o") -region = Rect2(160, 256, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_c6miv"] +atlas = ExtResource("4_s7tn4") +region = Rect2(256, 0, 64, 64) -[sub_resource type="AtlasTexture" id="AtlasTexture_2kn0v"] -atlas = ExtResource("2_suq8o") -region = Rect2(192, 256, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_7vnu5"] +atlas = ExtResource("4_s7tn4") +region = Rect2(320, 0, 64, 64) -[sub_resource type="AtlasTexture" id="AtlasTexture_uvy5h"] -atlas = ExtResource("2_suq8o") -region = Rect2(224, 256, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_ejcha"] +atlas = ExtResource("4_s7tn4") +region = Rect2(384, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j7v33"] +atlas = ExtResource("4_s7tn4") +region = Rect2(448, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ket8k"] +atlas = ExtResource("4_s7tn4") +region = Rect2(512, 0, 64, 64) [sub_resource type="SpriteFrames" id="SpriteFrames_poakt"] animations = [{ "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_pu87c") +"texture": SubResource("AtlasTexture_3alsv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ukptx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4om23") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_5lm0g") +"texture": SubResource("AtlasTexture_y0mig") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_h7v70") +"texture": SubResource("AtlasTexture_lqofr") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_jr013") +"texture": SubResource("AtlasTexture_22k6n") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_dr5mg") +"texture": SubResource("AtlasTexture_2827l") +}], +"loop": true, +"name": &"dash", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_omo3l") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_venti") +"texture": SubResource("AtlasTexture_rmajq") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_hh7yr") +"texture": SubResource("AtlasTexture_bs8ic") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_0uqau") +"texture": SubResource("AtlasTexture_oahcu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tpmv4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_p2imy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_x3bjo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bpc5i") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3agyn") }], "loop": false, "name": &"death", @@ -179,7 +350,7 @@ animations = [{ }, { "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_mwaa5") +"texture": SubResource("AtlasTexture_njh8b") }], "loop": true, "name": &"hurt", @@ -187,10 +358,19 @@ animations = [{ }, { "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_ap3cy") +"texture": SubResource("AtlasTexture_n0w8q") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_m4x6x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4yprj") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_m0fxr") +"texture": SubResource("AtlasTexture_g84j5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tcpaj") }], "loop": true, "name": &"idle", @@ -198,28 +378,34 @@ animations = [{ }, { "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_nrubx") +"texture": SubResource("AtlasTexture_jhdx5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1hb70") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_a2r08") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_fxtr6") +"texture": SubResource("AtlasTexture_d5x37") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_vsdrv") +"texture": SubResource("AtlasTexture_wd1pf") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_mlbs3") +"texture": SubResource("AtlasTexture_fqbgy") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_pih6t") +"texture": SubResource("AtlasTexture_40mkl") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_xk8p7") +"texture": SubResource("AtlasTexture_xptc1") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_tqssr") +"texture": SubResource("AtlasTexture_uf73d") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_mumjk") +"texture": SubResource("AtlasTexture_o8lhq") }], "loop": true, "name": &"jump", @@ -227,28 +413,96 @@ animations = [{ }, { "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_tl1aq") +"texture": SubResource("AtlasTexture_s4m08") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jxbu3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_cjtxg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pe3or") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rr38q") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8150r") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_01fik") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_32eh1") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_hr14g") +"texture": SubResource("AtlasTexture_pb4ow") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_jropw") +"texture": SubResource("AtlasTexture_xvdce") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_hijt7") +"texture": SubResource("AtlasTexture_qyu0a") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_mjm35") +"texture": SubResource("AtlasTexture_ycvuy") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_so401") +"texture": SubResource("AtlasTexture_gwrjt") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_lcfgp") +"texture": SubResource("AtlasTexture_tk8u3") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_de4my") +"texture": SubResource("AtlasTexture_t3ou8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6gdtu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pmgh3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_e7wci") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hgd0s") +}], +"loop": true, +"name": &"respawn", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_md6ua") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tgy3j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l6qn0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qnkry") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8md3u") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_w2e5x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_sv3jv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ru0e4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xn2rm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_m8jff") }], "loop": true, "name": &"run", @@ -256,28 +510,31 @@ animations = [{ }, { "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_rgqku") +"texture": SubResource("AtlasTexture_87v4s") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_nsab8") +"texture": SubResource("AtlasTexture_f0mdo") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_k4x6c") +"texture": SubResource("AtlasTexture_d2pkx") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_xf4w2") +"texture": SubResource("AtlasTexture_riouj") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_tou8q") +"texture": SubResource("AtlasTexture_c6miv") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_h8yw8") +"texture": SubResource("AtlasTexture_7vnu5") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_2kn0v") +"texture": SubResource("AtlasTexture_ejcha") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_uvy5h") +"texture": SubResource("AtlasTexture_j7v33") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ket8k") }], "loop": true, "name": &"strike", @@ -289,31 +546,59 @@ length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite2D:animation") +tracks/0/path = NodePath("AnimatedSprite2D:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [&"strike"] +"values": [0] } tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("AnimatedSprite2D:frame") +tracks/1/path = NodePath("AnimatedSprite2D:animation") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [1] +"values": [&"dash"] +} + +[sub_resource type="Animation" id="Animation_by4bc"] +resource_name = "dash" +length = 0.7 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite2D:animation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.8), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [&"dash", &"dash"] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("AnimatedSprite2D:frame") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6] } [sub_resource type="Animation" id="Animation_1vpmm"] resource_name = "death" -length = 0.8 +length = 0.9 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -333,10 +618,10 @@ tracks/1/path = NodePath("AnimatedSprite2D:frame") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { -"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), "update": 1, -"values": [0, 1, 2, 3, 4, 5, 6, 7] +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8] } [sub_resource type="Animation" id="Animation_kn7lb"] @@ -398,7 +683,6 @@ tracks/1/keys = { [sub_resource type="Animation" id="Animation_vokf3"] resource_name = "idle" -length = 0.8 loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false @@ -419,15 +703,14 @@ tracks/1/path = NodePath("AnimatedSprite2D:frame") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { -"times": PackedFloat32Array(0, 0.4), -"transitions": PackedFloat32Array(1, 1), +"times": PackedFloat32Array(0, 0.2, 0.4, 0.6, 0.8), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), "update": 1, -"values": [0, 1] +"values": [0, 1, 2, 3, 4] } [sub_resource type="Animation" id="Animation_0sfag"] resource_name = "jump" -length = 0.4 loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false @@ -448,15 +731,42 @@ tracks/1/path = NodePath("AnimatedSprite2D:frame") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { -"times": PackedFloat32Array(0, 0.1, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1, 1), +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +} + +[sub_resource type="Animation" id="Animation_vvsxr"] +resource_name = "respawn" +length = 0.95 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite2D:animation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), "update": 1, -"values": [0, 1, 2, 3] +"values": [&"respawn"] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("AnimatedSprite2D:frame") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] } [sub_resource type="Animation" id="Animation_geiro"] resource_name = "run" -length = 0.8 loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false @@ -477,10 +787,10 @@ tracks/1/path = NodePath("AnimatedSprite2D:frame") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { -"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), "update": 1, -"values": [0, 1, 2, 3, 4, 5, 6, 7] +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] } [sub_resource type="Animation" id="Animation_fc7ci"] @@ -514,20 +824,30 @@ tracks/1/keys = { [sub_resource type="AnimationLibrary" id="AnimationLibrary_csnao"] _data = { "RESET": SubResource("Animation_pn5qh"), +"dash": SubResource("Animation_by4bc"), "death": SubResource("Animation_1vpmm"), "fall": SubResource("Animation_kn7lb"), "hurt": SubResource("Animation_4wmk8"), "idle": SubResource("Animation_vokf3"), "jump": SubResource("Animation_0sfag"), +"respawn": SubResource("Animation_vvsxr"), "run": SubResource("Animation_geiro"), "strike": SubResource("Animation_fc7ci") } +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a6f86"] +bg_color = Color(0.941176, 0.0352941, 0.129412, 1) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_tnohn"] +size = Vector2(28, 20) + [node name="player" type="CharacterBody2D"] +collision_layer = 2 +collision_mask = 2 script = ExtResource("1_pnvwa") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(0, 4) +position = Vector2(1, 2.5) shape = SubResource("RectangleShape2D_7lh2s") metadata/_edit_lock_ = true @@ -535,12 +855,15 @@ metadata/_edit_lock_ = true texture_filter = 1 scale = Vector2(1.875, 1.84375) sprite_frames = SubResource("SpriteFrames_poakt") -animation = &"strike" -frame = 1 +animation = &"dash" metadata/_edit_lock_ = true [node name="Camera2D" type="Camera2D" parent="."] -zoom = Vector2(1.3, 1.3) +zoom = Vector2(1.5, 1.5) +limit_left = 0 +limit_top = 0 +limit_right = 1450 +limit_bottom = 685 metadata/_edit_lock_ = true [node name="AnimationPlayer" type="AnimationPlayer" parent="."] @@ -555,5 +878,23 @@ wait_time = 0.2 [node name="dash_again" type="Timer" parent="."] wait_time = 0.6 +[node name="PlayerBar" type="ProgressBar" parent="."] +offset_left = -52.0 +offset_top = -61.0 +offset_right = 52.0 +offset_bottom = -34.0 +theme_override_styles/background = SubResource("StyleBoxFlat_a6f86") +value = 100.0 + +[node name="Area2D" type="Area2D" parent="."] +position = Vector2(-4, 4) +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(34, 10) +shape = SubResource("RectangleShape2D_tnohn") + [connection signal="timeout" from="dash_duration" to="." method="_on_dash_duration_timeout"] [connection signal="timeout" from="dash_again" to="." method="_on_dash_again_timeout"] +[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] diff --git a/player/player_lavazone.gd b/player/player_lavazone.gd new file mode 100644 index 0000000..6fd252a --- /dev/null +++ b/player/player_lavazone.gd @@ -0,0 +1,162 @@ +extends CharacterBody2D + +var health = 100 +var current_health = health +const SPEED = 200 +const STRIKE_SPEED = 0.0 +const JUMP_VELOCITY = -400.0 +const DASH_SPEED = 600 +var JUMP_COUNT = 0 +var MAX_JUMP = 2 + +var DASHING = false +var CAN_DASH = true + +var knockback_force : float = 300.0 +var knockback_duration : float = 0.2 +var is_knocked_back : bool = false +var knockback_direction : Vector2 + +var invincible = false +var invincibility_duration = 0.7 + +# Get the gravity from the project settings to be synced with RigidBody nodes. +var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") +var is_striking = false # Flag to track if strike animation is active + +@onready var anim = $AnimationPlayer +@onready var large_slime = $"../../large_slime" + +func _ready() -> void: + if Global.player_position: + self.position = Global.player_position + if Global.player_health: + self.health = Global.player_health + if Global.player_direction_left: + $AnimatedSprite2D.flip_h = true + +func _physics_process(delta): + # Add the gravity. + if not is_on_floor(): + velocity.y += gravity * delta + + if Global.respawn: + anim.play("respawn") + await anim.animation_finished + Global.respawn = false + + if Input.is_action_just_pressed("ui_space") and JUMP_COUNT < MAX_JUMP: + anim.play("jump") + velocity.y = JUMP_VELOCITY + JUMP_COUNT += 1 + + if is_on_floor(): + JUMP_COUNT = 0 + + if health <= 0: + Global.player_health = 0 + $PlayerBar.value=0 + anim.play("death") + await anim.animation_finished + respawn_scene() + + if invincible: + invincibility_duration -= delta + if invincibility_duration <= 0: + invincible = false + + if health < current_health and health > 0: + anim.play("hurt") + await anim.animation_finished + invincibility() + current_health = health + $PlayerBar.value=health + + if is_knocked_back: + velocity = knockback_direction.normalized() * knockback_force + knockback_duration -= delta + if knockback_duration <= 0: + is_knocked_back = false + velocity = Vector2.ZERO + + if Input.is_action_just_pressed("ui_left_click"): + if anim.current_animation != "strike": + anim.play("strike") + is_striking = true # Set flag to prevent other animations + if Global.enemy_health > 0: + var distance = large_slime.position - self.position + if abs(distance.x) <= 50: + var dir = (large_slime.position - position).normalized() + large_slime.call("apply_knockback", dir * knockback_force) + else: + is_striking = false + + if Input.is_action_just_pressed("ui_space") and JUMP_COUNT < MAX_JUMP: + anim.play('jump') + velocity.y = JUMP_VELOCITY + JUMP_COUNT += 1 + + # Get the input direction and handle the movement/deceleration. + # As good practice, you should replace UI actions with custom gameplay actions. + var direction = Input.get_axis("ui_left", "ui_right") + + if direction == 1: + $AnimatedSprite2D.flip_h = false + Global.player_direction_left = false + if direction == -1: + $AnimatedSprite2D.flip_h = true + Global.player_direction_left = true + + if direction: + if DASHING: + velocity.x = direction * DASH_SPEED + elif is_striking and is_on_floor(): + velocity.x = direction * STRIKE_SPEED + else: + velocity.x = direction * SPEED + if velocity.y == 0 and anim.current_animation != "strike" and anim.current_animation != "hurt" and anim.current_animation != "dash": + anim.play("run") + + else: + if is_striking and is_on_floor(): + velocity.x = move_toward(velocity.x, 0, STRIKE_SPEED) + else: + velocity.x = move_toward(velocity.x, 0, SPEED) + if velocity.y == 0 and anim.current_animation != "strike" and anim.current_animation != "hurt": + anim.play("idle") + + Global.player_position = self.position + if health > 0: + Global.player_health = health + $PlayerBar.value=health + + if is_striking and anim.current_animation != "strike": + is_striking = false + + if Input.is_action_just_pressed("ui_shift") and CAN_DASH: + DASHING = true + CAN_DASH = false + anim.play("dash") + $dash_duration.start() + $dash_again.start() + move_and_slide() + +func respawn_scene() -> void: + if get_tree() and anim.current_animation != "death": + get_tree().change_scene_to_file("res://respawn.tscn") + +func _on_dash_duration_timeout(): + DASHING = false + +func _on_dash_again_timeout(): + CAN_DASH = true + +func apply_knockback(direction: Vector2) -> void: + is_knocked_back = true + knockback_direction = direction + knockback_duration = 0.2 # Reset the duration + +func invincibility() -> void: + invincible = true + invincibility_duration = 0.7 + diff --git a/player/player_pre-castle.gd b/player/player_pre-castle.gd new file mode 100644 index 0000000..3c23e35 --- /dev/null +++ b/player/player_pre-castle.gd @@ -0,0 +1,162 @@ +extends CharacterBody2D + +var health = 100 +var current_health = health +const SPEED = 200 +const STRIKE_SPEED = 0.0 +const JUMP_VELOCITY = -400.0 +const DASH_SPEED = 600 +var JUMP_COUNT = 0 +var MAX_JUMP = 2 + +var DASHING = false +var CAN_DASH = true + +var knockback_force : float = 300.0 +var knockback_duration : float = 0.2 +var is_knocked_back : bool = false +var knockback_direction : Vector2 + +var invincible = false +var invincibility_duration = 0.7 + +# Get the gravity from the project settings to be synced with RigidBody nodes. +var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") +var is_striking = false # Flag to track if strike animation is active + +@onready var anim = $AnimationPlayer +@onready var small_slime = $"../small slime" +@onready var large_slime = $"../large slime" + +func _ready() -> void: + if Global.player_position: + self.position = Global.player_position + if Global.player_health: + self.health = Global.player_health + if Global.player_direction_left: + $AnimatedSprite2D.flip_h = true + +func _physics_process(delta): + # Add the gravity. + if not is_on_floor(): + velocity.y += gravity * delta + + if Global.respawn: + anim.play("respawn") + await anim.animation_finished + Global.respawn = false + + if Input.is_action_just_pressed("ui_space") and JUMP_COUNT < MAX_JUMP: + anim.play("jump") + velocity.y = JUMP_VELOCITY + JUMP_COUNT += 1 + + if is_on_floor(): + JUMP_COUNT = 0 + + if health <= 0: + Global.player_health = 0 + $PlayerBar.value=0 + anim.play("death") + await anim.animation_finished + respawn_scene() + + if invincible: + invincibility_duration -= delta + if invincibility_duration <= 0: + invincible = false + + if health < current_health and health > 0: + anim.play("hurt") + await anim.animation_finished + invincibility() + current_health = health + $PlayerBar.value=health + + if is_knocked_back: + velocity = knockback_direction.normalized() * knockback_force + knockback_duration -= delta + if knockback_duration <= 0: + is_knocked_back = false + velocity = Vector2.ZERO + + if Input.is_action_just_pressed("ui_left_click"): + if anim.current_animation != "strike": + anim.play("strike") + is_striking = true # Set flag to prevent other animations + if Global.enemy_health > 0: + var distance = large_slime.position - self.position + if abs(distance.x) <= 50: + var dir = (large_slime.position - position).normalized() + large_slime.call("apply_knockback", dir * knockback_force) + else: + is_striking = false + + if Input.is_action_just_pressed("ui_space") and JUMP_COUNT < MAX_JUMP: + anim.play('jump') + velocity.y = JUMP_VELOCITY + JUMP_COUNT += 1 + + # Get the input direction and handle the movement/deceleration. + # As good practice, you should replace UI actions with custom gameplay actions. + var direction = Input.get_axis("ui_left", "ui_right") + + if direction == 1: + $AnimatedSprite2D.flip_h = false + Global.player_direction_left = false + if direction == -1: + $AnimatedSprite2D.flip_h = true + Global.player_direction_left = true + + if direction: + if DASHING: + velocity.x = direction * DASH_SPEED + elif is_striking and is_on_floor(): + velocity.x = direction * STRIKE_SPEED + else: + velocity.x = direction * SPEED + if velocity.y == 0 and anim.current_animation != "strike" and anim.current_animation != "hurt" and anim.current_animation != "dash": + anim.play("run") + + else: + if is_striking and is_on_floor(): + velocity.x = move_toward(velocity.x, 0, STRIKE_SPEED) + else: + velocity.x = move_toward(velocity.x, 0, SPEED) + if velocity.y == 0 and anim.current_animation != "strike" and anim.current_animation != "hurt": + anim.play("idle") + + Global.player_position = self.position + if health > 0: + Global.player_health = health + $PlayerBar.value=health + + if is_striking and anim.current_animation != "strike": + is_striking = false + + if Input.is_action_just_pressed("ui_shift") and CAN_DASH: + DASHING = true + CAN_DASH = false + anim.play("dash") + $dash_duration.start() + $dash_again.start() + move_and_slide() + +func respawn_scene() -> void: + if get_tree() and anim.current_animation != "death": + get_tree().change_scene_to_file("res://respawn.tscn") + +func _on_dash_duration_timeout(): + DASHING = false + +func _on_dash_again_timeout(): + CAN_DASH = true + +func apply_knockback(direction: Vector2) -> void: + is_knocked_back = true + knockback_direction = direction + knockback_duration = 0.2 # Reset the duration + +func invincibility() -> void: + invincible = true + invincibility_duration = 0.7 diff --git a/player/spritesheet_no_attack.png b/player/spritesheet_no_attack.png new file mode 100644 index 0000000..259c09f Binary files /dev/null and b/player/spritesheet_no_attack.png differ diff --git a/player/spritesheet_no_attack.png.import b/player/spritesheet_no_attack.png.import new file mode 100644 index 0000000..e306ef4 --- /dev/null +++ b/player/spritesheet_no_attack.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cr2svmcl6jw8i" +path="res://.godot/imported/spritesheet_no_attack.png-70f67061f6894e60543be51942c7b9dd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/spritesheet_no_attack.png" +dest_files=["res://.godot/imported/spritesheet_no_attack.png-70f67061f6894e60543be51942c7b9dd.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/pre-castle.gd b/pre-castle.gd new file mode 100644 index 0000000..eb0a78f --- /dev/null +++ b/pre-castle.gd @@ -0,0 +1,9 @@ +extends Node2D + + +# Called when the node enters the scene tree for the first time. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass diff --git a/pre-castle.jpg b/pre-castle.jpg new file mode 100644 index 0000000..7ba69a2 Binary files /dev/null and b/pre-castle.jpg differ diff --git a/pre-castle.jpg.import b/pre-castle.jpg.import new file mode 100644 index 0000000..6500e1c --- /dev/null +++ b/pre-castle.jpg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://h4xh6sfe3ajb" +path="res://.godot/imported/pre-castle.jpg-22eaf288d11291e98dc8b197c5651e8e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pre-castle.jpg" +dest_files=["res://.godot/imported/pre-castle.jpg-22eaf288d11291e98dc8b197c5651e8e.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/pre-castle.tscn b/pre-castle.tscn new file mode 100644 index 0000000..99e2c9d --- /dev/null +++ b/pre-castle.tscn @@ -0,0 +1,361 @@ +[gd_scene load_steps=28 format=3 uid="uid://dku4culf1g32u"] + +[ext_resource type="Script" path="res://lava.gd" id="1_hqslg"] +[ext_resource type="Script" path="res://pre-castle.gd" id="1_qgtqd"] +[ext_resource type="PackedScene" uid="uid://d3878vqnvxs82" path="res://player/player.tscn" id="2_07gme"] +[ext_resource type="Texture2D" uid="uid://h4xh6sfe3ajb" path="res://pre-castle.jpg" id="3_vn0nc"] +[ext_resource type="Script" path="res://player/player_pre-castle.gd" id="4_4sbij"] +[ext_resource type="PackedScene" uid="uid://lybotj3vh6v7" path="res://enemy/smallslime.tscn" id="4_oybbq"] +[ext_resource type="Script" path="res://enemy/smallslime-pre-castle.gd" id="5_nxd5d"] +[ext_resource type="PackedScene" uid="uid://lr7eoqvmxf7h" path="res://enemy/largeslime.tscn" id="7_umj8d"] +[ext_resource type="Script" path="res://enemy/largeslime_pre-castle.gd" id="8_ak8qo"] + +[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_7p7ml"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_romv4"] +size = Vector2(1054, 117) + +[sub_resource type="Gradient" id="Gradient_i4g1m"] +interpolation_mode = 2 +interpolation_color_space = 2 +offsets = PackedFloat32Array(0, 0.97, 1) +colors = PackedColorArray(1, 0.792157, 0.109804, 1, 0.6, 0.054, 0.054, 1, 0.77, 0.77, 0.77, 0.913725) + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_pdoqf"] +frequency = 0.004 +offset = Vector3(0, 1595.86, 319.177) +fractal_type = 3 +fractal_octaves = 2 +fractal_lacunarity = 1.4 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_u83ja"] +in_3d_space = true +color_ramp = SubResource("Gradient_i4g1m") +noise = SubResource("FastNoiseLite_pdoqf") + +[sub_resource type="GDScript" id="GDScript_cqy56"] +script/source = "extends TextureRect + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass +" + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_0cyjy"] +size = Vector2(213, 25.625) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_olbp5"] +size = Vector2(255.75, 26.25) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_arhvb"] +size = Vector2(181, 24) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_rs7gu"] +size = Vector2(118.5, 76) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_gnrcu"] +size = Vector2(390.25, 183.5) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_t4i58"] +size = Vector2(411, 82.5) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_v760m"] +size = Vector2(315, 58) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_bbl7k"] +size = Vector2(149, 40.75) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_wogpj"] +size = Vector2(146, 50) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_fk5gd"] +size = Vector2(111.5, 40) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ip3l7"] +size = Vector2(62.5, 36.5) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_mxbx8"] +size = Vector2(38.245, 52.75) + +[node name="Pre-castle" type="Node2D"] +script = ExtResource("1_qgtqd") + +[node name="floor" type="StaticBody2D" parent="."] +position = Vector2(-208, -524) +collision_layer = 7 +collision_mask = 7 +physics_material_override = SubResource("PhysicsMaterial_7p7ml") +metadata/_edit_group_ = true + +[node name="floor" type="CollisionShape2D" parent="floor"] +position = Vector2(732, 1229.5) +shape = SubResource("RectangleShape2D_romv4") + +[node name="floor2" type="ColorRect" parent="floor"] +offset_left = 208.0 +offset_top = 1177.0 +offset_right = 1260.0 +offset_bottom = 1295.0 +color = Color(0.52, 0.52, 0.52, 1) + +[node name="Lava" type="Control" parent="."] +layout_mode = 3 +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 +script = ExtResource("1_hqslg") +speed = Vector3(0, 50, 10) + +[node name="TextureRect" type="TextureRect" parent="Lava"] +layout_mode = 0 +offset_left = 1.0 +offset_top = 734.0 +offset_right = 2292.0 +offset_bottom = 1246.0 +texture = SubResource("NoiseTexture2D_u83ja") +script = SubResource("GDScript_cqy56") + +[node name="checkpoint" type="StaticBody2D" parent="."] +position = Vector2(-427, -644) +collision_layer = 7 +collision_mask = 7 +metadata/_edit_group_ = true + +[node name="checkpoint" type="CollisionPolygon2D" parent="checkpoint"] +position = Vector2(582.124, 1177.59) +scale = Vector2(7.27604, 6.36669) +polygon = PackedVector2Array(0, -9, -10, 0, -10, 1, -10, 10, -10, 10, 11, 10, 11, 0) + +[node name="Polygon2D" type="Polygon2D" parent="checkpoint"] +position = Vector2(189.976, 636.068) +scale = Vector2(0.631957, 0.517611) +polygon = PackedVector2Array(613, 933, 483, 1049, 482, 1180, 756, 1178, 758, 1049) + +[node name="block1" type="StaticBody2D" parent="."] +position = Vector2(216, 292) +collision_layer = 7 +collision_mask = 7 +metadata/_edit_group_ = true + +[node name="block1" type="CollisionPolygon2D" parent="block1"] +position = Vector2(358, 242) +scale = Vector2(7.9453, 7.97153) +polygon = PackedVector2Array(-10, -10, -5, -10, -5, -5, 0, -5, 0, 0, 5, 0, 5, 5, 10, 5, 10, 9, 2, 9, 2, 4, -1, 4, -1.00689, 8.53035, -9.81713, 8.53035) + +[node name="Polygon2D" type="Polygon2D" parent="block1"] +position = Vector2(-274, 11) +scale = Vector2(0.588202, 0.587885) +polygon = PackedVector2Array(938.452, 253.451, 943.553, 508.602, 1059.16, 508.602, 1058, 445, 1103, 446, 1103, 510, 1225, 510, 1223, 458, 1150, 458, 1148, 390, 1074, 392, 1072, 323, 1001.36, 324.893, 999.656, 255.152) + +[node name="block2" type="StaticBody2D" parent="."] +position = Vector2(-386, -982) +collision_layer = 7 +collision_mask = 7 +metadata/_edit_group_ = true + +[node name="block2" type="CollisionPolygon2D" parent="block2"] +position = Vector2(954, 1145) +scale = Vector2(9.51954, 5.97204) +polygon = PackedVector2Array(-10, 10, -10, 6, -5, 6, -5, 2, 2, 2, 2, -4, 10, -4, 10, 2, 7, 2, 7, 6, 10, 6, 10, 10) + +[node name="Polygon2D" type="Polygon2D" parent="block2"] +position = Vector2(421, 677) +scale = Vector2(0.509391, 0.454675) +polygon = PackedVector2Array(913, 1115, 913, 1166, 1201.69, 1164.29, 1204, 1113, 1165, 1112, 1164, 1055, 1203, 1055, 1203, 975, 1089, 978, 1088, 1052, 980, 1051, 980, 1112) + +[node name="block3" type="StaticBody2D" parent="."] +position = Vector2(-813, -430) +collision_layer = 7 +collision_mask = 7 +metadata/_edit_group_ = true + +[node name="block3" type="CollisionShape2D" parent="block3"] +position = Vector2(1529.5, 838.812) +shape = SubResource("RectangleShape2D_0cyjy") + +[node name="ColorRect" type="ColorRect" parent="block3"] +offset_left = 1422.0 +offset_top = 827.0 +offset_right = 1634.0 +offset_bottom = 855.0 + +[node name="block4" type="StaticBody2D" parent="."] +position = Vector2(-953, -145) +collision_layer = 7 +collision_mask = 7 +metadata/_edit_group_ = true + +[node name="block4" type="CollisionShape2D" parent="block4"] +position = Vector2(1919.12, 459.125) +shape = SubResource("RectangleShape2D_olbp5") + +[node name="ColorRect" type="ColorRect" parent="block4"] +offset_left = 1803.0 +offset_top = 447.0 +offset_right = 2044.0 +offset_bottom = 468.0 + +[node name="block5" type="StaticBody2D" parent="."] +position = Vector2(232, 279) +collision_layer = 7 +collision_mask = 7 +metadata/_edit_group_ = true + +[node name="block5" type="CollisionShape2D" parent="block5"] +position = Vector2(80.5, 70) +shape = SubResource("RectangleShape2D_arhvb") + +[node name="ColorRect" type="ColorRect" parent="block5"] +offset_left = -9.0 +offset_top = 58.0 +offset_right = 169.0 +offset_bottom = 81.0 + +[node name="Sprite2D" type="Sprite2D" parent="."] +show_behind_parent = true +position = Vector2(1706, 368) +scale = Vector2(0.702374, 0.848949) +texture = ExtResource("3_vn0nc") + +[node name="block6" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block6"] +position = Vector2(1186.75, 688) +shape = SubResource("RectangleShape2D_rs7gu") + +[node name="block7" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block7"] +position = Vector2(1434.88, 573.75) +shape = SubResource("RectangleShape2D_gnrcu") + +[node name="block8" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block8"] +position = Vector2(2077.5, 687.25) +shape = SubResource("RectangleShape2D_t4i58") + +[node name="block9" type="StaticBody2D" parent="."] +collision_layer = 7 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="block9"] +position = Vector2(1779.74, 293) +scale = Vector2(14.1508, 4.64773) +polygon = PackedVector2Array(-11.4298, 2.79707, -3.65637, -27.3252, 7.15571, -27.5403, 7.15571, 0, 7.15571, 10.9731, -11.3591, 11.4034) + +[node name="block10" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block10"] +position = Vector2(2044.5, 236) +shape = SubResource("RectangleShape2D_v760m") + +[node name="block11" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block11"] +position = Vector2(2159.5, 393.625) +shape = SubResource("RectangleShape2D_bbl7k") + +[node name="block12" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block12"] +position = Vector2(2131, 525) +shape = SubResource("RectangleShape2D_wogpj") + +[node name="block13" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block13"] +position = Vector2(1579.25, 366) +shape = SubResource("RectangleShape2D_fk5gd") + +[node name="block14" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block14"] +position = Vector2(1178.75, 314.75) +shape = SubResource("RectangleShape2D_ip3l7") + +[node name="block15" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block15"] +position = Vector2(1778.75, 611.75) +shape = SubResource("RectangleShape2D_mxbx8") + +[node name="block16" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block16"] +position = Vector2(1664, 614) +shape = SubResource("RectangleShape2D_mxbx8") + +[node name="player" parent="." instance=ExtResource("2_07gme")] +position = Vector2(48, 27) +script = ExtResource("4_4sbij") + +[node name="block17" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="block17"] +position = Vector2(1554.88, 319.375) +shape = SubResource("RectangleShape2D_mxbx8") + +[node name="small slime" parent="." instance=ExtResource("4_oybbq")] +position = Vector2(1726, 204) +script = ExtResource("5_nxd5d") + +[node name="large slime" parent="." instance=ExtResource("7_umj8d")] +position = Vector2(338, 611) +script = ExtResource("8_ak8qo") +knockback_force = 500.0 + +[node name="small slime2" parent="." instance=ExtResource("4_oybbq")] +position = Vector2(755, 615) +script = ExtResource("5_nxd5d") + +[node name="small slime3" parent="." instance=ExtResource("4_oybbq")] +position = Vector2(2120, 622) +script = ExtResource("5_nxd5d") + +[node name="large slime2" parent="." instance=ExtResource("7_umj8d")] +top_level = true +position = Vector2(1998, 612) +script = ExtResource("8_ak8qo") +knockback_force = 500.0 + +[node name="small slime4" parent="." instance=ExtResource("4_oybbq")] +position = Vector2(2147, 336) +script = ExtResource("5_nxd5d") + +[node name="large slime3" parent="." instance=ExtResource("7_umj8d")] +top_level = true +position = Vector2(1805, 250) +script = ExtResource("8_ak8qo") +knockback_force = 500.0 + +[node name="small slime5" parent="." instance=ExtResource("4_oybbq")] +position = Vector2(947, 278) +script = ExtResource("5_nxd5d") diff --git a/project.godot b/project.godot index 05d29cd..b4b0463 100644 --- a/project.godot +++ b/project.godot @@ -77,6 +77,11 @@ ui_shift={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"echo":false,"script":null) ] } +quit={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null) +] +} [rendering] diff --git a/respawn.gd b/respawn.gd index 2542332..68446b3 100644 --- a/respawn.gd +++ b/respawn.gd @@ -4,11 +4,16 @@ func _on_respawn_pressed(): Global.player_position = Vector2(0, 0) Global.player_health = 100 Global.player_direction_left = false + Global.respawn = true Global.enemy_position = Vector2(847, 222) Global.enemy_health = 20 Global.enemy_direction_left = false Global.enemy_respawn = true + + Global.num_enemies = 1 + Global.kill_all_enemies = false + get_tree().change_scene_to_file("res://world.tscn") func _on_exit_pressed(): diff --git a/respawn.tscn b/respawn.tscn index 94de6d3..eb0c9ed 100644 --- a/respawn.tscn +++ b/respawn.tscn @@ -16,8 +16,8 @@ text = "respawn" [node name="exit" type="Button" parent="."] offset_left = 757.0 offset_top = 646.0 -offset_right = 1549.0 -offset_bottom = 989.0 +offset_right = 1525.0 +offset_bottom = 979.0 theme_override_font_sizes/font_size = 80 text = "exit" diff --git a/settings.gd b/settings.gd new file mode 100644 index 0000000..64d9050 --- /dev/null +++ b/settings.gd @@ -0,0 +1,25 @@ +extends Control + + + + + +func _on_volume_value_changed(value): + AudioServer.set_bus_volume_db(0, value/5) + + +func _on_check_box_toggled(toggled_on): + AudioServer.set_bus_mute(0,toggled_on) + + +func _on_resolutions_item_selected(index): + match index: + 0: + DisplayServer.window_set_size(Vector2i(1920, 1080)) + 1: + DisplayServer.window_set_size(Vector2i(1600, 900)) + 2: + DisplayServer.window_set_size(Vector2i(1280, 720)) + 3: + DisplayServer.window_set_size(Vector2i(2304, 1296)) + diff --git a/settings.tscn b/settings.tscn new file mode 100644 index 0000000..291736a --- /dev/null +++ b/settings.tscn @@ -0,0 +1,56 @@ +[gd_scene load_steps=2 format=3 uid="uid://b8o1xkdyj16tj"] + +[ext_resource type="Script" path="res://settings.gd" id="1_vwvv6"] + +[node name="Settings" 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_vwvv6") + +[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 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +text = "Volume +" + +[node name="Volume" type="HSlider" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +text = "Mute" + +[node name="CheckBox" type="CheckBox" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +text = "Mute" + +[node name="Resolutions" type="OptionButton" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +item_count = 4 +selected = 3 +popup/item_0/text = "1920x1080" +popup/item_0/id = 0 +popup/item_1/text = "1600x900" +popup/item_1/id = 1 +popup/item_2/text = "1280x720" +popup/item_2/id = 2 +popup/item_3/text = "2304x1296" +popup/item_3/id = 3 + +[connection signal="value_changed" from="MarginContainer/VBoxContainer/Volume" to="." method="_on_volume_value_changed"] +[connection signal="toggled" from="MarginContainer/VBoxContainer/CheckBox" to="." method="_on_check_box_toggled"] +[connection signal="item_selected" from="MarginContainer/VBoxContainer/Resolutions" to="." method="_on_resolutions_item_selected"] diff --git a/world.gd b/world.gd index 0a49321..3ee0725 100644 --- a/world.gd +++ b/world.gd @@ -3,10 +3,17 @@ extends Node2D var in_shop_range = false var can_open_shop = false +var in_lava_range = false +var can_teleport_to_lava = false + func _process(_delta): if in_shop_range and can_open_shop: if Input.is_action_just_pressed("ui_right_click"): get_tree().change_scene_to_file("res://shop.tscn") + if in_lava_range and can_teleport_to_lava: + if Input.is_action_just_pressed("ui_right_click"): + Global.player_position = Vector2(1229, 266) + get_tree().change_scene_to_file("res://lava_zone.tscn") func _on_shop_detection_body_entered(body): if body.name == "player": @@ -21,3 +28,18 @@ func _on_shop_panel_mouse_entered(): func _on_shop_panel_mouse_exited(): can_open_shop = false + + +func _on_lava_zone_detection_body_entered(body): + if body.name == "player": + in_lava_range = true + +func _on_lava_zone_detection_body_exited(body): + if body.name == "player": + in_lava_range = false + +func _on_lava_panel_mouse_entered(): + can_teleport_to_lava = true + +func _on_lava_panel_mouse_exited(): + can_teleport_to_lava = false diff --git a/world.tscn b/world.tscn index 27d5d31..1c68e5d 100644 --- a/world.tscn +++ b/world.tscn @@ -1,11 +1,11 @@ -[gd_scene load_steps=9 format=3 uid="uid://dacjdmw5p2jpi"] +[gd_scene load_steps=11 format=3 uid="uid://dacjdmw5p2jpi"] [ext_resource type="Script" path="res://world.gd" id="1_0h435"] [ext_resource type="PackedScene" uid="uid://d3878vqnvxs82" path="res://player/player.tscn" id="1_2f8yc"] -[ext_resource type="PackedScene" uid="uid://lybotj3vh6v7" path="res://enemy/skeleton.tscn" id="2_u36gk"] +[ext_resource type="PackedScene" uid="uid://lybotj3vh6v7" path="res://enemy/smallslime.tscn" id="2_u36gk"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_1qawu"] -size = Vector2(1154, 171) +size = Vector2(1173, 171) [sub_resource type="RectangleShape2D" id="RectangleShape2D_8ese3"] size = Vector2(37, 485.25) @@ -16,6 +16,12 @@ size = Vector2(70, 102) [sub_resource type="RectangleShape2D" id="RectangleShape2D_tgynu"] size = Vector2(131, 102) +[sub_resource type="RectangleShape2D" id="RectangleShape2D_a0875"] +size = Vector2(81, 120) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_2d067"] +size = Vector2(156, 123) + [sub_resource type="GDScript" id="GDScript_5f6qr"] script/source = "extends Label @@ -37,17 +43,19 @@ script = ExtResource("1_0h435") [node name="player" parent="player" instance=ExtResource("1_2f8yc")] top_level = true -position = Vector2(196, 295) +position = Vector2(203, 449) [node name="enemies" type="Node2D" parent="."] -[node name="skeleton" parent="enemies" instance=ExtResource("2_u36gk")] -position = Vector2(847, 222) +[node name="small slime" parent="enemies" instance=ExtResource("2_u36gk")] +position = Vector2(-265, 657) [node name="StaticBody2D" type="StaticBody2D" parent="."] +collision_layer = 7 +collision_mask = 7 [node name="floor" type="CollisionShape2D" parent="StaticBody2D"] -position = Vector2(575, 559.5) +position = Vector2(580.5, 559.5) shape = SubResource("RectangleShape2D_1qawu") [node name="left wall" type="CollisionShape2D" parent="StaticBody2D"] @@ -70,6 +78,8 @@ offset_bottom = 10.0 text = "shop" [node name="shop (detection)" type="Area2D" parent="StaticBody2D/shop"] +collision_layer = 7 +collision_mask = 7 [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D/shop/shop (detection)"] position = Vector2(-1.5, 0) @@ -82,6 +92,34 @@ offset_right = 35.0 offset_bottom = 52.0 mouse_default_cursor_shape = 2 +[node name="lava zone" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(1059, 410) +shape = SubResource("RectangleShape2D_a0875") + +[node name="lava zone label" type="Label" parent="StaticBody2D/lava zone"] +offset_left = -47.0 +offset_top = -23.0 +offset_right = 48.0 +offset_bottom = 39.0 +text = "teleport to +lava zone" +horizontal_alignment = 1 + +[node name="lava zone (detection)" type="Area2D" parent="StaticBody2D/lava zone"] +collision_layer = 7 +collision_mask = 7 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D/lava zone/lava zone (detection)"] +position = Vector2(-2, 1.5) +shape = SubResource("RectangleShape2D_2d067") + +[node name="lava panel" type="Panel" parent="StaticBody2D/lava zone/lava zone (detection)"] +offset_left = -40.0 +offset_top = -59.0 +offset_right = 41.0 +offset_bottom = 63.0 +mouse_default_cursor_shape = 2 + [node name="Panel" type="Panel" parent="."] offset_left = -6.0 offset_top = 471.0 @@ -103,3 +141,7 @@ script = SubResource("GDScript_5f6qr") [connection signal="body_exited" from="StaticBody2D/shop/shop (detection)" to="." method="_on_shop_detection_body_exited"] [connection signal="mouse_entered" from="StaticBody2D/shop/shop (detection)/shop panel" to="." method="_on_shop_panel_mouse_entered"] [connection signal="mouse_exited" from="StaticBody2D/shop/shop (detection)/shop panel" to="." method="_on_shop_panel_mouse_exited"] +[connection signal="body_entered" from="StaticBody2D/lava zone/lava zone (detection)" to="." method="_on_lava_zone_detection_body_entered"] +[connection signal="body_exited" from="StaticBody2D/lava zone/lava zone (detection)" to="." method="_on_lava_zone_detection_body_exited"] +[connection signal="mouse_entered" from="StaticBody2D/lava zone/lava zone (detection)/lava panel" to="." method="_on_lava_panel_mouse_entered"] +[connection signal="mouse_exited" from="StaticBody2D/lava zone/lava zone (detection)/lava panel" to="." method="_on_lava_panel_mouse_exited"]