mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-06 19:57:12 +08:00
feat: 重构角色和子弹系统,添加伤害标签和Boss状态条
This commit is contained in:
@@ -121,4 +121,9 @@ unique_name_in_owner = true
|
||||
shape = SubResource("RectangleShape2D_ce3to")
|
||||
|
||||
[node name="statebar" parent="." instance=ExtResource("2_uje1g")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -100)
|
||||
|
||||
[node name="damageAnchor" type="Node2D" parent="statebar"]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -20)
|
||||
|
||||
@@ -19,12 +19,12 @@ animations = [{
|
||||
|
||||
[node name="PurpleCrystal" instance=ExtResource("1_45mh7")]
|
||||
script = ExtResource("2_4lnlm")
|
||||
speed = 5.0
|
||||
lifeDistance = 700.0
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
position = Vector2(22, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_r86b3")
|
||||
|
||||
[node name="hitbox" parent="." index="1"]
|
||||
position = Vector2(12, 0)
|
||||
position = Vector2(36, 0)
|
||||
shape = SubResource("CircleShape2D_ty1as")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://b0ncrvm8u4pox"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://b0ncrvm8u4pox"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_goqmy"]
|
||||
[ext_resource type="Script" path="res://scripts/Contents/Characters/Chick.gd" id="2_r6bub"]
|
||||
[ext_resource type="Texture2D" uid="uid://7pkplcqqxvnp" path="res://resources/characters/chick/chick-a.svg" id="2_syddq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj5dvqb8gsedr" path="res://resources/characters/chick/chick-b.svg" id="3_064jv"]
|
||||
|
||||
@@ -26,11 +27,20 @@ animations = [{
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rn84j"]
|
||||
size = Vector2(19.5, 14)
|
||||
|
||||
[node name="Chick" instance=ExtResource("1_goqmy")]
|
||||
script = ExtResource("2_r6bub")
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
position = Vector2(0, -37)
|
||||
sprite_frames = SubResource("SpriteFrames_xji3d")
|
||||
animation = &"walk"
|
||||
|
||||
[node name="movebox" parent="." index="1"]
|
||||
shape = SubResource("RectangleShape2D_rn84j")
|
||||
|
||||
[node name="statebar" parent="." index="2" node_paths=PackedStringArray("entity")]
|
||||
position = Vector2(0, -82)
|
||||
entity = NodePath("..")
|
||||
|
||||
@@ -32,7 +32,6 @@ radius = 41.0122
|
||||
|
||||
[node name="Rooster" instance=ExtResource("1_e5pl8")]
|
||||
script = ExtResource("2_oqdqd")
|
||||
cooldownUnit = 200.0
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
position = Vector2(0, -70)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dfwg750a47ggx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ofpg5s3j7esv" path="res://components/UI/BossBar.tscn" id="1_2pe58"]
|
||||
[ext_resource type="Script" path="res://scripts/Statemachine/UIState.gd" id="1_f00a6"]
|
||||
|
||||
[node name="UI" type="CanvasLayer"]
|
||||
script = ExtResource("1_f00a6")
|
||||
|
||||
[node name="root" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="bossbar" parent="root" instance=ExtResource("1_2pe58")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
@@ -0,0 +1,27 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dmxi1ikn6avig"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Tools/WorldTool.gd" id="1_t2xvy"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfwg750a47ggx" path="res://components/Scenes/UI.tscn" id="2_04cdd"]
|
||||
[ext_resource type="PackedScene" uid="uid://bm7ymrri6pykb" path="res://components/Characters/Rooster.tscn" id="3_5ui6q"]
|
||||
[ext_resource type="PackedScene" uid="uid://b0ncrvm8u4pox" path="res://components/Characters/Chick.tscn" id="4_tnil0"]
|
||||
|
||||
[node name="world" type="Node2D"]
|
||||
script = ExtResource("1_t2xvy")
|
||||
|
||||
[node name="UI" parent="." instance=ExtResource("2_04cdd")]
|
||||
|
||||
[node name="rooster" parent="." groups=["players"] instance=ExtResource("3_5ui6q")]
|
||||
position = Vector2(394, 274)
|
||||
|
||||
[node name="chick" parent="." groups=["mobs"] instance=ExtResource("4_tnil0")]
|
||||
position = Vector2(644, 391)
|
||||
isBoss = true
|
||||
|
||||
[node name="Chick" parent="." instance=ExtResource("4_tnil0")]
|
||||
position = Vector2(261, 468)
|
||||
|
||||
[node name="Chick2" parent="." instance=ExtResource("4_tnil0")]
|
||||
position = Vector2(837, 492)
|
||||
|
||||
[node name="Chick3" parent="." instance=ExtResource("4_tnil0")]
|
||||
position = Vector2(897, 185)
|
||||
@@ -0,0 +1,27 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://ofpg5s3j7esv"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Statemachine/EntityStateBar.gd" id="1_q4vrr"]
|
||||
[ext_resource type="PackedScene" uid="uid://d1ulrvupa76ap" path="res://components/UI/ColorBar.tscn" id="1_uxey7"]
|
||||
|
||||
[node name="BossBar" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_q4vrr")
|
||||
|
||||
[node name="health" parent="." instance=ExtResource("1_uxey7")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.2
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.8
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -40.0
|
||||
offset_right = 0.0
|
||||
offset_bottom = -20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
@@ -0,0 +1,130 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://ccuucmpdsjgb3"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Statemachine/DamageLabel.gd" id="1_0q15u"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_valp2"]
|
||||
font_color = Color(1, 0, 0, 1)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_32dxy"]
|
||||
length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("anchor:position:y")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("anchor:scale:x")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/2/type = "bezier"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("anchor:scale:y")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/3/type = "bezier"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("anchor:modulate:r")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_8y66m"]
|
||||
resource_name = "show"
|
||||
step = 0.05
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("anchor:position:y")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0, 0),
|
||||
"points": PackedFloat32Array(20, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0, 20, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.25, 0.75, 1)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("anchor:scale:x")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0, 0),
|
||||
"points": PackedFloat32Array(1e-05, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 1e-05, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.25, 0.75, 1)
|
||||
}
|
||||
tracks/2/type = "bezier"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("anchor:scale:y")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0, 0),
|
||||
"points": PackedFloat32Array(1e-05, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 1e-05, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.25, 0.75, 1)
|
||||
}
|
||||
tracks/3/type = "bezier"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("anchor:modulate:a")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.25, 0.75, 1)
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8a1bh"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_32dxy"),
|
||||
"show": SubResource("Animation_8y66m")
|
||||
}
|
||||
|
||||
[node name="DamageLabel" type="Node2D"]
|
||||
script = ExtResource("1_0q15u")
|
||||
|
||||
[node name="anchor" type="Node2D" parent="."]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="label" type="Label" parent="anchor"]
|
||||
unique_name_in_owner = true
|
||||
offset_left = -100.0
|
||||
offset_top = -100.0
|
||||
offset_right = 100.0
|
||||
offset_bottom = 100.0
|
||||
text = "114514"
|
||||
label_settings = SubResource("LabelSettings_valp2")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="animator" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_8a1bh")
|
||||
}
|
||||
Reference in New Issue
Block a user