diff --git a/.godot/editor/Fluid.gdshader-folding-dc92a70f0788a34a736c3e20772ea614.cfg b/.godot/editor/Fluid.gdshader-folding-dc92a70f0788a34a736c3e20772ea614.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/Fluid.gdshader-folding-dc92a70f0788a34a736c3e20772ea614.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/FluidPartical.tres-folding-60b5f26ede1be6b941b7b7bc2e81de72.cfg b/.godot/editor/FluidPartical.tres-folding-60b5f26ede1be6b941b7b7bc2e81de72.cfg new file mode 100644 index 0000000..e162f4e --- /dev/null +++ b/.godot/editor/FluidPartical.tres-folding-60b5f26ede1be6b941b7b7bc2e81de72.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray("Fill", "gradient") diff --git a/.godot/editor/create_recent.Node b/.godot/editor/create_recent.Node index 0da5316..d4af050 100644 --- a/.godot/editor/create_recent.Node +++ b/.godot/editor/create_recent.Node @@ -1,5 +1,12 @@ -RayCast2D -Node2D -CollisionPolygon2D +Fluid2D +AnimatedSprite2D CollisionShape2D StaticBody2D +Node2D +Marker2D +ColorRect +BackBufferCopy +RigidBody2D +MultiMeshInstance2D +RayCast2D +CollisionPolygon2D diff --git a/.godot/editor/create_recent.Resource b/.godot/editor/create_recent.Resource new file mode 100644 index 0000000..4d7305c --- /dev/null +++ b/.godot/editor/create_recent.Resource @@ -0,0 +1 @@ +GradientTexture2D diff --git a/.godot/editor/dropplet.gd-folding-0a4781091562ebf1551ce14961dab75c.cfg b/.godot/editor/dropplet.gd-folding-0a4781091562ebf1551ce14961dab75c.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/dropplet.gd-folding-0a4781091562ebf1551ce14961dab75c.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/dropplet.tscn-editstate-9b241fc7dc2ddef2fc465966ca95ab80.cfg b/.godot/editor/dropplet.tscn-editstate-9b241fc7dc2ddef2fc465966ca95ab80.cfg new file mode 100644 index 0000000..a76802b --- /dev/null +++ b/.godot/editor/dropplet.tscn-editstate-9b241fc7dc2ddef2fc465966ca95ab80.cfg @@ -0,0 +1,192 @@ +[editor_states] + +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(-51.57621, -45.3955), +"primary_grid_step": Vector2i(8, 8), +"show_group_gizmos": true, +"show_guides": true, +"show_helpers": false, +"show_lock_gizmos": true, +"show_origin": true, +"show_position_gizmos": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.2617994, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 7.4002533 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"ChainIK3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"MeshInstance3DCustomAABB": 0, +"NavigationLink3D": 0, +"NavigationObstacle3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Particles3DEmissionShape": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"SpringBoneCollision3D": 0, +"SpringBoneSimulator3D": 0, +"TwoBoneIK3D": 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_rotation": Vector2(-1.0471976, 2.6179938), +"sun_shadow_max_distance": 100.0 +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +Anim={ +"visible": false +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@18065/@Panel@14/@VBoxContainer@15/DockHSplitMain/@VBoxContainer@28/DockVSplitCenter/@VSplitContainer@70/@VBoxContainer@71/@EditorMainScreen@125/MainScreen/@CanvasItemEditor@9318/@VSplitContainer@9101/@HSplitContainer@9103/@HSplitContainer@9105/@Control@9106/@SubViewportContainer@9107/@SubViewport@9108/Dropplet")]) diff --git a/.godot/editor/dropplet.tscn-folding-9b241fc7dc2ddef2fc465966ca95ab80.cfg b/.godot/editor/dropplet.tscn-folding-9b241fc7dc2ddef2fc465966ca95ab80.cfg new file mode 100644 index 0000000..1e90e64 --- /dev/null +++ b/.godot/editor/dropplet.tscn-folding-9b241fc7dc2ddef2fc465966ca95ab80.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("physics_material_override", "Transform", "Solver"), NodePath("CollisionShape2D"), PackedStringArray("Transform", "shape")] +resource_unfolds=["res://Scenes/dropplet.tscn::PhysicsMaterial_l34re", PackedStringArray(), "res://Scenes/dropplet.tscn::CircleShape2D_8btdw", PackedStringArray()] +nodes_folded=[] diff --git a/.godot/editor/editor_layout.cfg b/.godot/editor/editor_layout.cfg index 24169d2..05b403c 100644 --- a/.godot/editor/editor_layout.cfg +++ b/.godot/editor/editor_layout.cfg @@ -11,11 +11,11 @@ dock_hsplit_1=0 dock_hsplit_2=280 dock_hsplit_3=-280 dock_hsplit_4=0 -dock_9_selected_tab_idx=0 dock_3="Scene,Import" dock_4="FileSystem,History" dock_5="Inspector,Signals,Groups" dock_9="Output,Debugger,Audio,Animation,Shader Editor,Search Results,AnimationTree,ResourcePreloader,ShaderFile,SpriteFrames,Theme,Polygon,TileSet,TileMap,Replication,GridMap" +dock_9_selected_tab_idx=0 [docks/FileSystem] @@ -24,8 +24,8 @@ v_split_offset=0 display_mode=0 file_sort=0 file_list_display_mode=1 -selected_paths=PackedStringArray("res://Scenes/player.tscn") -uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://Scripts/", "res://Scenes/") +selected_paths=PackedStringArray("res://") +uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://Scripts/", "res://Scenes/", "res://Matirials/", "res://assets/", "res://assets/graphics/", "res://assets/graphics/player/") [docks/History] @@ -34,14 +34,15 @@ include_global=true [EditorNode] -open_scenes=PackedStringArray("res://Scenes/game.tscn", "res://Scenes/crate.tscn", "res://Scenes/player.tscn") -current_scene="res://Scenes/player.tscn" +open_scenes=PackedStringArray("res://Scenes/game.tscn", "res://Scenes/crate.tscn", "res://Scenes/player.tscn", "res://Scenes/grenade.tscn", "res://Scenes/dropplet.tscn") +current_scene="res://Scenes/game.tscn" bottom_panel_offsets={ "Animation": 0, "Audio": -450, "Debugger": 0, "Output": 0, -"Shader Editor": 0 +"Shader Editor": 0, +"SpriteFrames": 0 } selected_default_debugger_tab_idx=0 selected_main_editor_idx=2 @@ -54,7 +55,7 @@ position=Vector2i(66, 69) [ScriptEditor] -open_scripts=["res://Scripts/crate.gd", "res://Scripts/gameController.gd", "res://Scripts/player.gd", "res://Scripts/SceneManager.gd"] +open_scripts=["res://Scripts/crate.gd", "res://Scripts/dropplet.gd", "res://Scripts/fluid_container.gd", "res://Scripts/gameController.gd", "res://Scripts/grenade.gd", "res://Scripts/player.gd", "res://Scripts/SceneManager.gd"] selected_script="res://Scripts/player.gd" open_help=[] script_split_offset=200 @@ -63,12 +64,12 @@ zoom_factor=1.0 [GameView] -floating_window_rect=Rect2i(411, 189, 1164, 697) +floating_window_rect=Rect2i(411, 218, 1164, 668) floating_window_screen=0 [ShaderEditor] -open_shaders=[] +open_shaders=["res://Scripts/Fluid.gdshader"] split_offset=200 -selected_shader="" +selected_shader="res://Scripts/Fluid.gdshader" text_shader_zoom_factor=1.0 diff --git a/.godot/editor/favorites.Resource b/.godot/editor/favorites.Resource new file mode 100644 index 0000000..e69de29 diff --git a/.godot/editor/filesystem_cache10 b/.godot/editor/filesystem_cache10 index ed714f6..f86fc2b 100644 --- a/.godot/editor/filesystem_cache10 +++ b/.godot/editor/filesystem_cache10 @@ -1,12 +1,63 @@ 63f7b34db8d8cdea90c76aacccf841ec -::res://::1777335491 +::res://::1777942613 icon.svg::CompressedTexture2D::153749619968236763::1776733978::1777328938::1::::<><><>0<>0<>d721750725bbe7b918a3c8a49bb7d057<>res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex:: -::res://Scenes/::1777335314 -crate.tscn::PackedScene::3685778385901542721::1777333190::0::1::::<><><>0<>0<><>::uid://eb5ucqehuof::::res://Scripts/crate.gd -game.tscn::PackedScene::4205340119192705573::1777335314::0::1::::<><><>0<>0<><>::uid://btmoyp0rwqmxe::::res://Scripts/player.gd<>uid://bc25u4w35ibeu::::res://Scripts/gameController.gd<>uid://bsroh4vsjwblh::::res://Scenes/crate.tscn<>uid://b2otvelhtq7en::::res://Scripts/SceneManager.gd<>uid://4hekg0d8n04f::::res://Scripts/trigger.gd -::res://Scripts/::1777335354 +::res://addons/::1777942180 +::res://addons/godot-rapier2d/::1777942182 +circle_mesh.tres::ArrayMesh::7174673425048804142::1777942182::0::1::::<><><>0<>0<><>:: +faucet_2d.gd::GDScript::9216407355742322844::1777942180::0::1::::Faucet2D<>Fluid2D<><>0<>0<><>:: +fluid_2d_circle.gd::GDScript::7694350402687501325::1777942182::0::1::::<>Fluid2D<><>0<>1<><>:: +fluid_2d_rectangle.gd::GDScript::8761051380306542099::1777942180::0::1::::<>Fluid2D<><>0<>1<><>:: +fluid_2d_renderer.gd::GDScript::7070516150211403761::1777942182::0::1::::Fluid2DRenderer<>MultiMeshInstance2D<><>0<>1<><>:: +fluid_2d_shader_renderer.gd::GDScript::1153928655632662277::1777942180::0::1::::Fluid2DShaderRenderer<>CanvasLayer<><>0<>1<><>:: +godot-rapier2d.gdextension::GDExtension::6464857025447911873::1777942180::0::1::::<><><>0<>0<><>:: +logo_square_2d.png::CompressedTexture2D::9002049772566657075::1777942182::1777942182::1::::<><><>0<>0<>b503ebbccf6e6a46955b8200090051e5<>res://.godot/imported/logo_square_2d.png-ee7cb55fd9c4d1815ce7e83cd5401198.ctex:: +plugin.info.cfg::TextFile::-1::1777942182::0::1::::<><><>0<>0<><>:: +Radial2D.svg::CompressedTexture2D::5294797171325615259::1777942182::1777942182::1::::<><><>0<>0<>1bc62197614fc00072e42040575d98c4<>res://.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.ctex:: +THIRDPARTY.txt::TextFile::-1::1777942182::0::1::::<><><>0<>0<><>:: +water_shader.gdshader::Shader::5244640210084459761::1777942180::0::1::::<><><>0<>0<><>:: +water_shader.tres::ShaderMaterial::6495341302912672044::1777942180::0::1::::<><><>0<>0<><>::res://addons/godot-rapier2d/water_shader.gdshader +::res://addons/godot-rapier2d/bin/::1777942182 +::res://addons/godot-rapier2d/bin/libgodot_rapier.ios.arm64.framework/::1777942181 +::res://addons/godot-rapier2d/bin/libgodot_rapier.ios.x86_64.framework/::1777942181 +::res://addons/godot-rapier2d/bin/libgodot_rapier.macos.framework/::1777942181 +::res://addons/godot-rapier2d/bin/libgodot_rapier.macos.framework/_CodeSignature/::1777942181 +::res://addons/godot-rapier2d/bin/libgodot_rapier.macos.framework/Resources/::1777942181 +::res://addons/godot-rapier2d/bin/wasm-nothreads/::1777942182 +::res://addons/godot-rapier2d/custom_nodes/::1777942181 +rapier_animatable_body_2d.gd::GDScript::4254369835340372453::1777942180::0::1::::RapierAnimatableBody2D<>AnimatableBody2D<><>0<>0<><>:: +rapier_area_2d.gd::GDScript::4885387301949914592::1777942180::0::1::::RapierArea2D<>Area2D<><>0<>0<><>:: +rapier_character_body_2d.gd::GDScript::6912453495765292685::1777942180::0::1::::RapierCharacterBody2D<>CharacterBody2D<><>0<>0<><>:: +rapier_damped_spring_joint_2d.gd::GDScript::5853120700233276591::1777942180::0::1::::RapierDampedSpringJoint2D<>DampedSpringJoint2D<><>0<>0<><>:: +rapier_groove_joint_2d.gd::GDScript::2563535862031637009::1777942180::0::1::::RapierGrooveJoint2D<>GrooveJoint2D<><>0<>0<><>:: +rapier_physical_bone_2d.gd::GDScript::6341721350451337327::1777942180::0::1::::RapierPhysicalBone2D<>PhysicalBone2D<><>0<>0<><>:: +rapier_pin_joint_2d.gd::GDScript::3916190429106199850::1777942180::0::1::::RapierPinJoint2D<>PinJoint2D<><>0<>0<><>:: +rapier_rigid_body_2d.gd::GDScript::1431962763040487152::1777942180::0::1::::RapierRigidBody2D<>RigidBody2D<><>0<>0<><>:: +rapier_static_body_2d.gd::GDScript::3827589778013951087::1777942181::0::1::::RapierStaticBody2D<>StaticBody2D<><>0<>0<><>:: +::res://addons/godot-rapier2d/icons/::1777942182 +Fluid2D.svg::CompressedTexture2D::6302457331682152295::1777942182::1777942182::1::::<><><>0<>0<>231d9337dcdbf2f181060f8de7d5904c<>res://.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.ctex:: +StateManager2D.svg::CompressedTexture2D::1277279720193679363::1777942182::1777942182::1::::<><><>0<>0<>92267b7a9348dcef3639d0308e65795b<>res://.godot/imported/StateManager2D.svg-1a4e1b526e80995b692903b1eb5c9c70.ctex:: +::res://assets/::1777939487 +::res://assets/graphics/::1777939495 +::res://assets/graphics/player/::1777940887 +::res://assets/graphics/player/idle/::1777939618 +Player Idle 48x48.png::CompressedTexture2D::1120562523273273602::1777939584::1777939618::1::::<><><>0<>0<>1dc11358f54a695dab93c6526d66354b<>res://.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.ctex:: +::res://assets/graphics/player/Running/::1777940891 +player run 48x48.png::CompressedTexture2D::7155522852733870023::1777940868::1777940891::1::::<><><>0<>0<>9f7a8470fd2c63dde8f34c8bb31e610f<>res://.godot/imported/player run 48x48.png-04a079043a24250d54279fbf1db0711c.ctex:: +::res://Matirials/::1777942550 +FluidPartical.tres::GradientTexture2D::4268421940562196678::1777942550::0::1::::<><><>0<>0<><>:: +::res://Scenes/::1777942579 +crate.tscn::PackedScene::3685778385901542721::1777936334::0::1::::<><><>0<>0<><>::uid://eb5ucqehuof::::res://Scripts/crate.gd +dropplet.tscn::PackedScene::273344889397887302::1777942301::0::1::::<><><>0<>0<><>::uid://w8ctpjxlfoih::::res://Scripts/dropplet.gd +game.tscn::PackedScene::4205340119192705573::1777942579::0::1::::<><><>0<>0<><>::uid://bc25u4w35ibeu::::res://Scripts/gameController.gd<>uid://bsroh4vsjwblh::::res://Scenes/crate.tscn<>uid://b2otvelhtq7en::::res://Scripts/SceneManager.gd<>uid://dmk1mp1hqm62b::::res://Scenes/player.tscn<>uid://4hekg0d8n04f::::res://Scripts/trigger.gd<>uid://ceyxo0mrrrd6d::::res://Scenes/grenade.tscn<>uid://nhqfqpjecvt8::::res://Scripts/fluid_container.gd<>uid://b12wjykuncw11::::res://Matirials/FluidPartical.tres<>uid://d5n7kwhkl4le::::res://Scenes/dropplet.tscn<>uid://bvte4ugmua4n3::::res://Scripts/Fluid.gdshader +grenade.tscn::PackedScene::5104564632401262693::1777935999::0::1::::<><><>0<>0<><>::uid://jrqdl3mm7rly::::res://Scripts/grenade.gd +player.tscn::PackedScene::8023772851970181075::1777941357::0::1::::<><><>0<>0<><>::uid://btmoyp0rwqmxe::::res://Scripts/player.gd<>uid://c87goe3qmmrv0::::res://assets/graphics/player/Running/player run 48x48.png<>uid://p72rbg7thsvi::::res://assets/graphics/player/idle/Player Idle 48x48.png +::res://Scripts/::1777942579 crate.gd::GDScript::8372856115375017::1777330004::0::1::::Crate<>RigidBody2D<><>0<>0<><>:: +dropplet.gd::GDScript::1612435192803830343::1777942032::0::1::::<>RigidBody2D<><>0<>0<><>:: +Fluid.gdshader::Shader::3899905293721039882::1777942550::0::1::::<><><>0<>0<><>:: +fluid_container.gd::GDScript::927886876386663595::1777940623::0::1::::<>Node2D<><>0<>0<><>:: gameController.gd::GDScript::2584395354465320640::1777333585::0::1::::GameController<>Node2D<><>0<>0<><>:: -player.gd::GDScript::3745674970089689346::1777335354::0::1::::Player<>CharacterBody2D<><>0<>0<><>:: -SceneManager.gd::GDScript::4311612102441731429::1777333964::0::1::::SceneManager<>Node2D<><>0<>0<><>:: +grenade.gd::GDScript::667771465401199890::1777938554::0::1::::Grenade<>RigidBody2D<><>0<>0<><>:: +player.gd::GDScript::3745674970089689346::1777942579::0::1::::Player<>CharacterBody2D<><>0<>0<><>:: +SceneManager.gd::GDScript::4311612102441731429::1777939966::0::1::::SceneManager<>Node2D<><>0<>0<><>:: trigger.gd::GDScript::2050188189632629851::1776733978::0::1::::Trigger<>Area2D<><>0<>0<><>:: diff --git a/.godot/editor/filesystem_update4 b/.godot/editor/filesystem_update4 index ffd968e..4213e60 100644 --- a/.godot/editor/filesystem_update4 +++ b/.godot/editor/filesystem_update4 @@ -1,3 +1,3 @@ res://Scenes/game.tscn -res://Scripts/player.gd -res://Scenes/player.tscn +res://Matirials/FluidPartical.tres +res://Scripts/Fluid.gdshader diff --git a/.godot/editor/fluid_container.gd-folding-92a48bb266f417538d05296f1026f01c.cfg b/.godot/editor/fluid_container.gd-folding-92a48bb266f417538d05296f1026f01c.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/fluid_container.gd-folding-92a48bb266f417538d05296f1026f01c.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/game.tscn-editstate-d45e16ca8d170891778b9dcfa9c69e68.cfg b/.godot/editor/game.tscn-editstate-d45e16ca8d170891778b9dcfa9c69e68.cfg index a30e543..19731b5 100644 --- a/.godot/editor/game.tscn-editstate-d45e16ca8d170891778b9dcfa9c69e68.cfg +++ b/.godot/editor/game.tscn-editstate-d45e16ca8d170891778b9dcfa9c69e68.cfg @@ -5,7 +5,7 @@ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-490, -5), +"ofs": Vector2(-610.5001, -38.400017), "primary_grid_step": Vector2i(8, 8), "show_group_gizmos": true, "show_guides": true, @@ -31,7 +31,7 @@ "snap_rotation_step": 0.2617994, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 1.0 +"zoom": 0.9090909 } 3D={ "fov": 70.01, @@ -189,4 +189,4 @@ Anim={ "visible": false } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@18065/@Panel@14/@VBoxContainer@15/DockHSplitMain/@VBoxContainer@28/DockVSplitCenter/@VSplitContainer@70/@VBoxContainer@71/@EditorMainScreen@125/MainScreen/@CanvasItemEditor@9318/@VSplitContainer@9101/@HSplitContainer@9103/@HSplitContainer@9105/@Control@9106/@SubViewportContainer@9107/@SubViewport@9108/Game/Player")]) +selected_nodes=Array[NodePath]([]) diff --git a/.godot/editor/game.tscn-folding-d45e16ca8d170891778b9dcfa9c69e68.cfg b/.godot/editor/game.tscn-folding-d45e16ca8d170891778b9dcfa9c69e68.cfg index 382404e..a7e572d 100644 --- a/.godot/editor/game.tscn-folding-d45e16ca8d170891778b9dcfa9c69e68.cfg +++ b/.godot/editor/game.tscn-folding-d45e16ca8d170891778b9dcfa9c69e68.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("platform"), PackedStringArray("Transform"), NodePath("StaticBody2D"), PackedStringArray("Transform"), NodePath("Area2D"), PackedStringArray("Transform"), NodePath("Area2D/CollisionShape2D"), PackedStringArray("Transform"), NodePath("Crates/Crate"), PackedStringArray("Transform"), NodePath("Crates/Crate2"), PackedStringArray("Transform")] -resource_unfolds=["res://Scenes/game.tscn::RectangleShape2D_2poj3", PackedStringArray("Resource"), "res://Scenes/game.tscn::WorldBoundaryShape2D_2poj3", PackedStringArray("Resource"), "res://Scenes/game.tscn::CircleShape2D_3dryh", PackedStringArray("Resource")] -nodes_folded=[NodePath("StaticBody2D")] +node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("platform"), PackedStringArray("Transform"), NodePath("WorldFloor"), PackedStringArray("Transform"), NodePath("destroyer"), PackedStringArray("Transform"), NodePath("destroyer/CollisionShape2D"), PackedStringArray("Transform"), NodePath("Crates/Crate"), PackedStringArray("Transform"), NodePath("Crates/Crate2"), PackedStringArray("Transform"), NodePath("FluidContainer"), PackedStringArray("Transform"), NodePath("FluidContainer/MultiMeshInstance2D"), PackedStringArray("Material", "material", "multimesh", "texture"), NodePath("BackBufferCopy/ColorRect"), PackedStringArray("Material", "material"), NodePath("Box/StaticBody2D4"), PackedStringArray("Transform"), NodePath("Box/StaticBody2D3"), PackedStringArray("Transform")] +resource_unfolds=["res://Scenes/game.tscn::RectangleShape2D_2poj3", PackedStringArray("Resource"), "res://Scenes/game.tscn::WorldBoundaryShape2D_2poj3", PackedStringArray("Resource"), "res://Scenes/game.tscn::CircleShape2D_3dryh", PackedStringArray("Resource"), "res://Scenes/game.tscn::CanvasItemMaterial_o5yvi", PackedStringArray(), "res://Scenes/game.tscn::MultiMesh_v158k", PackedStringArray("mesh"), "res://Scenes/dropplet.tscn::PhysicsMaterial_l34re", PackedStringArray(), "res://Scenes/game.tscn::ShaderMaterial_o5yvi", PackedStringArray("Shader Parameters"), "res://Scenes/game.tscn::RectangleShape2D_ldgsr", PackedStringArray()] +nodes_folded=[NodePath("WorldFloor"), NodePath("Crates"), NodePath("Box/StaticBody2D")] diff --git a/.godot/editor/grenade.gd-folding-23982449f13ed82cf77ed9006fa16736.cfg b/.godot/editor/grenade.gd-folding-23982449f13ed82cf77ed9006fa16736.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/grenade.gd-folding-23982449f13ed82cf77ed9006fa16736.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/grenade.tscn-editstate-d8eeb790e4a079f4a11c3aee15bad01f.cfg b/.godot/editor/grenade.tscn-editstate-d8eeb790e4a079f4a11c3aee15bad01f.cfg new file mode 100644 index 0000000..b2a8783 --- /dev/null +++ b/.godot/editor/grenade.tscn-editstate-d8eeb790e4a079f4a11c3aee15bad01f.cfg @@ -0,0 +1,192 @@ +[editor_states] + +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(-22.505413, -13.515947), +"primary_grid_step": Vector2i(8, 8), +"show_group_gizmos": true, +"show_guides": true, +"show_helpers": false, +"show_lock_gizmos": true, +"show_origin": true, +"show_position_gizmos": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.2617994, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 14.421002 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"ChainIK3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"MeshInstance3DCustomAABB": 0, +"NavigationLink3D": 0, +"NavigationObstacle3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Particles3DEmissionShape": 0, +"Path3D": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"SpringBoneCollision3D": 0, +"SpringBoneSimulator3D": 0, +"TwoBoneIK3D": 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_rotation": Vector2(-1.0471976, 2.6179938), +"sun_shadow_max_distance": 100.0 +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 22, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"grid": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"transform_gizmo": true, +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +Anim={ +"visible": false +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@18065/@Panel@14/@VBoxContainer@15/DockHSplitMain/@VBoxContainer@28/DockVSplitCenter/@VSplitContainer@70/@VBoxContainer@71/@EditorMainScreen@125/MainScreen/@CanvasItemEditor@9318/@VSplitContainer@9101/@HSplitContainer@9103/@HSplitContainer@9105/@Control@9106/@SubViewportContainer@9107/@SubViewport@9108/Grenade")]) diff --git a/.godot/editor/grenade.tscn-folding-d8eeb790e4a079f4a11c3aee15bad01f.cfg b/.godot/editor/grenade.tscn-folding-d8eeb790e4a079f4a11c3aee15bad01f.cfg new file mode 100644 index 0000000..e180c77 --- /dev/null +++ b/.godot/editor/grenade.tscn-folding-d8eeb790e4a079f4a11c3aee15bad01f.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Solver"), NodePath("CollisionShape2D"), PackedStringArray("shape")] +resource_unfolds=["res://Scenes/grenade.tscn::CircleShape2D_b5j7x", PackedStringArray()] +nodes_folded=[] diff --git a/.godot/editor/player.tscn-editstate-1753c997600d68ab5d20ae99fddb15c6.cfg b/.godot/editor/player.tscn-editstate-1753c997600d68ab5d20ae99fddb15c6.cfg index a87ca35..b35f055 100644 --- a/.godot/editor/player.tscn-editstate-1753c997600d68ab5d20ae99fddb15c6.cfg +++ b/.godot/editor/player.tscn-editstate-1753c997600d68ab5d20ae99fddb15c6.cfg @@ -189,4 +189,4 @@ Anim={ "visible": false } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@18065/@Panel@14/@VBoxContainer@15/DockHSplitMain/@VBoxContainer@28/DockVSplitCenter/@VSplitContainer@70/@VBoxContainer@71/@EditorMainScreen@125/MainScreen/@CanvasItemEditor@9318/@VSplitContainer@9101/@HSplitContainer@9103/@HSplitContainer@9105/@Control@9106/@SubViewportContainer@9107/@SubViewport@9108/Player/RightCast")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@18065/@Panel@14/@VBoxContainer@15/DockHSplitMain/@VBoxContainer@28/DockVSplitCenter/@VSplitContainer@70/@VBoxContainer@71/@EditorMainScreen@125/MainScreen/@CanvasItemEditor@9318/@VSplitContainer@9101/@HSplitContainer@9103/@HSplitContainer@9105/@Control@9106/@SubViewportContainer@9107/@SubViewport@9108/Player/PlayerGraphic")]) diff --git a/.godot/editor/player.tscn-folding-1753c997600d68ab5d20ae99fddb15c6.cfg b/.godot/editor/player.tscn-folding-1753c997600d68ab5d20ae99fddb15c6.cfg index f773c5e..0dff476 100644 --- a/.godot/editor/player.tscn-folding-1753c997600d68ab5d20ae99fddb15c6.cfg +++ b/.godot/editor/player.tscn-folding-1753c997600d68ab5d20ae99fddb15c6.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[] -resource_unfolds=["res://Scenes/player.tscn::CircleShape2D_2poj3", PackedStringArray()] +node_unfolds=[NodePath("."), PackedStringArray("Texture")] +resource_unfolds=["res://Scenes/player.tscn::CircleShape2D_2poj3", PackedStringArray(), "res://Scenes/player.tscn::SpriteFrames_ukyrk", PackedStringArray()] nodes_folded=[] diff --git a/.godot/editor/project_metadata.cfg b/.godot/editor/project_metadata.cfg index 8147fbd..0f686e7 100644 --- a/.godot/editor/project_metadata.cfg +++ b/.godot/editor/project_metadata.cfg @@ -5,15 +5,16 @@ select_mode=0 [editor_metadata] executable_path="/home/timiki/Documents/Software/godot/Godot_v4.6.1-stable_linux.x86_64" +use_advanced_connections=false [recent_files] -scenes=["res://Scenes/player.tscn", "res://Scenes/crate.tscn", "res://Scenes/game.tscn"] -scripts=["res://Scripts/gameController.gd", "Node", "res://Scripts/SceneManager.gd", "res://Scripts/crate.gd", "res://Scripts/player.gd"] +scenes=["res://Scenes/dropplet.tscn", "res://Scenes/grenade.tscn", "res://Scenes/player.tscn", "res://Scenes/crate.tscn", "res://Scenes/game.tscn"] +scripts=["res://Scripts/gameController.gd", "res://Scripts/dropplet.gd", "res://Scripts/fluid_container.gd", "res://Scripts/grenade.gd", "res://Scripts/player.gd", "Node", "res://Scripts/SceneManager.gd", "res://Scripts/crate.gd"] [debug_options] -run_debug_collisions=true +run_debug_collisions=false run_debug_paths=true run_debug_navigation=true run_debug_avoidance=true @@ -25,9 +26,24 @@ create_built_in_script=false [dialog_bounds] -create_new_node=Rect2(510, 190, 900, 700) +create_new_node=Rect2(1020, 246, 900, 700) project_settings=Rect2(360, 190, 1200, 700) [project_settings] -show_builtin_actions=true +show_builtin_actions=false + +[quick_open_dialog] + +last_mode=1 + +[color_picker] + +recent_presets=PackedColorArray(0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0.6762856, 0.5062908, 0, 0.41960785, 0, 0.6, 0.69803923, 1, 0.81547993, 0.40661094, 1.1551381e-06, 1, 0, 0, 0, 1) +picker_shape=3 + +[shader_setup] + +last_selected_mode=1 +last_selected_language="Shader" +create_built_in_shader=false diff --git a/.godot/editor/recent_dirs b/.godot/editor/recent_dirs index 676394e..8dc9934 100644 --- a/.godot/editor/recent_dirs +++ b/.godot/editor/recent_dirs @@ -1 +1,4 @@ +res://assets/graphics/player/Running/ +res://assets/graphics/player/idle/ res://Scenes/ +res://Matirials/ diff --git a/.godot/editor/script_editor_cache.cfg b/.godot/editor/script_editor_cache.cfg index cc8f445..c4a4325 100644 --- a/.godot/editor/script_editor_cache.cfg +++ b/.godot/editor/script_editor_cache.cfg @@ -3,10 +3,10 @@ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 26, +"column": 0, "folded_lines": PackedInt32Array(), "h_scroll_position": 0, -"row": 6, +"row": 12, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" @@ -17,11 +17,11 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 4, +"column": 28, "folded_lines": PackedInt32Array(), "h_scroll_position": 0, -"row": 66, -"scroll_position": 49.0, +"row": 95, +"scroll_position": 63.0, "selection": false, "syntax_highlighter": "GDScript" } @@ -45,10 +45,52 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 25, +"column": 21, "folded_lines": PackedInt32Array(), "h_scroll_position": 0, -"row": 9, +"row": 40, +"scroll_position": 21.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://Scripts/grenade.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 18, +"folded_lines": PackedInt32Array(), +"h_scroll_position": 0, +"row": 0, +"scroll_position": 0.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://Scripts/fluid_container.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 35, +"folded_lines": PackedInt32Array(), +"h_scroll_position": 0, +"row": 2, +"scroll_position": 22.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://Scripts/dropplet.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 21, +"folded_lines": PackedInt32Array(), +"h_scroll_position": 0, +"row": 13, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" diff --git a/.godot/global_script_class_cache.cfg b/.godot/global_script_class_cache.cfg index 83c841a..38a73d6 100644 --- a/.godot/global_script_class_cache.cfg +++ b/.godot/global_script_class_cache.cfg @@ -15,6 +15,14 @@ list=[{ "language": &"GDScript", "path": "res://Scripts/gameController.gd" }, { +"base": &"RigidBody2D", +"class": &"Grenade", +"icon": "", +"is_abstract": false, +"is_tool": false, +"language": &"GDScript", +"path": "res://Scripts/grenade.gd" +}, { "base": &"CharacterBody2D", "class": &"Player", "icon": "", diff --git a/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.ctex b/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.ctex new file mode 100644 index 0000000..5d77fb9 Binary files /dev/null and b/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.ctex differ diff --git a/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.editor.ctex b/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.editor.ctex new file mode 100644 index 0000000..5d77fb9 Binary files /dev/null and b/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.editor.ctex differ diff --git a/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.editor.meta b/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.editor.meta new file mode 100644 index 0000000..bd63042 Binary files /dev/null and b/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.editor.meta differ diff --git a/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.md5 b/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.md5 new file mode 100644 index 0000000..0f81594 --- /dev/null +++ b/.godot/imported/Fluid2D.svg-af3237d9aa7357bf47435150f6228e4b.md5 @@ -0,0 +1,3 @@ +source_md5="5ecb99db3fde32f6c8b5ca6cdfb7aadb" +dest_md5="1ae7b09d00bd6912473b9fcbb1c3e5c4" + diff --git a/.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.ctex b/.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.ctex new file mode 100644 index 0000000..1dc2a59 Binary files /dev/null and b/.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.ctex differ diff --git a/.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.md5 b/.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.md5 new file mode 100644 index 0000000..ef55599 --- /dev/null +++ b/.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.md5 @@ -0,0 +1,3 @@ +source_md5="25eca82a8943e0cb7df742fc2f8287eb" +dest_md5="b2f5daa7ae142788184602c73449164d" + diff --git a/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.ctex b/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.ctex new file mode 100644 index 0000000..f7ac24b Binary files /dev/null and b/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.ctex differ diff --git a/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.editor.ctex b/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.editor.ctex new file mode 100644 index 0000000..f7ac24b Binary files /dev/null and b/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.editor.ctex differ diff --git a/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.editor.meta b/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.editor.meta new file mode 100644 index 0000000..bd63042 Binary files /dev/null and b/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.editor.meta differ diff --git a/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.md5 b/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.md5 new file mode 100644 index 0000000..b95de39 --- /dev/null +++ b/.godot/imported/Radial2D.svg-4380d9841bddc115105cff2016be7c6a.md5 @@ -0,0 +1,3 @@ +source_md5="06ef3eddeb403a2f01260f38881786d9" +dest_md5="a8aa1f3c6e65d7e6b1bff3c5abcb77df" + diff --git a/.godot/imported/StateManager2D.svg-1a4e1b526e80995b692903b1eb5c9c70.ctex b/.godot/imported/StateManager2D.svg-1a4e1b526e80995b692903b1eb5c9c70.ctex new file mode 100644 index 0000000..a6b003a Binary files /dev/null and b/.godot/imported/StateManager2D.svg-1a4e1b526e80995b692903b1eb5c9c70.ctex differ diff --git a/.godot/imported/StateManager2D.svg-1a4e1b526e80995b692903b1eb5c9c70.md5 b/.godot/imported/StateManager2D.svg-1a4e1b526e80995b692903b1eb5c9c70.md5 new file mode 100644 index 0000000..e9e260b --- /dev/null +++ b/.godot/imported/StateManager2D.svg-1a4e1b526e80995b692903b1eb5c9c70.md5 @@ -0,0 +1,3 @@ +source_md5="844deb978e35107f22a408b50710ad0e" +dest_md5="624f77274c24c6098b031ee4b597bcee" + diff --git a/.godot/imported/logo_square_2d.png-ee7cb55fd9c4d1815ce7e83cd5401198.ctex b/.godot/imported/logo_square_2d.png-ee7cb55fd9c4d1815ce7e83cd5401198.ctex new file mode 100644 index 0000000..f754ddc Binary files /dev/null and b/.godot/imported/logo_square_2d.png-ee7cb55fd9c4d1815ce7e83cd5401198.ctex differ diff --git a/.godot/imported/logo_square_2d.png-ee7cb55fd9c4d1815ce7e83cd5401198.md5 b/.godot/imported/logo_square_2d.png-ee7cb55fd9c4d1815ce7e83cd5401198.md5 new file mode 100644 index 0000000..e64cf2f --- /dev/null +++ b/.godot/imported/logo_square_2d.png-ee7cb55fd9c4d1815ce7e83cd5401198.md5 @@ -0,0 +1,3 @@ +source_md5="1df494471903e4ff4cab004363729330" +dest_md5="17211200ca8c536be21c0acd4def220d" + diff --git a/.godot/imported/player run 48x48.png-04a079043a24250d54279fbf1db0711c.ctex b/.godot/imported/player run 48x48.png-04a079043a24250d54279fbf1db0711c.ctex new file mode 100644 index 0000000..44ff487 Binary files /dev/null and b/.godot/imported/player run 48x48.png-04a079043a24250d54279fbf1db0711c.ctex differ diff --git a/.godot/imported/player run 48x48.png-04a079043a24250d54279fbf1db0711c.md5 b/.godot/imported/player run 48x48.png-04a079043a24250d54279fbf1db0711c.md5 new file mode 100644 index 0000000..229e9a3 --- /dev/null +++ b/.godot/imported/player run 48x48.png-04a079043a24250d54279fbf1db0711c.md5 @@ -0,0 +1,3 @@ +source_md5="01ad20affe3a719d2248d3eb59a0b3dd" +dest_md5="9778688d727590cab1181e629a4c029e" + diff --git a/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/0709c9e723b54b6fae003e310047d3ca9560179d.vulkan.cache b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/0709c9e723b54b6fae003e310047d3ca9560179d.vulkan.cache new file mode 100644 index 0000000..cb4d7a1 Binary files /dev/null and b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/0709c9e723b54b6fae003e310047d3ca9560179d.vulkan.cache differ diff --git a/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/0eb2c406eabe3b9ef4f7c33c7e31698f752524e8.vulkan.cache b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/0eb2c406eabe3b9ef4f7c33c7e31698f752524e8.vulkan.cache new file mode 100644 index 0000000..00ad27c Binary files /dev/null and b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/0eb2c406eabe3b9ef4f7c33c7e31698f752524e8.vulkan.cache differ diff --git a/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/13678769cd7dc199518d76e2be3f064bd14f4e85.vulkan.cache b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/13678769cd7dc199518d76e2be3f064bd14f4e85.vulkan.cache new file mode 100644 index 0000000..1f92310 Binary files /dev/null and b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/13678769cd7dc199518d76e2be3f064bd14f4e85.vulkan.cache differ diff --git a/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/27090bcd8ab60c596b0565d5172c6bed97e9bf20.vulkan.cache b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/27090bcd8ab60c596b0565d5172c6bed97e9bf20.vulkan.cache new file mode 100644 index 0000000..d312ad3 Binary files /dev/null and b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/27090bcd8ab60c596b0565d5172c6bed97e9bf20.vulkan.cache differ diff --git a/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/69f45d4af6ba607ae69aa562463f2571dddf50db.vulkan.cache b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/69f45d4af6ba607ae69aa562463f2571dddf50db.vulkan.cache new file mode 100644 index 0000000..8ad3e50 Binary files /dev/null and b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/69f45d4af6ba607ae69aa562463f2571dddf50db.vulkan.cache differ diff --git a/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/b1d8c83e2c0b777678003270a03202afe10232f6.vulkan.cache b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/b1d8c83e2c0b777678003270a03202afe10232f6.vulkan.cache new file mode 100644 index 0000000..14c1616 Binary files /dev/null and b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/b1d8c83e2c0b777678003270a03202afe10232f6.vulkan.cache differ diff --git a/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/d0ae206db473a0d07d5305ab21d342ff0da8fbb2.vulkan.cache b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/d0ae206db473a0d07d5305ab21d342ff0da8fbb2.vulkan.cache new file mode 100644 index 0000000..039ede4 Binary files /dev/null and b/.godot/shader_cache/CanvasShaderRD/275d4d34e3615bf0802f2ef82109d1cde17c7aa8031e89154c70fc7b3d40d52f/d0ae206db473a0d07d5305ab21d342ff0da8fbb2.vulkan.cache differ diff --git a/.godot/uid_cache.bin b/.godot/uid_cache.bin index c16155d..09a65b0 100644 Binary files a/.godot/uid_cache.bin and b/.godot/uid_cache.bin differ diff --git a/Matirials/FluidPartical.tres b/Matirials/FluidPartical.tres new file mode 100644 index 0000000..4ba128a --- /dev/null +++ b/Matirials/FluidPartical.tres @@ -0,0 +1,13 @@ +[gd_resource type="GradientTexture2D" format=3 uid="uid://b12wjykuncw11"] + +[sub_resource type="Gradient" id="Gradient_1m8h8"] +offsets = PackedFloat32Array(0.37951806, 1) +colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0) + +[resource] +gradient = SubResource("Gradient_1m8h8") +width = 32 +height = 32 +fill = 1 +fill_from = Vector2(0.5, 0.5) +fill_to = Vector2(0, 0) diff --git a/Scenes/dropplet.tscn b/Scenes/dropplet.tscn new file mode 100644 index 0000000..51507a6 --- /dev/null +++ b/Scenes/dropplet.tscn @@ -0,0 +1,20 @@ +[gd_scene format=3 uid="uid://d5n7kwhkl4le"] + +[ext_resource type="Script" uid="uid://w8ctpjxlfoih" path="res://Scripts/dropplet.gd" id="1_8btdw"] + +[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_l34re"] +friction = 0.1 +bounce = 0.5 + +[sub_resource type="CircleShape2D" id="CircleShape2D_8btdw"] +radius = 1.0 + +[node name="Dropplet" type="RigidBody2D" unique_id=1699297511] +physics_material_override = SubResource("PhysicsMaterial_l34re") +contact_monitor = true +max_contacts_reported = 100 +script = ExtResource("1_8btdw") +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=607348583] +shape = SubResource("CircleShape2D_8btdw") diff --git a/Scenes/game.tscn b/Scenes/game.tscn index d44691e..e34324a 100644 --- a/Scenes/game.tscn +++ b/Scenes/game.tscn @@ -5,6 +5,11 @@ [ext_resource type="Script" uid="uid://b2otvelhtq7en" path="res://Scripts/SceneManager.gd" id="2_wowpa"] [ext_resource type="PackedScene" uid="uid://dmk1mp1hqm62b" path="res://Scenes/player.tscn" id="3_wowpa"] [ext_resource type="Script" uid="uid://4hekg0d8n04f" path="res://Scripts/trigger.gd" id="3_wrm1d"] +[ext_resource type="PackedScene" uid="uid://ceyxo0mrrrd6d" path="res://Scenes/grenade.tscn" id="6_h4fw4"] +[ext_resource type="Script" uid="uid://nhqfqpjecvt8" path="res://Scripts/fluid_container.gd" id="6_v158k"] +[ext_resource type="Texture2D" uid="uid://b12wjykuncw11" path="res://Matirials/FluidPartical.tres" id="7_h4fw4"] +[ext_resource type="PackedScene" uid="uid://d5n7kwhkl4le" path="res://Scenes/dropplet.tscn" id="8_ldgsr"] +[ext_resource type="Shader" uid="uid://bvte4ugmua4n3" path="res://Scripts/Fluid.gdshader" id="10_ldgsr"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_2poj3"] size = Vector2(178, 20) @@ -14,6 +19,27 @@ size = Vector2(178, 20) [sub_resource type="CircleShape2D" id="CircleShape2D_3dryh"] radius = 111.364265 +[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_o5yvi"] +blend_mode = 1 +light_mode = 1 + +[sub_resource type="QuadMesh" id="QuadMesh_v158k"] +size = Vector2(5, 5) + +[sub_resource type="MultiMesh" id="MultiMesh_v158k"] +instance_count = 4 +mesh = SubResource("QuadMesh_v158k") +buffer = PackedFloat32Array(0, 8e-45, 1e-45, 0, 1e-44, 8e-45, 1e-45, 7e-45, 3e-45, 1e-45, 8e-45, 7e-45, 3e-45, 6e-45, 4e-45, 3e-45, 7e-45, 6e-45, 0, 0.6, 0.7, 1, -3.3646448, 14.557036, 0, 0.6, 0.7, 0.42, 0, 0, 0, 0) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_o5yvi"] +shader = ExtResource("10_ldgsr") +shader_parameter/threshold = 0.50000002375 +shader_parameter/smoothness = 0.02000000095 +shader_parameter/fluid_color = Color(0, 0.53333336, 0.61960787, 1) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ldgsr"] +size = Vector2(33, 103) + [node name="Game" type="Node2D" unique_id=1698001017] script = ExtResource("1_qxrlw") @@ -30,30 +56,30 @@ metadata/_edit_group_ = true position = Vector2(3, 0) shape = SubResource("RectangleShape2D_2poj3") -[node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=1600506296] +[node name="WorldFloor" type="StaticBody2D" parent="." unique_id=1600506296] position = Vector2(448, 452) metadata/_edit_group_ = true -[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=1926005878] +[node name="CollisionShape2D" type="CollisionShape2D" parent="WorldFloor" unique_id=1926005878] shape = SubResource("WorldBoundaryShape2D_2poj3") [node name="Player" parent="." unique_id=56223176 instance=ExtResource("3_wowpa")] position = Vector2(150, 303) -[node name="Area2D" type="Area2D" parent="." unique_id=1184709580] +[node name="destroyer" type="Area2D" parent="." unique_id=1184709580] position = Vector2(873, 340) script = ExtResource("3_wrm1d") metadata/_edit_group_ = true -[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=1623965811] +[node name="CollisionShape2D" type="CollisionShape2D" parent="destroyer" unique_id=1623965811] shape = SubResource("CircleShape2D_3dryh") debug_color = Color(0.7716697, 0.28327075, 0.8513461, 0.41960785) -[node name="StaticBody2D2" type="StaticBody2D" parent="." unique_id=938313164] +[node name="Ramp" type="StaticBody2D" parent="." unique_id=938313164] position = Vector2(392, 392) constant_linear_velocity = Vector2(10000, -5000) -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D2" unique_id=435374624] +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Ramp" unique_id=435374624] polygon = PackedVector2Array(-67, 16, 32, 16, 32, -31) [node name="Crates" type="Node2D" parent="." unique_id=982841392] @@ -73,5 +99,77 @@ position = Vector2(511, 365) [node name="Crate5" parent="Crates" unique_id=1833569865 instance=ExtResource("2_3dryh")] position = Vector2(469, 242) -[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"] -[connection signal="triggerActiveSignal" from="Area2D" to="." method="_on_triggerSignal"] +[node name="Grenade" parent="." unique_id=1290284523 instance=ExtResource("6_h4fw4")] +position = Vector2(575.5, 321.5) +scale = Vector2(6.755, 4.215) + +[node name="FluidContainer" type="Node2D" parent="." unique_id=1120087352] +script = ExtResource("6_v158k") + +[node name="MultiMeshInstance2D" type="MultiMeshInstance2D" parent="FluidContainer" unique_id=391615966] +material = SubResource("CanvasItemMaterial_o5yvi") +multimesh = SubResource("MultiMesh_v158k") +texture = ExtResource("7_h4fw4") + +[node name="Dropplet" parent="FluidContainer" unique_id=1699297511 instance=ExtResource("8_ldgsr")] +position = Vector2(93, 301) + +[node name="Dropplet2" parent="FluidContainer" unique_id=451606999 instance=ExtResource("8_ldgsr")] +position = Vector2(93, 301) + +[node name="Dropplet3" parent="FluidContainer" unique_id=1184492161 instance=ExtResource("8_ldgsr")] +position = Vector2(93, 301) + +[node name="Dropplet4" parent="FluidContainer" unique_id=1222152104 instance=ExtResource("8_ldgsr")] +position = Vector2(93, 301) + +[node name="BackBufferCopy" type="BackBufferCopy" parent="." unique_id=263444442] +position = Vector2(575.5, 321.5) +scale = Vector2(6.755, 4.215) +copy_mode = 2 + +[node name="ColorRect" type="ColorRect" parent="BackBufferCopy" unique_id=476141794] +material = SubResource("ShaderMaterial_o5yvi") +offset_left = -84.75204 +offset_top = -77.2242 +offset_right = 83.86381 +offset_bottom = 76.27521 + +[node name="Box" type="Node2D" parent="." unique_id=1091011481] + +[node name="StaticBody2D" type="StaticBody2D" parent="Box" unique_id=1170266336] +position = Vector2(154, 333) +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Box/StaticBody2D" unique_id=801438640] +position = Vector2(-2.5, 41.5) +shape = SubResource("RectangleShape2D_ldgsr") + +[node name="StaticBody2D4" type="StaticBody2D" parent="Box" unique_id=1387898222] +position = Vector2(30.999992, 286) +rotation = -0.62133723 +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Box/StaticBody2D4" unique_id=991907868] +position = Vector2(-2.5, 41.5) +shape = SubResource("RectangleShape2D_ldgsr") + +[node name="StaticBody2D2" type="StaticBody2D" parent="Box" unique_id=877846752] +position = Vector2(53, 330) +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Box/StaticBody2D2" unique_id=1150133989] +position = Vector2(-2.5, 41.5) +shape = SubResource("RectangleShape2D_ldgsr") + +[node name="StaticBody2D3" type="StaticBody2D" parent="Box" unique_id=2125119042] +position = Vector2(144, 421) +rotation = 1.5707964 +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Box/StaticBody2D3" unique_id=1057588662] +position = Vector2(6.5, 41.5) +shape = SubResource("RectangleShape2D_ldgsr") + +[connection signal="body_entered" from="destroyer" to="destroyer" method="_on_body_entered"] +[connection signal="triggerActiveSignal" from="destroyer" to="." method="_on_triggerSignal"] diff --git a/Scenes/grenade.tscn b/Scenes/grenade.tscn new file mode 100644 index 0000000..6e7111e --- /dev/null +++ b/Scenes/grenade.tscn @@ -0,0 +1,17 @@ +[gd_scene format=3 uid="uid://ceyxo0mrrrd6d"] + +[ext_resource type="Script" uid="uid://jrqdl3mm7rly" path="res://Scripts/grenade.gd" id="1_v44n1"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_b5j7x"] +radius = 2.0 + +[node name="Grenade" type="RigidBody2D" unique_id=1290284523] +contact_monitor = true +max_contacts_reported = 3 +script = ExtResource("1_v44n1") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1668727236] +shape = SubResource("CircleShape2D_b5j7x") +debug_color = Color(0.81547993, 0.40661094, 1.1551381e-06, 1) + +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/Scenes/player.tscn b/Scenes/player.tscn index 74f58c4..1b8e070 100644 --- a/Scenes/player.tscn +++ b/Scenes/player.tscn @@ -1,10 +1,152 @@ [gd_scene format=3 uid="uid://dmk1mp1hqm62b"] [ext_resource type="Script" uid="uid://btmoyp0rwqmxe" path="res://Scripts/player.gd" id="1_v0iea"] +[ext_resource type="Texture2D" uid="uid://c87goe3qmmrv0" path="res://assets/graphics/player/Running/player run 48x48.png" id="2_6t5aa"] +[ext_resource type="Texture2D" uid="uid://p72rbg7thsvi" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_cvnsp"] [sub_resource type="CircleShape2D" id="CircleShape2D_2poj3"] +[sub_resource type="AtlasTexture" id="AtlasTexture_ukyrk"] +atlas = ExtResource("2_6t5aa") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7dp3o"] +atlas = ExtResource("2_6t5aa") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h4iuc"] +atlas = ExtResource("2_6t5aa") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fd4e3"] +atlas = ExtResource("2_6t5aa") +region = Rect2(144, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qqcod"] +atlas = ExtResource("2_6t5aa") +region = Rect2(192, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_igrcy"] +atlas = ExtResource("2_6t5aa") +region = Rect2(240, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fs7ks"] +atlas = ExtResource("2_6t5aa") +region = Rect2(288, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l6n3p"] +atlas = ExtResource("2_6t5aa") +region = Rect2(336, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6t5aa"] +atlas = ExtResource("2_cvnsp") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vgqql"] +atlas = ExtResource("2_cvnsp") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fkybt"] +atlas = ExtResource("2_cvnsp") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x3wgy"] +atlas = ExtResource("2_cvnsp") +region = Rect2(144, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3smsa"] +atlas = ExtResource("2_cvnsp") +region = Rect2(192, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8erm5"] +atlas = ExtResource("2_cvnsp") +region = Rect2(240, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_f1ek2"] +atlas = ExtResource("2_cvnsp") +region = Rect2(288, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tx1dd"] +atlas = ExtResource("2_cvnsp") +region = Rect2(336, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gymyn"] +atlas = ExtResource("2_cvnsp") +region = Rect2(384, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pu2lt"] +atlas = ExtResource("2_cvnsp") +region = Rect2(432, 0, 48, 48) + +[sub_resource type="SpriteFrames" id="SpriteFrames_ukyrk"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_ukyrk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7dp3o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h4iuc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fd4e3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qqcod") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_igrcy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fs7ks") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l6n3p") +}], +"loop": true, +"name": &"Run", +"speed": 12.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_6t5aa") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vgqql") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fkybt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_x3wgy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3smsa") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8erm5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_f1ek2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tx1dd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gymyn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pu2lt") +}], +"loop": true, +"name": &"idle", +"speed": 12.0 +}] + [node name="Player" type="CharacterBody2D" unique_id=56223176] +texture_filter = 1 script = ExtResource("1_v0iea") metadata/_edit_group_ = true @@ -17,3 +159,16 @@ target_position = Vector2(24, 0) [node name="LeftCast" type="RayCast2D" parent="." unique_id=648222680] target_position = Vector2(-24, 0) + +[node name="RightSpawn" type="Marker2D" parent="." unique_id=358294407] +position = Vector2(16, -5) + +[node name="LeftSpawn" type="Marker2D" parent="." unique_id=1342289836] +position = Vector2(-15, -5) + +[node name="PlayerGraphic" type="AnimatedSprite2D" parent="." unique_id=1409812048] +position = Vector2(0, -6) +sprite_frames = SubResource("SpriteFrames_ukyrk") +animation = &"Run" +autoplay = "idle" +frame_progress = 0.013636588 diff --git a/Scripts/Fluid.gdshader b/Scripts/Fluid.gdshader new file mode 100644 index 0000000..5ff203c --- /dev/null +++ b/Scripts/Fluid.gdshader @@ -0,0 +1,22 @@ +shader_type canvas_item; + +// Use the captured screen texture from the BackBufferCopy +uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap; + +uniform float threshold : hint_range(0.0, 2.0) = 0.5; +uniform float smoothness : hint_range(0.0, 1.0) = 0.02; +uniform vec4 fluid_color : source_color = vec4(0.2, 0.5, 1.0, 1.0); + +void fragment() { + // 1. Grab the pixel from the 'screen' behind this ColorRect + vec4 screen_color = texture(screen_texture, SCREEN_UV); + + // 2. Read the brightness (density) + float density = screen_color.r; + + // 3. Apply the threshold/cutoff + float alpha = smoothstep(threshold, threshold + smoothness, density); + + // 4. Output the fluid + COLOR = vec4(fluid_color.rgb, alpha * fluid_color.a); +} diff --git a/Scripts/Fluid.gdshader.uid b/Scripts/Fluid.gdshader.uid new file mode 100644 index 0000000..4301280 --- /dev/null +++ b/Scripts/Fluid.gdshader.uid @@ -0,0 +1 @@ +uid://bvte4ugmua4n3 diff --git a/Scripts/SceneManager.gd b/Scripts/SceneManager.gd index 457b338..11d9a73 100644 --- a/Scripts/SceneManager.gd +++ b/Scripts/SceneManager.gd @@ -1,6 +1,10 @@ class_name SceneManager extends Node2D @onready var game = $".." @onready var crates = $"../Crates" +var grenade = preload("res://Scenes/grenade.tscn") +var dropplet = preload("res://Scenes/dropplet.tscn") +const DROP_PT_X = 93 +const DROP_PT_Y = 301 func _ready() -> void: print("Hello") @@ -25,3 +29,15 @@ func updateCrates()->void: _crateTotal +=1 print("Number of crates"+str(_crateTotal)) game.totalCrates(_crateTotal) + +func makeGrenade(_grenadePostion, _grenadeDirection): + print("SM wants to make a grenade") + var myGrenade:Grenade = grenade.instantiate() + owner.add_child(myGrenade) + myGrenade.transform = _grenadePostion + myGrenade.apply_central_impulse(Vector2(_grenadeDirection, -1)*200) +func addDropplet(): + var myDropplet = dropplet.instantiate() + $"../FluidContainer".add_child(myDropplet) + myDropplet.global_position = Vector2(DROP_PT_X, DROP_PT_Y) + diff --git a/Scripts/dropplet.gd b/Scripts/dropplet.gd new file mode 100644 index 0000000..19ec891 --- /dev/null +++ b/Scripts/dropplet.gd @@ -0,0 +1,18 @@ +extends RigidBody2D + +func _physics_process(_delta): + # This only works if Contact Monitor is ON and Max Contacts > 0 + var bodies = get_colliding_bodies() + + for body in bodies: + if body is RigidBody2D: + var dir = global_position.direction_to(body.global_position) + var dist = global_position.distance_to(body.global_position) + + # Surface Tension: Pull them together if they are touching + # We use a negative force to pull towards 'self' + var strength = 200.0 + var force = -dir * strength * (1.0 - dist / 64.0) + + # Apply to the other body (or apply to self) + body.apply_central_force(force) diff --git a/Scripts/dropplet.gd.uid b/Scripts/dropplet.gd.uid new file mode 100644 index 0000000..2860f0b --- /dev/null +++ b/Scripts/dropplet.gd.uid @@ -0,0 +1 @@ +uid://w8ctpjxlfoih diff --git a/Scripts/fluid_container.gd b/Scripts/fluid_container.gd new file mode 100644 index 0000000..ace7bd4 --- /dev/null +++ b/Scripts/fluid_container.gd @@ -0,0 +1,44 @@ +extends Node2D + +@export var max_droplets: int = 100 +@export var spawn_rate: float = 0.1 +var spawn_timer: float = 0.1 + +func _physics_process(delta): + var mm_node = $MultiMeshInstance2D + var mm = mm_node.multimesh + + # 1. Get all current RigidBody2D children + var fluid_bodies = get_children().filter(func(node): return node is RigidBody2D) + + # 2. FORCE MultiMesh to match the current body count + # This is why they weren't 'registering'—the MultiMesh slot didn't exist yet! + if mm.instance_count != fluid_bodies.size(): + mm.instance_count = fluid_bodies.size() + + # 3. Visual Sync + for i in range(fluid_bodies.size()): + var body = fluid_bodies[i] + # Subtract the container's position so particles don't "drift" + var t = Transform2D(0.0, body.global_position - global_position) + mm.set_instance_transform_2d(i, t) + + # 4. Interaction (Surface Tension) + for i in range(fluid_bodies.size()): + for j in range(i + 1, fluid_bodies.size()): + var b1 = fluid_bodies[i] + var b2 = fluid_bodies[j] + var dist_vec = b1.global_position - b2.global_position + var dist = dist_vec.length() + + if dist < 40.0: + var force = dist_vec.normalized() * 5.0 + b1.apply_central_force(-force) + b2.apply_central_force(force) + + # 5. Spawning + spawn_timer += delta + if spawn_timer >= spawn_rate and fluid_bodies.size() < max_droplets: + %SceneManager.addDropplet() + mm.instance_count = fluid_bodies.size() + spawn_timer = 0.0 diff --git a/Scripts/fluid_container.gd.uid b/Scripts/fluid_container.gd.uid new file mode 100644 index 0000000..c857496 --- /dev/null +++ b/Scripts/fluid_container.gd.uid @@ -0,0 +1 @@ +uid://nhqfqpjecvt8 diff --git a/Scripts/grenade.gd b/Scripts/grenade.gd new file mode 100644 index 0000000..748e71d --- /dev/null +++ b/Scripts/grenade.gd @@ -0,0 +1,23 @@ +class_name Grenade extends RigidBody2D + +var timer = Timer.new() + +func _ready(): + add_child(timer) + + timer.wait_time = 2 + + timer.one_shot = true + timer.connect("timeout", explode) + timer.start() + +func explode(): + print("HEHEHE EXPLODE TIME") + self.queue_free() + + +func _on_body_entered(body): + print("collision with grenade") + if body.is_in_group("Destructable"): + body.queue_free() + explode() diff --git a/Scripts/grenade.gd.uid b/Scripts/grenade.gd.uid new file mode 100644 index 0000000..63d9978 --- /dev/null +++ b/Scripts/grenade.gd.uid @@ -0,0 +1 @@ +uid://jrqdl3mm7rly diff --git a/Scripts/player.gd b/Scripts/player.gd index 2b39460..c3afe53 100644 --- a/Scripts/player.gd +++ b/Scripts/player.gd @@ -1,13 +1,17 @@ class_name Player extends CharacterBody2D @onready var right_cast = $RightCast @onready var left_cast = $LeftCast - +@onready var right_spawn = $RightSpawn +@onready var left_spawn = $LeftSpawn +@onready var player_graphic = $PlayerGraphic const SPEED = 300.0 const JUMP_VELOCITY = -400.0 var direction enum FaceDirection{LEFT, RIGHT} var facing:FaceDirection = FaceDirection.RIGHT +enum State{IDLE,RUNNING} +var currentState:State = State.IDLE var pushTarget:RigidBody2D var pushEnabled:bool = false @@ -15,10 +19,15 @@ var pushEnabled:bool = false func _physics_process(delta: float) -> void: handle_input() handle_movement(delta) + handle_state() + handle_animation() move_and_slide() handle_collisions() func handle_input()->void: + if Input.is_action_just_pressed("Chuck"): + print("Chuck the chicken (inside joke)") + %SceneManager.makeGrenade(right_spawn.global_transform, 1) if Input.is_action_just_pressed("Force Push") && pushEnabled: if not pushTarget is RigidBody2D: return @@ -39,8 +48,10 @@ func handle_input()->void: direction = Input.get_axis("ui_left", "ui_right") if direction<0: facing = FaceDirection.LEFT + player_graphic.flip_h = true if direction>0: facing = FaceDirection.RIGHT + player_graphic.flip_h = false func handle_movement(delta)->void: # Add the gravity. @@ -74,3 +85,18 @@ func handle_collisions()->void: if c.get_collider() is RigidBody2D: #deliver the impact c.get_collider().apply_central_impulse(-c.get_normal() * 100) + + + +func handle_state(): + match currentState: + State.IDLE when velocity.x != 0: + currentState = State.RUNNING + State.RUNNING when velocity.x == 0: + currentState = State.IDLE +func handle_animation(): + match currentState: + State.IDLE: + player_graphic.play("idle") + State.RUNNING: + player_graphic.play("Run") diff --git a/assets/graphics/player/Running/player run 48x48.png b/assets/graphics/player/Running/player run 48x48.png new file mode 100644 index 0000000..aca5b55 Binary files /dev/null and b/assets/graphics/player/Running/player run 48x48.png differ diff --git a/assets/graphics/player/Running/player run 48x48.png.import b/assets/graphics/player/Running/player run 48x48.png.import new file mode 100644 index 0000000..27bbc5f --- /dev/null +++ b/assets/graphics/player/Running/player run 48x48.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c87goe3qmmrv0" +path="res://.godot/imported/player run 48x48.png-04a079043a24250d54279fbf1db0711c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/player/Running/player run 48x48.png" +dest_files=["res://.godot/imported/player run 48x48.png-04a079043a24250d54279fbf1db0711c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/assets/graphics/player/idle/Player Idle 48x48.png b/assets/graphics/player/idle/Player Idle 48x48.png new file mode 100644 index 0000000..b618511 Binary files /dev/null and b/assets/graphics/player/idle/Player Idle 48x48.png differ diff --git a/assets/graphics/player/idle/Player Idle 48x48.png.import b/assets/graphics/player/idle/Player Idle 48x48.png.import new file mode 100644 index 0000000..276d930 --- /dev/null +++ b/assets/graphics/player/idle/Player Idle 48x48.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://p72rbg7thsvi" +path="res://.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/player/idle/Player Idle 48x48.png" +dest_files=["res://.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/project.godot b/project.godot index 12840f0..a788d22 100644 --- a/project.godot +++ b/project.godot @@ -52,6 +52,11 @@ ui_right={ "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(118, 17),"global_position":Vector2(127, 65),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) ] } +Chuck={ +"deadzone": 0.2, +"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":67,"key_label":0,"unicode":99,"location":0,"echo":false,"script":null) +] +} [physics] @@ -60,3 +65,4 @@ ui_right={ [rendering] rendering_device/driver.windows="d3d12" +environment/defaults/default_clear_color=Color(0, 0, 0, 1)