diff --git a/DungeonShooting_Godot/prefab/effect/Blood.tscn b/DungeonShooting_Godot/prefab/effect/Blood.tscn index 1c7a044..26f3391 100644 --- a/DungeonShooting_Godot/prefab/effect/Blood.tscn +++ b/DungeonShooting_Godot/prefab/effect/Blood.tscn @@ -1,24 +1,17 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=3 format=2] [ext_resource path="res://resource/effects/Circle.png" type="Texture" id=1] [ext_resource path="res://src/game/effects/Blood.cs" type="Script" id=2] -[sub_resource type="ParticlesMaterial" id=1] -flag_disable_z = true -gravity = Vector3( 0, 0, 0 ) -initial_velocity = 70.0 -initial_velocity_random = 1.0 -orbit_velocity = 0.0 -orbit_velocity_random = 0.0 -scale = 0.1 -scale_random = 0.3 -color = Color( 0.792157, 0, 0, 1 ) - -[node name="Blood" type="Particles2D"] -emitting = false -lifetime = 0.5 -one_shot = true +[node name="Blood" type="CPUParticles2D"] +z_index = -5 +lifetime = 0.2 explosiveness = 0.9 -process_material = SubResource( 1 ) texture = ExtResource( 1 ) +gravity = Vector2( 0, 0 ) +initial_velocity = 150.0 +initial_velocity_random = 1.0 +scale_amount = 0.15 +scale_amount_random = 0.4 +color = Color( 0.627451, 0.0705882, 0.0705882, 0.705882 ) script = ExtResource( 2 ) diff --git a/DungeonShooting_Godot/project.godot b/DungeonShooting_Godot/project.godot index c5ef034..869f9bd 100644 --- a/DungeonShooting_Godot/project.godot +++ b/DungeonShooting_Godot/project.godot @@ -27,6 +27,7 @@ window/size/width=1920 window/size/height=1080 window/size/resizable=false +window/size/always_on_top=true window/dpi/allow_hidpi=true window/vsync/use_vsync=false window/stretch/mode="2d" diff --git a/DungeonShooting_Godot/resource/map/dungeon_1.tmx b/DungeonShooting_Godot/resource/map/dungeon_1.tmx new file mode 100644 index 0000000..263cf36 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/dungeon_1.tmx @@ -0,0 +1,582 @@ + + + + + + + + + +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,12,99,99,99,99,99,99,99, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0 + + +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +14,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0 + + +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,34,35,36, +51,51,51,51,51,51,51,51,52,0,0,0,0,50,51,52, +51,51,51,51,51,51,51,51,52,0,0,0,0,50,51,52, +51,51,51,51,51,51,51,51,52,0,0,0,0,50,51,52, +51,51,51,51,51,51,51,51,52,0,0,0,0,50,51,52, +51,51,51,51,51,51,51,51,52,0,0,0,0,50,51,44 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +35,35,35,35,36,0,0,0,0,0,0,0,0,0,0,0 + + +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0 + + +51,51,51,51,51,51,51,51,52,0,0,0,0,98,99,99, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,52,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,44,35,35,35,35,35,35,35, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +99,99,99,51,100,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +50,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +46,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +51,51,51,51,51,51,51,51,51,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,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+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129 + + +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,0,0,0, +0,0,0,0,0,0,0,0,0,129,129,129,129,0,0,0, +0,0,0,0,0,0,0,0,0,129,129,129,129,0,0,0, +0,0,0,0,0,0,0,0,0,129,129,129,129,0,0,0, +0,0,0,0,0,0,0,0,0,129,129,129,129,0,0,0, +0,0,0,0,0,0,0,0,0,129,129,129,129,0,0,0 + + +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +0,0,0,0,0,129,129,129,129,129,129,129,129,129,129,129 + + +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129 + + +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129 + + +0,0,0,0,0,0,0,0,0,129,129,129,129,0,0,0, +0,0,0,0,0,0,0,0,0,129,129,129,129,0,0,0, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +0,0,0,0,0,129,129,129,129,129,129,129,129,129,129,129, +0,0,0,0,0,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + + + + + diff --git a/DungeonShooting_Godot/resource/map/dungeon_1.tmx.import b/DungeonShooting_Godot/resource/map/dungeon_1.tmx.import new file mode 100644 index 0000000..1319136 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/dungeon_1.tmx.import @@ -0,0 +1,22 @@ +[remap] + +importer="vnen.tiled_importer" +type="PackedScene" +path="res://.import/dungeon_1.tmx-ecc46759ea1682aa9214cfce52f76627.scn" + +[deps] + +source_file="res://resource/map/dungeon_1.tmx" +dest_files=[ "res://.import/dungeon_1.tmx-ecc46759ea1682aa9214cfce52f76627.scn" ] + +[params] + +custom_properties=true +tile_metadata=false +uv_clip=true +image_flags=0 +collision_layer=1 +embed_internal_images=true +save_tiled_properties=false +add_background=true +post_import_script="" diff --git a/DungeonShooting_Godot/resource/map/dungeon_test.tmx b/DungeonShooting_Godot/resource/map/dungeon_test.tmx index 13de468..0a77aa8 100644 --- a/DungeonShooting_Godot/resource/map/dungeon_test.tmx +++ b/DungeonShooting_Godot/resource/map/dungeon_test.tmx @@ -1,5 +1,5 @@ - + diff --git a/DungeonShooting_Godot/scene/Room.tscn b/DungeonShooting_Godot/scene/Room.tscn index 67cf647..3bfad78 100644 --- a/DungeonShooting_Godot/scene/Room.tscn +++ b/DungeonShooting_Godot/scene/Room.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=5 format=2] -[ext_resource path="res://resource/map/dungeon_test.tmx" type="PackedScene" id=2] +[ext_resource path="res://resource/map/dungeon_1.tmx" type="PackedScene" id=1] [ext_resource path="res://src/game/room/RoomManager.cs" type="Script" id=3] [ext_resource path="res://src/game/camera/GameCamera.cs" type="Script" id=5] @@ -17,7 +17,7 @@ [node name="MapRoot" type="Node2D" parent="."] z_index = -10 -[node name="dungeon_test" parent="MapRoot" instance=ExtResource( 2 )] +[node name="dungeon_1" parent="MapRoot" instance=ExtResource( 1 )] [node name="Camera2D" type="Camera2D" parent="."] position = Vector2( 253, 219 ) diff --git a/DungeonShooting_Godot/src/framework/ActivityObject.cs b/DungeonShooting_Godot/src/framework/ActivityObject.cs index 0bce3e1..33b637c 100644 --- a/DungeonShooting_Godot/src/framework/ActivityObject.cs +++ b/DungeonShooting_Godot/src/framework/ActivityObject.cs @@ -687,7 +687,7 @@ sortRoot.AddChild(this); } - GlobalPosition = _throwData.StartPosition + new Vector2(0, -_throwData.Y); + GlobalPosition = _throwData.StartPosition; //显示阴影 ShowShadowSprite(); diff --git a/DungeonShooting_Godot/src/framework/Grid.cs b/DungeonShooting_Godot/src/framework/Grid.cs new file mode 100644 index 0000000..8aa0229 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/Grid.cs @@ -0,0 +1,8 @@ + +/// +/// 网格数据结构 +/// +public class Grid +{ + +} diff --git a/DungeonShooting_Godot/src/game/effects/Blood.cs b/DungeonShooting_Godot/src/game/effects/Blood.cs index d62fd08..bef16b1 100644 --- a/DungeonShooting_Godot/src/game/effects/Blood.cs +++ b/DungeonShooting_Godot/src/game/effects/Blood.cs @@ -1,20 +1,41 @@ using Godot; -public class Blood : Particles2D +/// +/// 血液溅射效果 +/// +public class Blood : CPUParticles2D { + private float _timer; + public override void _Ready() { Emitting = true; - Life(); + ReadyStop(); } - private async void Life() + public override void _Process(float delta) { - var timer = GetTree().CreateTimer(0.4f); + _timer += delta; + if (_timer > 15f) + { + if (_timer > 60f) + { + QueueFree(); + } + else + { + var color = Modulate; + color.a = Mathf.Lerp(1, 0, (_timer - 15f) / 45f); + Modulate = color; + } + } + } + + private async void ReadyStop() + { + var timer = GetTree().CreateTimer(Lifetime - 0.05f); await ToSignal(timer, "timeout"); Emitting = false; - GD.Print("冻结"); - SetProcess(false); SetPhysicsProcess(false); SetProcessInput(false); SetProcessInternal(false); diff --git a/DungeonShooting_Godot/src/game/item/weapon/bullet/Bullet.cs b/DungeonShooting_Godot/src/game/item/weapon/bullet/Bullet.cs index 28f33d1..60f7c2c 100644 --- a/DungeonShooting_Godot/src/game/item/weapon/bullet/Bullet.cs +++ b/DungeonShooting_Godot/src/game/item/weapon/bullet/Bullet.cs @@ -70,7 +70,7 @@ var role = other.AsActivityObject(); if (role != null) { - role.CallDeferred(nameof(Role.Hurt), 4); + role.CallDeferred(nameof(Role.Hurt), 4, Rotation); Destroy(); } } diff --git a/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs b/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs index abee1bf..bddd318 100644 --- a/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs +++ b/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs @@ -93,14 +93,13 @@ protected override void OnFire() { //创建一个弹壳 - var startPos = GlobalPosition + new Vector2(0, 5); var startHeight = 6; var direction = GlobalRotationDegrees + Utils.RandRangeInt(-30, 30) + 180; var xf = Utils.RandRangeInt(20, 60); var yf = Utils.RandRangeInt(60, 120); var rotate = Utils.RandRangeInt(-720, 720); var shell = new ShellCase(); - shell.Throw(new Vector2(10, 5), startPos, startHeight, direction, xf, yf, rotate, true); + shell.Throw(new Vector2(10, 5), Master.GlobalPosition, startHeight, direction, xf, yf, rotate, true); if (Master == GameApplication.Instance.Room.Player) { diff --git a/DungeonShooting_Godot/src/game/item/weapon/knife/Knife.cs b/DungeonShooting_Godot/src/game/item/weapon/knife/Knife.cs index b90ac06..ebc604f 100644 --- a/DungeonShooting_Godot/src/game/item/weapon/knife/Knife.cs +++ b/DungeonShooting_Godot/src/game/item/weapon/knife/Knife.cs @@ -118,7 +118,7 @@ { if (activityObject is Role role) { - role.CallDeferred(nameof(Role.Hurt), 10); + role.CallDeferred(nameof(Role.Hurt), 10, (role.GetCenterPosition() - GlobalPosition).Angle()); } } } diff --git a/DungeonShooting_Godot/src/game/role/Player.cs b/DungeonShooting_Godot/src/game/role/Player.cs index 8f08799..a009b19 100644 --- a/DungeonShooting_Godot/src/game/role/Player.cs +++ b/DungeonShooting_Godot/src/game/role/Player.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using Godot; diff --git a/DungeonShooting_Godot/src/game/role/Role.cs b/DungeonShooting_Godot/src/game/role/Role.cs index 43c9fde..6d8e632 100644 --- a/DungeonShooting_Godot/src/game/role/Role.cs +++ b/DungeonShooting_Godot/src/game/role/Role.cs @@ -478,7 +478,8 @@ /// 受到伤害, 如果是在碰撞信号处理函数中调用该函数, 请使用 CallDeferred 来延时调用, 否则很有可能导致报错 /// /// 伤害的量 - public virtual void Hurt(int damage) + /// 角度 + public virtual void Hurt(int damage, float angle) { OnHit(damage); if (Shield > 0) @@ -488,10 +489,11 @@ else { Hp -= damage; - // var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_Blood_tscn); - // var particles2D = packedScene.Instance(); - // particles2D.GlobalPosition = GlobalPosition; - // GameApplication.Instance.Room.GetRoot().AddChild(particles2D); + var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_Blood_tscn); + var blood = packedScene.Instance(); + blood.GlobalPosition = GlobalPosition; + blood.Rotation = angle; + GameApplication.Instance.Room.GetRoot().AddChild(blood); } PlayHitAnimation(); diff --git a/DungeonShooting_Godot/src/game/room/RoomManager.cs b/DungeonShooting_Godot/src/game/room/RoomManager.cs index c0abced..1d6346f 100644 --- a/DungeonShooting_Godot/src/game/room/RoomManager.cs +++ b/DungeonShooting_Godot/src/game/room/RoomManager.cs @@ -51,7 +51,7 @@ //初始化地图 _mapRoot = GetNode("MapRoot"); var child = _mapRoot.GetChild(0); - _tileMap = child.GetNode("Wall"); + _tileMap = child.GetNode("Ground"); var node = child.GetNode("Config"); Color color = (Color)node.GetMeta("ClearColor"); VisualServer.SetDefaultClearColor(color);