diff --git a/DungeonShooting_Godot/DungeonShooting.csproj b/DungeonShooting_Godot/DungeonShooting.csproj index 65ee589..543224c 100644 --- a/DungeonShooting_Godot/DungeonShooting.csproj +++ b/DungeonShooting_Godot/DungeonShooting.csproj @@ -1,4 +1,4 @@ - + net7.0 true diff --git a/DungeonShooting_Godot/DungeonShooting.csproj.old.1 b/DungeonShooting_Godot/DungeonShooting.csproj.old.1 new file mode 100644 index 0000000..65ee589 --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old.1 @@ -0,0 +1,11 @@ + + + net7.0 + true + + + + + + + \ No newline at end of file diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx index 508bcd9..eb9fabc 100644 --- a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx b/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx index 152aabd..a9e7ba9 100644 --- a/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx index a17d8a7..33c5fe7 100644 --- a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx index 7602be4..b1614e0 100644 --- a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx Binary files differ diff --git a/DungeonShooting_Godot/prefab/ammo/Bullet0001.tscn b/DungeonShooting_Godot/prefab/ammo/Bullet0001.tscn new file mode 100644 index 0000000..69aa265 --- /dev/null +++ b/DungeonShooting_Godot/prefab/ammo/Bullet0001.tscn @@ -0,0 +1,72 @@ +[gd_scene load_steps=8 format=3 uid="uid://bj4kmvt8jg1cf"] + +[ext_resource type="Script" path="res://src/game/activity/ammo/Bullet.cs" id="1_82ma0"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_6wvtu"] +[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/ammo/bullet0001.png" id="3_hjgpe"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_w5w0i"] +resource_local_to_scene = true +shader = ExtResource("2_6wvtu") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_qhkgc"] +resource_local_to_scene = true +shader = ExtResource("2_6wvtu") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="SpriteFrames" id="SpriteFrames_5wvmf"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("3_hjgpe") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_lcqb8"] +size = Vector2(9, 4) + +[node name="Bullet0001" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 2 +script = ExtResource("1_82ma0") +CollisionArea = NodePath("CollisionArea") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_w5w0i") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.6, 1.6, 1.6, 1) +material = SubResource("ShaderMaterial_qhkgc") +sprite_frames = SubResource("SpriteFrames_5wvmf") + +[node name="CollisionArea" type="Area2D" parent="."] +visible = false +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionArea"] +position = Vector2(2.93353, 0) +shape = SubResource("RectangleShape2D_lcqb8") + +[node name="Collision" type="CollisionShape2D" parent="."] +position = Vector2(1.5, 0) +shape = SubResource("RectangleShape2D_lcqb8") diff --git a/DungeonShooting_Godot/prefab/ammo/Bullet0002.tscn b/DungeonShooting_Godot/prefab/ammo/Bullet0002.tscn new file mode 100644 index 0000000..a8da285 --- /dev/null +++ b/DungeonShooting_Godot/prefab/ammo/Bullet0002.tscn @@ -0,0 +1,63 @@ +[gd_scene load_steps=8 format=3 uid="uid://bqkj0rn72ppge"] + +[ext_resource type="Script" path="res://src/game/activity/ammo/Bullet.cs" id="1_hga3h"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_n44pd"] +[ext_resource type="SpriteFrames" uid="uid://bpeodjqiy3mil" path="res://resource/spriteFrames/bullet/Bullet0002.tres" id="3_uvuj8"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] +resource_local_to_scene = true +shader = ExtResource("2_n44pd") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0wfd"] +resource_local_to_scene = true +shader = ExtResource("2_n44pd") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="CircleShape2D" id="CircleShape2D_0vxfv"] +radius = 3.0 + +[sub_resource type="CircleShape2D" id="CircleShape2D_e2yn3"] +radius = 3.0 + +[node name="Bullet0002" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 2 +script = ExtResource("1_hga3h") +CollisionArea = NodePath("CollisionArea") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_v77gw") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.6, 1.6, 1.6, 1) +material = SubResource("ShaderMaterial_p0wfd") +sprite_frames = ExtResource("3_uvuj8") + +[node name="CollisionArea" type="Area2D" parent="."] +visible = false +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionArea"] +position = Vector2(-2.38419e-07, 0) +shape = SubResource("CircleShape2D_0vxfv") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_e2yn3") diff --git a/DungeonShooting_Godot/prefab/ammo/Bullet0003.tscn b/DungeonShooting_Godot/prefab/ammo/Bullet0003.tscn new file mode 100644 index 0000000..6a3904f --- /dev/null +++ b/DungeonShooting_Godot/prefab/ammo/Bullet0003.tscn @@ -0,0 +1,59 @@ +[gd_scene load_steps=7 format=3 uid="uid://ee24ocwk8snj"] + +[ext_resource type="Script" path="res://src/game/activity/ammo/Bullet.cs" id="1_h6lfm"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_bteri"] +[ext_resource type="SpriteFrames" uid="uid://bcnhyin0aufl1" path="res://resource/spriteFrames/bullet/Bullet0003.tres" id="3_qvo0u"] + + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] +resource_local_to_scene = true +shader = ExtResource("2_bteri") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0wfd"] +resource_local_to_scene = true +shader = ExtResource("2_bteri") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_c0onq"] +size = Vector2(6, 3.125) + +[node name="Bullet0003" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 2 +script = ExtResource("1_h6lfm") +CollisionArea = NodePath("CollisionArea") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_v77gw") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.6, 1.6, 1.6, 1) +material = SubResource("ShaderMaterial_p0wfd") +sprite_frames = ExtResource("3_qvo0u") + +[node name="CollisionArea" type="Area2D" parent="."] +visible = false +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionArea"] +position = Vector2(1, 0) +shape = SubResource("RectangleShape2D_c0onq") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_c0onq") diff --git a/DungeonShooting_Godot/prefab/ammo/laser/Laser0001.tscn b/DungeonShooting_Godot/prefab/ammo/laser/Laser0001.tscn new file mode 100644 index 0000000..84ee658 --- /dev/null +++ b/DungeonShooting_Godot/prefab/ammo/laser/Laser0001.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=4 format=3 uid="uid://d1q8jjtgi2wpu"] + +[ext_resource type="Script" path="res://src/game/activity/ammo/laser/Laser.cs" id="1_d486x"] +[ext_resource type="Texture2D" uid="uid://clfpbq1c1ilp1" path="res://resource/sprite/ammo/Laser0001.png" id="2_xd7mu"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_l4vuk"] +resource_local_to_scene = true + +[node name="Laser0001" type="Area2D"] +collision_layer = 2 +monitorable = false +script = ExtResource("1_d486x") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_l4vuk") + +[node name="LineSprite" type="Sprite2D" parent="."] +modulate = Color(1.4, 1.4, 1.4, 1) +position = Vector2(0, 1.19209e-07) +texture = ExtResource("2_xd7mu") +centered = false +offset = Vector2(0, -8) diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn deleted file mode 100644 index 858cd81..0000000 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn +++ /dev/null @@ -1,71 +0,0 @@ -[gd_scene load_steps=8 format=3 uid="uid://bj4kmvt8jg1cf"] - -[ext_resource type="Script" path="res://src/game/activity/bullet/Bullet.cs" id="1_82ma0"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_6wvtu"] -[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/bullet/bullet0001.png" id="3_hjgpe"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_w5w0i"] -resource_local_to_scene = true -shader = ExtResource("2_6wvtu") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_qhkgc"] -resource_local_to_scene = true -shader = ExtResource("2_6wvtu") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true - -[sub_resource type="SpriteFrames" id="SpriteFrames_5wvmf"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("3_hjgpe") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_lcqb8"] -size = Vector2(9, 4) - -[node name="Bullet0001" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 2 -script = ExtResource("1_82ma0") -CollisionArea = NodePath("CollisionArea") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_w5w0i") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_qhkgc") -sprite_frames = SubResource("SpriteFrames_5wvmf") - -[node name="CollisionArea" type="Area2D" parent="."] -visible = false -collision_layer = 0 -collision_mask = 0 -monitorable = false - -[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionArea"] -position = Vector2(2.93353, 0) -shape = SubResource("RectangleShape2D_lcqb8") - -[node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(1.5, 0) -shape = SubResource("RectangleShape2D_lcqb8") diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn deleted file mode 100644 index 7ff1c64..0000000 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn +++ /dev/null @@ -1,63 +0,0 @@ -[gd_scene load_steps=8 format=3 uid="uid://bqkj0rn72ppge"] - -[ext_resource type="Script" path="res://src/game/activity/bullet/Bullet.cs" id="1_hga3h"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_n44pd"] -[ext_resource type="SpriteFrames" uid="uid://bpeodjqiy3mil" path="res://resource/spriteFrames/bullet/Bullet0002.tres" id="3_uvuj8"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] -resource_local_to_scene = true -shader = ExtResource("2_n44pd") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0wfd"] -resource_local_to_scene = true -shader = ExtResource("2_n44pd") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true - -[sub_resource type="CircleShape2D" id="CircleShape2D_0vxfv"] -radius = 3.0 - -[sub_resource type="CircleShape2D" id="CircleShape2D_e2yn3"] -radius = 3.0 - -[node name="Bullet0002" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 2 -script = ExtResource("1_hga3h") -CollisionArea = NodePath("CollisionArea") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_v77gw") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -modulate = Color(1.6, 1.6, 1.6, 1) -material = SubResource("ShaderMaterial_p0wfd") -sprite_frames = ExtResource("3_uvuj8") - -[node name="CollisionArea" type="Area2D" parent="."] -visible = false -collision_layer = 0 -collision_mask = 0 -monitorable = false - -[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionArea"] -position = Vector2(-2.38419e-07, 0) -shape = SubResource("CircleShape2D_0vxfv") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("CircleShape2D_e2yn3") diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn deleted file mode 100644 index 605759f..0000000 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn +++ /dev/null @@ -1,58 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://ee24ocwk8snj"] - -[ext_resource type="Script" path="res://src/game/activity/bullet/Bullet.cs" id="1_h6lfm"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_bteri"] -[ext_resource type="SpriteFrames" uid="uid://bcnhyin0aufl1" path="res://resource/spriteFrames/bullet/Bullet0003.tres" id="3_qvo0u"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] -resource_local_to_scene = true -shader = ExtResource("2_bteri") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0wfd"] -resource_local_to_scene = true -shader = ExtResource("2_bteri") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_c0onq"] -size = Vector2(6, 3.125) - -[node name="Bullet0003" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 2 -script = ExtResource("1_h6lfm") -CollisionArea = NodePath("CollisionArea") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_v77gw") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -modulate = Color(1.6, 1.6, 1.6, 1) -material = SubResource("ShaderMaterial_p0wfd") -sprite_frames = ExtResource("3_qvo0u") - -[node name="CollisionArea" type="Area2D" parent="."] -visible = false -collision_layer = 0 -collision_mask = 0 -monitorable = false - -[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionArea"] -position = Vector2(1, 0) -shape = SubResource("RectangleShape2D_c0onq") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_c0onq") diff --git a/DungeonShooting_Godot/prefab/bullet/laser/Laser0001.tscn b/DungeonShooting_Godot/prefab/bullet/laser/Laser0001.tscn deleted file mode 100644 index 4eab51b..0000000 --- a/DungeonShooting_Godot/prefab/bullet/laser/Laser0001.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://d1q8jjtgi2wpu"] - -[ext_resource type="Script" path="res://src/game/activity/bullet/laser/Laser.cs" id="1_d486x"] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_l4vuk"] -resource_local_to_scene = true - -[node name="Laser0001" type="Area2D"] -collision_layer = 2 -monitorable = false -script = ExtResource("1_d486x") - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_l4vuk") - -[node name="Line2D" type="Line2D" parent="."] -points = PackedVector2Array(0, 0, 0, 0) -width = 0.0 -default_color = Color(0, 1.27, 1.4, 1) diff --git a/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn b/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn index 559a842..584b37c 100644 --- a/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn +++ b/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn @@ -12,6 +12,7 @@ shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_yif6x"] resource_local_to_scene = true @@ -22,6 +23,7 @@ shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="CircleShape2D" id="CircleShape2D_5pj80"] radius = 4.0 diff --git a/DungeonShooting_Godot/resource/config/ActivityObject.json b/DungeonShooting_Godot/resource/config/ActivityObject.json index 49cb525..427d31b 100644 --- a/DungeonShooting_Godot/resource/config/ActivityObject.json +++ b/DungeonShooting_Godot/resource/config/ActivityObject.json @@ -95,7 +95,7 @@ "Name": "", "Intro": "", "Details": "", - "Prefab": "res://prefab/bullet/Bullet0001.tscn", + "Prefab": "res://prefab/ammo/Bullet0001.tscn", "Icon": "", "ShowInMapEditor": false }, @@ -105,7 +105,7 @@ "Name": "", "Intro": "", "Details": "", - "Prefab": "res://prefab/bullet/Bullet0002.tscn", + "Prefab": "res://prefab/ammo/Bullet0002.tscn", "Icon": "", "ShowInMapEditor": false }, @@ -115,7 +115,7 @@ "Name": "", "Intro": "", "Details": "", - "Prefab": "res://prefab/bullet/Bullet0003.tscn", + "Prefab": "res://prefab/ammo/Bullet0003.tscn", "Icon": "", "ShowInMapEditor": false }, diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json index a37d0ea..7a7ca41 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json @@ -1 +1 @@ -[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":19,"Y":2},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":24,"Y":-14},"Size":{"X":0,"Y":0},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":6,"Y":34},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-42,"Y":9},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0004","Weight":100,"Attr":{"CurrAmmon":"180","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-63,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-31,"Y":-16},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-47,"Y":32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":-25},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]}],[{"Position":{"X":57,"Y":56},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":67,"Y":28},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"prop5000","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":60,"Y":-19},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":34,"Y":23},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1.5,"MarkList":[{"Id":"prop0002","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file +[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":19,"Y":2},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":24,"Y":-14},"Size":{"X":0,"Y":0},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":6,"Y":34},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-42,"Y":9},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0004","Weight":100,"Attr":{"CurrAmmon":"180","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-63,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-31,"Y":-16},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-47,"Y":32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":-25},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]}],[{"Position":{"X":57,"Y":56},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":67,"Y":28},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"prop5000","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":60,"Y":-19},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":34,"Y":23},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1.5,"MarkList":[{"Id":"prop0002","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-11,"Y":8},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-20,"Y":33},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preview.png index d64d95a..e502322 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ammo/Laser0001.png b/DungeonShooting_Godot/resource/sprite/ammo/Laser0001.png new file mode 100644 index 0000000..9338ede --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/Laser0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ammo/Laser0001.png.import b/DungeonShooting_Godot/resource/sprite/ammo/Laser0001.png.import new file mode 100644 index 0000000..25289ff --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/Laser0001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://clfpbq1c1ilp1" +path="res://.godot/imported/Laser0001.png-e34334292fd2d2f0d3ac554eda0d8e22.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ammo/Laser0001.png" +dest_files=["res://.godot/imported/Laser0001.png-e34334292fd2d2f0d3ac554eda0d8e22.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ammo/arrow.png b/DungeonShooting_Godot/resource/sprite/ammo/arrow.png new file mode 100644 index 0000000..4baebfb --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/arrow.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ammo/arrow.png.import b/DungeonShooting_Godot/resource/sprite/ammo/arrow.png.import new file mode 100644 index 0000000..954d342 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/arrow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjb4rq1qavfm6" +path="res://.godot/imported/arrow.png-685bbc3ec5a4ba764677aa55699c56cb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ammo/arrow.png" +dest_files=["res://.godot/imported/arrow.png-685bbc3ec5a4ba764677aa55699c56cb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ammo/bullet.aseprite b/DungeonShooting_Godot/resource/sprite/ammo/bullet.aseprite new file mode 100644 index 0000000..19447ed --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/bullet.aseprite Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ammo/bullet0001.png b/DungeonShooting_Godot/resource/sprite/ammo/bullet0001.png new file mode 100644 index 0000000..5b488de --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/bullet0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ammo/bullet0001.png.import b/DungeonShooting_Godot/resource/sprite/ammo/bullet0001.png.import new file mode 100644 index 0000000..dc942c8 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/bullet0001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bu0b11hiuecxy" +path="res://.godot/imported/bullet0001.png-ca6896eff6569857ffd76487dba49e92.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ammo/bullet0001.png" +dest_files=["res://.godot/imported/bullet0001.png-ca6896eff6569857ffd76487dba49e92.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ammo/bullet0002.png b/DungeonShooting_Godot/resource/sprite/ammo/bullet0002.png new file mode 100644 index 0000000..a76c266 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/bullet0002.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ammo/bullet0002.png.import b/DungeonShooting_Godot/resource/sprite/ammo/bullet0002.png.import new file mode 100644 index 0000000..c276f50 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/bullet0002.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ctsvj4y1t538u" +path="res://.godot/imported/bullet0002.png-3688e1e71f7a780e62df2f9fb3d93138.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ammo/bullet0002.png" +dest_files=["res://.godot/imported/bullet0002.png-3688e1e71f7a780e62df2f9fb3d93138.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ammo/bullet0003.png b/DungeonShooting_Godot/resource/sprite/ammo/bullet0003.png new file mode 100644 index 0000000..14a69ff --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/bullet0003.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ammo/bullet0003.png.import b/DungeonShooting_Godot/resource/sprite/ammo/bullet0003.png.import new file mode 100644 index 0000000..d914d5d --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/bullet0003.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cs6pa7h8ffvy4" +path="res://.godot/imported/bullet0003.png-2bdc6735c7cbf9480f69071e13d5eafe.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ammo/bullet0003.png" +dest_files=["res://.godot/imported/bullet0003.png-2bdc6735c7cbf9480f69071e13d5eafe.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ammo/bullet2.png b/DungeonShooting_Godot/resource/sprite/ammo/bullet2.png new file mode 100644 index 0000000..964f292 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/bullet2.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ammo/bullet2.png.import b/DungeonShooting_Godot/resource/sprite/ammo/bullet2.png.import new file mode 100644 index 0000000..c00565f --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ammo/bullet2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://o3iq4myj72q0" +path="res://.godot/imported/bullet2.png-b5d9c0c003f30bd02d5b0eda057df7d6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ammo/bullet2.png" +dest_files=["res://.godot/imported/bullet2.png-b5d9c0c003f30bd02d5b0eda057df7d6.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/bullet/arrow.png b/DungeonShooting_Godot/resource/sprite/bullet/arrow.png deleted file mode 100644 index 4baebfb..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/arrow.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/arrow.png.import b/DungeonShooting_Godot/resource/sprite/bullet/arrow.png.import deleted file mode 100644 index 18616dd..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/arrow.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cjb4rq1qavfm6" -path="res://.godot/imported/arrow.png-5f9f0a3c4c243acf30e833eb04add206.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/arrow.png" -dest_files=["res://.godot/imported/arrow.png-5f9f0a3c4c243acf30e833eb04add206.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet.aseprite b/DungeonShooting_Godot/resource/sprite/bullet/bullet.aseprite deleted file mode 100644 index 19447ed..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet.aseprite +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png deleted file mode 100644 index 5b488de..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png.import b/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png.import deleted file mode 100644 index fe2ba90..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bu0b11hiuecxy" -path="res://.godot/imported/bullet0001.png-09e29b083f51e2b282ac1fb1dd682734.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/bullet0001.png" -dest_files=["res://.godot/imported/bullet0001.png-09e29b083f51e2b282ac1fb1dd682734.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png deleted file mode 100644 index a76c266..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png.import b/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png.import deleted file mode 100644 index 90b0c71..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://ctsvj4y1t538u" -path="res://.godot/imported/bullet0002.png-5a53e3706ec2ef023e52e256612c2c94.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/bullet0002.png" -dest_files=["res://.godot/imported/bullet0002.png-5a53e3706ec2ef023e52e256612c2c94.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png deleted file mode 100644 index 14a69ff..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png.import b/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png.import deleted file mode 100644 index 808d9f3..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cs6pa7h8ffvy4" -path="res://.godot/imported/bullet0003.png-968c6a657388df80893fe68898e87dae.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/bullet0003.png" -dest_files=["res://.godot/imported/bullet0003.png-968c6a657388df80893fe68898e87dae.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png deleted file mode 100644 index 964f292..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png.import b/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png.import deleted file mode 100644 index 79038a8..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://o3iq4myj72q0" -path="res://.godot/imported/bullet2.png-6ca9527061677971732c8192cb1aa209.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/bullet2.png" -dest_files=["res://.godot/imported/bullet2.png-6ca9527061677971732c8192cb1aa209.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres index b8cfbc6..5b055e5 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres @@ -1,6 +1,7 @@ [gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://baoxep7vami72"] -[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/bullet/bullet0001.png" id="1_ktu7r"] +[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/ammo/bullet0001.png" id="1_ktu7r"] + [resource] diff --git a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres index 635a03b..52e62c5 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres @@ -1,6 +1,7 @@ [gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bpeodjqiy3mil"] -[ext_resource type="Texture2D" uid="uid://ctsvj4y1t538u" path="res://resource/sprite/bullet/bullet0002.png" id="1_53f3g"] +[ext_resource type="Texture2D" uid="uid://ctsvj4y1t538u" path="res://resource/sprite/ammo/bullet0002.png" id="1_53f3g"] + [resource] animations = [{ diff --git a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0003.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0003.tres index 2e724e8..5fa6bd8 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0003.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0003.tres @@ -1,6 +1,7 @@ [gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bcnhyin0aufl1"] -[ext_resource type="Texture2D" uid="uid://cs6pa7h8ffvy4" path="res://resource/sprite/bullet/bullet0003.png" id="1_sl01e"] +[ext_resource type="Texture2D" uid="uid://cs6pa7h8ffvy4" path="res://resource/sprite/ammo/bullet0003.png" id="1_sl01e"] + [resource] animations = [{ diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs index 3ff5957..6806cfc 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs @@ -180,9 +180,9 @@ _activityRegisterMap.Add("weapon0005", new RegisterActivityData("res://prefab/weapon/Weapon0005.tscn", ExcelConfig.ActivityObject_Map["weapon0005"])); _activityRegisterMap.Add("weapon0006", new RegisterActivityData("res://prefab/weapon/Weapon0006.tscn", ExcelConfig.ActivityObject_Map["weapon0006"])); _activityRegisterMap.Add("weapon0007", new RegisterActivityData("res://prefab/weapon/Weapon0007.tscn", ExcelConfig.ActivityObject_Map["weapon0007"])); - _activityRegisterMap.Add("bullet0001", new RegisterActivityData("res://prefab/bullet/Bullet0001.tscn", ExcelConfig.ActivityObject_Map["bullet0001"])); - _activityRegisterMap.Add("bullet0002", new RegisterActivityData("res://prefab/bullet/Bullet0002.tscn", ExcelConfig.ActivityObject_Map["bullet0002"])); - _activityRegisterMap.Add("bullet0003", new RegisterActivityData("res://prefab/bullet/Bullet0003.tscn", ExcelConfig.ActivityObject_Map["bullet0003"])); + _activityRegisterMap.Add("bullet0001", new RegisterActivityData("res://prefab/ammo/Bullet0001.tscn", ExcelConfig.ActivityObject_Map["bullet0001"])); + _activityRegisterMap.Add("bullet0002", new RegisterActivityData("res://prefab/ammo/Bullet0002.tscn", ExcelConfig.ActivityObject_Map["bullet0002"])); + _activityRegisterMap.Add("bullet0003", new RegisterActivityData("res://prefab/ammo/Bullet0003.tscn", ExcelConfig.ActivityObject_Map["bullet0003"])); _activityRegisterMap.Add("shell0001", new RegisterActivityData("res://prefab/shell/Shell0001.tscn", ExcelConfig.ActivityObject_Map["shell0001"])); _activityRegisterMap.Add("shell0002", new RegisterActivityData("res://prefab/shell/Shell0002.tscn", ExcelConfig.ActivityObject_Map["shell0002"])); _activityRegisterMap.Add("shell0003", new RegisterActivityData("res://prefab/shell/Shell0003.tscn", ExcelConfig.ActivityObject_Map["shell0003"])); diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index edefa31..0b57564 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -118,7 +118,7 @@ GetWindow().SizeChanged += OnWindowSizeChanged; ImageCanvas.Init(GetTree().CurrentScene); - + //初始化ui UiManager.Init(); //调试Ui diff --git a/DungeonShooting_Godot/src/game/activity/ammo/Bullet.cs b/DungeonShooting_Godot/src/game/activity/ammo/Bullet.cs new file mode 100644 index 0000000..65278e5 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/ammo/Bullet.cs @@ -0,0 +1,179 @@ +using System.Collections; +using Godot; + +/// +/// 子弹类 +/// +[Tool] +public partial class Bullet : ActivityObject, IAmmo +{ + /// + /// 碰撞区域 + /// + [Export, ExportFillNode] + public Area2D CollisionArea { get; set; } + + /// + /// 攻击的层级 + /// + public uint AttackLayer + { + get => CollisionArea.CollisionMask; + set => CollisionArea.CollisionMask = value; + } + + /// + /// 发射该子弹的武器 + /// + public Weapon Weapon { get; private set; } + + /// + /// 最小伤害 + /// + public int MinHarm { get; set; } = 4; + + /// + /// 最大伤害 + /// + public int MaxHarm { get; set; } = 4; + + /// + /// 发射该子弹的角色 + /// + public Role TriggerRole { get; private set; } + + // 最大飞行距离 + private float MaxDistance; + + // 子弹飞行速度 + private float FlySpeed; + + //当前子弹已经飞行的距离 + private float CurrFlyDistance = 0; + + public void Init(Weapon weapon, uint targetLayer) + { + TriggerRole = weapon.TriggerRole; + Weapon = weapon; + AttackLayer = targetLayer; + } + + /// + /// 初始化子弹属性 + /// + /// 射出该子弹的武器 + /// 速度 + /// 最大飞行距离 + /// 位置 + /// 角度 + /// 攻击目标层级 + public void Init(Weapon weapon, float speed, float maxDistance, Vector2 position, float rotation, uint targetLayer) + { + Init(weapon, targetLayer); + CollisionArea.AreaEntered += OnArea2dEntered; + + if (TriggerRole == null || !TriggerRole.IsAi) //只有玩家使用该武器才能获得正常速度的子弹 + { + FlySpeed = speed; + } + else + { + FlySpeed = speed * weapon.AiUseAttribute.AiAttackAttr.BulletSpeedScale; + } + MaxDistance = maxDistance; + Position = position; + Rotation = rotation; + ShadowOffset = new Vector2(0, 5); + BasisVelocity = new Vector2(FlySpeed, 0).Rotated(Rotation); + + //如果子弹会对玩家造成伤害, 则显示红色描边 + if (Player.Current.CollisionWithMask(targetLayer)) + { + ShowOutline = true; + OutlineColor = new Color(1, 0, 0); + StartCoroutine(BorderFlashes()); + } + } + + private IEnumerator BorderFlashes() + { + while (true) + { + ShowOutline = !ShowOutline; + yield return new WaitForSeconds(0.12f); + } + } + + /// + /// 播放子弹消失的特效 + /// + public virtual void PlayDisappearEffect() + { + var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletDisappear_tscn); + var node = packedScene.Instantiate(); + node.GlobalPosition = GlobalPosition; + node.AddToActivityRoot(RoomLayerEnum.YSortLayer); + } + + protected override void PhysicsProcessOver(float delta) + { + //移动 + var lastSlideCollision = GetLastSlideCollision(); + //撞到墙 + if (lastSlideCollision != null) + { + //创建粒子特效 + var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletSmoke_tscn); + var smoke = packedScene.Instantiate(); + smoke.GlobalPosition = lastSlideCollision.GetPosition(); + smoke.GlobalRotation = lastSlideCollision.GetNormal().Angle(); + smoke.AddToActivityRoot(RoomLayerEnum.YSortLayer); + + Destroy(); + return; + } + //距离太大, 自动销毁 + CurrFlyDistance += FlySpeed * delta; + if (CurrFlyDistance >= MaxDistance) + { + PlayDisappearEffect(); + Destroy(); + } + } + + private void OnArea2dEntered(Area2D other) + { + var role = other.AsActivityObject(); + if (role != null) + { + var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletDisappear_tscn); + var node = packedScene.Instantiate(); + node.GlobalPosition = GlobalPosition; + node.AddToActivityRoot(RoomLayerEnum.YSortLayer); + + //计算子弹造成的伤害 + var damage = Utils.Random.RandomRangeInt(MinHarm, MaxHarm); + if (TriggerRole != null) + { + damage = TriggerRole.RoleState.CallCalcDamageEvent(damage); + } + + //击退 + if (role is not Player) //目标不是玩家才会触发击退 + { + var attr = Weapon.GetUseAttribute(TriggerRole); + var repel = Utils.Random.RandomConfigRange(attr.RepelRnage); + role.MoveController.AddForce(Vector2.FromAngle(BasisVelocity.Angle()) * repel, repel * 2); + } + + //造成伤害 + role.CallDeferred(nameof(Role.Hurt), damage, Rotation); + Destroy(); + } + } + + protected override void OnDestroy() + { + StopAllCoroutine(); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/ammo/BulletAttribute.cs b/DungeonShooting_Godot/src/game/activity/ammo/BulletAttribute.cs new file mode 100644 index 0000000..aa30af1 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/ammo/BulletAttribute.cs @@ -0,0 +1,5 @@ + +public class BulletAttribute +{ + +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/ammo/IAmmo.cs b/DungeonShooting_Godot/src/game/activity/ammo/IAmmo.cs new file mode 100644 index 0000000..074b6e3 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/ammo/IAmmo.cs @@ -0,0 +1,25 @@ + +public interface IAmmo : IDestroy, ICoroutine +{ + /// + /// 攻击的层级 + /// + uint AttackLayer { get; set; } + + /// + /// 发射该子弹的武器 + /// + Weapon Weapon { get; } + + /// + /// 发射该子弹的角色 + /// + Role TriggerRole { get; } + + /// + /// 初始化子弹数据 + /// + /// 发射该子弹的武器 + /// 攻击的层级 + void Init(Weapon weapon, uint attackLayer); +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/ammo/laser/Laser.cs b/DungeonShooting_Godot/src/game/activity/ammo/laser/Laser.cs new file mode 100644 index 0000000..84e289d --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/ammo/laser/Laser.cs @@ -0,0 +1,137 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; + +/// +/// 激光子弹 +/// +public partial class Laser : Area2D, IAmmo +{ + public CollisionShape2D Collision { get; private set; } + public Sprite2D LineSprite { get; private set; } + public RectangleShape2D Shape { get; private set; } + + public uint AttackLayer + { + get => CollisionMask; + set => CollisionMask = value; + } + public Weapon Weapon { get; private set; } + public Role TriggerRole { get; private set; } + + public bool IsDestroyed { get; private set; } + //开启的协程 + private List _coroutineList; + private float _pixelScale; + private float _speed = 1200; + + public override void _Ready() + { + Collision = GetNodeOrNull("CollisionShape2D"); + Collision.Disabled = true; + Shape = Collision.Shape as RectangleShape2D; + LineSprite = GetNodeOrNull("LineSprite"); + _pixelScale = 1f / LineSprite.Texture.GetHeight(); + + AreaEntered += OnArea2dEntered; + } + + public void Init(Weapon weapon, uint targetLayer) + { + TriggerRole = weapon.TriggerRole; + Weapon = weapon; + AttackLayer = targetLayer; + } + + public void Init(Weapon weapon, uint targetLayer, Vector2 position, float rotation, float width, float distance) + { + Init(weapon, targetLayer); + Position = position; + Rotation = rotation; + + //计算射线最大距离, 也就是撞到墙壁的距离 + var targetPosition = position + Vector2.FromAngle(rotation) * distance; + var parameters = PhysicsRayQueryParameters2D.Create(position, targetPosition, PhysicsLayer.Wall); + var result = GetWorld2D().DirectSpaceState.IntersectRay(parameters); + if (result != null) + { + var point = (Vector2)result["position"]; + distance = position.DistanceTo(point); + } + + + Collision.SetDeferred(CollisionShape2D.PropertyName.Disabled, false); + Collision.Position = Vector2.Zero; + Shape.Size = Vector2.Zero;; + LineSprite.Scale = new Vector2(0, width * _pixelScale); + + //激光飞行时间 + var time = distance / _speed; + + var tween = CreateTween(); + tween.SetParallel(); + tween.TweenProperty(LineSprite, "scale", new Vector2(distance, width * _pixelScale), time); + tween.TweenProperty(Collision, "position", new Vector2(distance * 0.5f, 0), time); + tween.TweenProperty(Shape, "size", new Vector2(distance, width), time); + tween.Chain(); + tween.TweenInterval(0.2f); + tween.Chain(); + tween.TweenCallback(Callable.From(() => + { + Collision.SetDeferred(CollisionShape2D.PropertyName.Disabled, false); + })); + tween.Chain(); + tween.TweenProperty(LineSprite, "scale", new Vector2(distance, 0), 0.3f); + tween.Chain(); + tween.TweenCallback(Callable.From(() => + { + Destroy(); + })); + tween.Play(); + } + + public override void _Process(double delta) + { + ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, (float)delta); + } + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + QueueFree(); + } + + private void OnArea2dEntered(Area2D other) + { + var role = other.AsActivityObject(); + if (role != null) + { + //造成伤害 + role.CallDeferred(nameof(Role.Hurt), 4, Rotation); + } + } + + public long StartCoroutine(IEnumerator able) + { + return ProxyCoroutineHandler.ProxyStartCoroutine(ref _coroutineList, able); + } + + public void StopCoroutine(long coroutineId) + { + ProxyCoroutineHandler.ProxyStopCoroutine(ref _coroutineList, coroutineId); + } + + public bool IsCoroutineOver(long coroutineId) + { + return ProxyCoroutineHandler.ProxyIsCoroutineOver(ref _coroutineList, coroutineId); + } + + public void StopAllCoroutine() + { + ProxyCoroutineHandler.ProxyStopAllCoroutine(ref _coroutineList); + } +} diff --git a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs deleted file mode 100644 index c1c8fc1..0000000 --- a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs +++ /dev/null @@ -1,179 +0,0 @@ -using System.Collections; -using Godot; - -/// -/// 子弹类 -/// -[Tool] -public partial class Bullet : ActivityObject, IBullet -{ - /// - /// 碰撞区域 - /// - [Export, ExportFillNode] - public Area2D CollisionArea { get; set; } - - /// - /// 攻击的层级 - /// - public uint AttackLayer - { - get => CollisionArea.CollisionMask; - set => CollisionArea.CollisionMask = value; - } - - /// - /// 发射该子弹的武器 - /// - public Weapon Weapon { get; private set; } - - /// - /// 最小伤害 - /// - public int MinHarm { get; set; } = 4; - - /// - /// 最大伤害 - /// - public int MaxHarm { get; set; } = 4; - - /// - /// 发射该子弹的角色 - /// - public Role TriggerRole { get; private set; } - - // 最大飞行距离 - private float MaxDistance; - - // 子弹飞行速度 - private float FlySpeed; - - //当前子弹已经飞行的距离 - private float CurrFlyDistance = 0; - - public void Init(Weapon weapon, uint targetLayer) - { - TriggerRole = weapon.TriggerRole; - Weapon = weapon; - AttackLayer = targetLayer; - } - - /// - /// 初始化子弹属性 - /// - /// 射出该子弹的武器 - /// 速度 - /// 最大飞行距离 - /// 位置 - /// 角度 - /// 攻击目标层级 - public void Init(Weapon weapon, float speed, float maxDistance, Vector2 position, float rotation, uint targetLayer) - { - Init(weapon, targetLayer); - CollisionArea.AreaEntered += OnArea2dEntered; - - if (TriggerRole == null || !TriggerRole.IsAi) //只有玩家使用该武器才能获得正常速度的子弹 - { - FlySpeed = speed; - } - else - { - FlySpeed = speed * weapon.AiUseAttribute.AiAttackAttr.BulletSpeedScale; - } - MaxDistance = maxDistance; - Position = position; - Rotation = rotation; - ShadowOffset = new Vector2(0, 5); - BasisVelocity = new Vector2(FlySpeed, 0).Rotated(Rotation); - - //如果子弹会对玩家造成伤害, 则显示红色描边 - if (Player.Current.CollisionWithMask(targetLayer)) - { - ShowOutline = true; - OutlineColor = new Color(1, 0, 0); - StartCoroutine(BorderFlashes()); - } - } - - private IEnumerator BorderFlashes() - { - while (true) - { - ShowOutline = !ShowOutline; - yield return new WaitForSeconds(0.12f); - } - } - - /// - /// 播放子弹消失的特效 - /// - public virtual void PlayDisappearEffect() - { - var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletDisappear_tscn); - var node = packedScene.Instantiate(); - node.GlobalPosition = GlobalPosition; - node.AddToActivityRoot(RoomLayerEnum.YSortLayer); - } - - protected override void PhysicsProcessOver(float delta) - { - //移动 - var lastSlideCollision = GetLastSlideCollision(); - //撞到墙 - if (lastSlideCollision != null) - { - //创建粒子特效 - var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletSmoke_tscn); - var smoke = packedScene.Instantiate(); - smoke.GlobalPosition = lastSlideCollision.GetPosition(); - smoke.GlobalRotation = lastSlideCollision.GetNormal().Angle(); - smoke.AddToActivityRoot(RoomLayerEnum.YSortLayer); - - Destroy(); - return; - } - //距离太大, 自动销毁 - CurrFlyDistance += FlySpeed * delta; - if (CurrFlyDistance >= MaxDistance) - { - PlayDisappearEffect(); - Destroy(); - } - } - - private void OnArea2dEntered(Area2D other) - { - var role = other.AsActivityObject(); - if (role != null) - { - var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletDisappear_tscn); - var node = packedScene.Instantiate(); - node.GlobalPosition = GlobalPosition; - node.AddToActivityRoot(RoomLayerEnum.YSortLayer); - - //计算子弹造成的伤害 - var damage = Utils.Random.RandomRangeInt(MinHarm, MaxHarm); - if (TriggerRole != null) - { - damage = TriggerRole.RoleState.CallCalcDamageEvent(damage); - } - - //击退 - if (role is not Player) //目标不是玩家才会触发击退 - { - var attr = Weapon.GetUseAttribute(TriggerRole); - var repel = Utils.Random.RandomConfigRange(attr.RepelRnage); - role.MoveController.AddForce(Vector2.FromAngle(BasisVelocity.Angle()) * repel, repel * 2); - } - - //造成伤害 - role.CallDeferred(nameof(Role.Hurt), damage, Rotation); - Destroy(); - } - } - - protected override void OnDestroy() - { - StopAllCoroutine(); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/BulletAttribute.cs b/DungeonShooting_Godot/src/game/activity/bullet/BulletAttribute.cs deleted file mode 100644 index aa30af1..0000000 --- a/DungeonShooting_Godot/src/game/activity/bullet/BulletAttribute.cs +++ /dev/null @@ -1,5 +0,0 @@ - -public class BulletAttribute -{ - -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/IBullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/IBullet.cs deleted file mode 100644 index 9c74bcc..0000000 --- a/DungeonShooting_Godot/src/game/activity/bullet/IBullet.cs +++ /dev/null @@ -1,25 +0,0 @@ - -public interface IBullet : IDestroy, ICoroutine -{ - /// - /// 攻击的层级 - /// - uint AttackLayer { get; set; } - - /// - /// 发射该子弹的武器 - /// - Weapon Weapon { get; } - - /// - /// 发射该子弹的角色 - /// - Role TriggerRole { get; } - - /// - /// 初始化子弹数据 - /// - /// 发射该子弹的武器 - /// 攻击的层级 - void Init(Weapon weapon, uint attackLayer); -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/laser/Laser.cs b/DungeonShooting_Godot/src/game/activity/bullet/laser/Laser.cs deleted file mode 100644 index 23252d5..0000000 --- a/DungeonShooting_Godot/src/game/activity/bullet/laser/Laser.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using Godot; - -/// -/// 激光子弹 -/// -public partial class Laser : Area2D, IBullet -{ - public CollisionShape2D Collision { get; private set; } - public Line2D Line { get; private set; } - public RectangleShape2D Shape { get; private set; } - - public uint AttackLayer { get; set; } - public Weapon Weapon { get; private set; } - public Role TriggerRole { get; private set; } - - public bool IsDestroyed { get; private set; } - //开启的协程 - private List _coroutineList; - - public override void _Ready() - { - Collision = GetNodeOrNull("CollisionShape2D"); - Shape = Collision.Shape as RectangleShape2D; - Line = GetNodeOrNull("Line2D"); - } - - public void Init(Weapon weapon, uint targetLayer) - { - TriggerRole = weapon.TriggerRole; - Weapon = weapon; - AttackLayer = targetLayer; - } - - public void Init(Weapon weapon, uint targetLayer, Vector2 position, float rotation, float width, float distance) - { - Init(weapon, targetLayer); - Position = position; - Rotation = rotation; - - //计算射线最大距离, 也就是撞到墙壁的距离 - var targetPosition = position + Vector2.FromAngle(rotation) * distance; - var parameters = PhysicsRayQueryParameters2D.Create(position, targetPosition, PhysicsLayer.Wall); - var result = GetWorld2D().DirectSpaceState.IntersectRay(parameters); - if (result != null) - { - var point = (Vector2)result["position"]; - distance = position.DistanceTo(point); - } - - Collision.Position = new Vector2(distance * 0.5f, 0); - Shape.Size = new Vector2(distance, width); - - - var tween = CreateTween(); - tween.SetParallel(); - tween.TweenProperty(Line, "width", width, 0.3); - tween.TweenMethod(Callable.From((float v) => - { - Line.SetPointPosition(1, new Vector2(v, 0)); - }), 0, distance, 0.1); - tween.Chain(); - tween.TweenInterval(1.5); - tween.Chain(); - tween.TweenCallback(Callable.From(() => - { - Destroy(); - })); - tween.Play(); - } - - public override void _Process(double delta) - { - ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, (float)delta); - } - - public void Destroy() - { - if (IsDestroyed) - { - return; - } - - QueueFree(); - } - - public long StartCoroutine(IEnumerator able) - { - return ProxyCoroutineHandler.ProxyStartCoroutine(ref _coroutineList, able); - } - - public void StopCoroutine(long coroutineId) - { - ProxyCoroutineHandler.ProxyStopCoroutine(ref _coroutineList, coroutineId); - } - - public bool IsCoroutineOver(long coroutineId) - { - return ProxyCoroutineHandler.ProxyIsCoroutineOver(ref _coroutineList, coroutineId); - } - - public void StopAllCoroutine() - { - ProxyCoroutineHandler.ProxyStopAllCoroutine(ref _coroutineList); - } -} diff --git a/DungeonShooting_Godot/src/game/activity/role/Role.cs b/DungeonShooting_Godot/src/game/activity/role/Role.cs index 7269052..fcbf036 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs @@ -20,7 +20,7 @@ /// /// 默认攻击对象层级 /// - public const uint DefaultAttackLayer = PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Wall | PhysicsLayer.Prop; + public const uint DefaultAttackLayer = PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Wall; /// /// 伤害区域 diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs index 4736952..90caf12 100644 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs @@ -74,7 +74,7 @@ IsAi = true; StateController = AddComponent>(); - AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Prop | PhysicsLayer.Player; + AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Player; EnemyLayer = PhysicsLayer.Player; Camp = CampEnum.Camp2; @@ -510,4 +510,10 @@ _lockTargetTime = time; } + protected override void DebugDraw() + { + base.DebugDraw(); + + DrawString(ResourceManager.DefaultFont12Px, new Vector2(0, 7), Hp.ToString(), HorizontalAlignment.Center); + } } diff --git a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs index e067187..c0016b0 100644 --- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs +++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs @@ -39,7 +39,7 @@ IsAi = false; StateController = AddComponent>(); - AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Prop | PhysicsLayer.Enemy; + AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Enemy; EnemyLayer = EnemyLayer = PhysicsLayer.Enemy; Camp = CampEnum.Camp1; diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs index af6cb96..706d4b1 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs @@ -1944,7 +1944,29 @@ bullet.PutDown(RoomLayerEnum.YSortLayer); return bullet; } - + + protected Laser ShootLaser(float fireRotation) + { + var laser = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_ammo_laser_Laser0001_tscn); + laser.AddToActivityRoot(RoomLayerEnum.YSortLayer); + + var deviationAngle = Utils.Random.RandomConfigRange(Attribute.BulletDeviationAngleRange); + if (Master != null) + { + deviationAngle = Master.RoleState.CallCalcBulletDeviationAngleEvent(this, deviationAngle); + } + + laser.Init( + this, + GetAttackLayer(), + FirePoint.GlobalPosition, + fireRotation + Mathf.DegToRad(deviationAngle), + 3, + 600 + ); + return laser; + } + //-------------------------------- Ai相关 ----------------------------- /// diff --git a/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs b/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs index 204e213..968f1d4 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs @@ -26,10 +26,8 @@ protected override void OnShoot(float fireRotation) { - //ShootBullet(fireRotation, Attribute.BulletId); - var laser = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_bullet_laser_Laser0001_tscn); - laser.AddToActivityRoot(RoomLayerEnum.YSortLayer); - laser.Init(this, GetAttackLayer(), FirePoint.GlobalPosition, fireRotation, 3, 600); + ShootBullet(fireRotation, Attribute.BulletId); + //ShootLaser(fireRotation); } // //测试用, 敌人被消灭时触发手上武器开火 diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 8c77fcb..8052442 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -9,10 +9,10 @@ public const string excel_DungeonShooting_ExcelTool_deps_json = "res://excel/DungeonShooting_ExcelTool.deps.json"; public const string excel_DungeonShooting_ExcelTool_runtimeconfig_json = "res://excel/DungeonShooting_ExcelTool.runtimeconfig.json"; public const string prefab_Cursor_tscn = "res://prefab/Cursor.tscn"; - public const string prefab_bullet_Bullet0001_tscn = "res://prefab/bullet/Bullet0001.tscn"; - public const string prefab_bullet_Bullet0002_tscn = "res://prefab/bullet/Bullet0002.tscn"; - public const string prefab_bullet_Bullet0003_tscn = "res://prefab/bullet/Bullet0003.tscn"; - public const string prefab_bullet_laser_Laser0001_tscn = "res://prefab/bullet/laser/Laser0001.tscn"; + public const string prefab_ammo_Bullet0001_tscn = "res://prefab/ammo/Bullet0001.tscn"; + public const string prefab_ammo_Bullet0002_tscn = "res://prefab/ammo/Bullet0002.tscn"; + public const string prefab_ammo_Bullet0003_tscn = "res://prefab/ammo/Bullet0003.tscn"; + public const string prefab_ammo_laser_Laser0001_tscn = "res://prefab/ammo/laser/Laser0001.tscn"; public const string prefab_effect_Blood_tscn = "res://prefab/effect/Blood.tscn"; public const string prefab_effect_common_Effect1_tscn = "res://prefab/effect/common/Effect1.tscn"; public const string prefab_effect_enemy_Effect0001_tscn = "res://prefab/effect/enemy/Effect0001.tscn"; @@ -137,11 +137,12 @@ public const string resource_sound_sfx_shooting_Shooting0006_ogg = "res://resource/sound/sfx/shooting/Shooting0006.ogg"; public const string resource_sound_sfx_shooting_Shooting0007_ogg = "res://resource/sound/sfx/shooting/Shooting0007.ogg"; public const string resource_sound_sfx_shooting_Shooting0008_ogg = "res://resource/sound/sfx/shooting/Shooting0008.ogg"; - public const string resource_sprite_bullet_arrow_png = "res://resource/sprite/bullet/arrow.png"; - public const string resource_sprite_bullet_bullet0001_png = "res://resource/sprite/bullet/bullet0001.png"; - public const string resource_sprite_bullet_bullet0002_png = "res://resource/sprite/bullet/bullet0002.png"; - public const string resource_sprite_bullet_bullet0003_png = "res://resource/sprite/bullet/bullet0003.png"; - public const string resource_sprite_bullet_bullet2_png = "res://resource/sprite/bullet/bullet2.png"; + public const string resource_sprite_ammo_arrow_png = "res://resource/sprite/ammo/arrow.png"; + public const string resource_sprite_ammo_bullet0001_png = "res://resource/sprite/ammo/bullet0001.png"; + public const string resource_sprite_ammo_bullet0002_png = "res://resource/sprite/ammo/bullet0002.png"; + public const string resource_sprite_ammo_bullet0003_png = "res://resource/sprite/ammo/bullet0003.png"; + public const string resource_sprite_ammo_bullet2_png = "res://resource/sprite/ammo/bullet2.png"; + public const string resource_sprite_ammo_Laser0001_png = "res://resource/sprite/ammo/Laser0001.png"; public const string resource_sprite_effects_Circle_png = "res://resource/sprite/effects/Circle.png"; public const string resource_sprite_effects_debug_arrows_png = "res://resource/sprite/effects/debug_arrows.png"; public const string resource_sprite_effects_Explosion_png = "res://resource/sprite/effects/Explosion.png";