1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(角色): 为熊角色添加阶段转换功能

添加阶段转换系统,当熊的生命值低于50%时进入第二阶段
- 添加mask精灵用于阶段变化视觉效果
- 实现enterStage和exitStage方法处理阶段转换
- 添加stageAnimator处理转换动画
- 调整攻击7的音效播放位置
This commit is contained in:
2025-09-14 13:35:02 +08:00
parent 997d6d1fe8
commit 054baa4a71
4 changed files with 212 additions and 4 deletions
+60 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=26 format=3 uid="uid://m60bwhdpbem8"]
[gd_scene load_steps=30 format=3 uid="uid://m60bwhdpbem8"]
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_3ves7"]
[ext_resource type="Script" path="res://scripts/Contents/Characters/Bear.gd" id="2_kh2af"]
@@ -34,6 +34,58 @@ animations = [{
[sub_resource type="RectangleShape2D" id="RectangleShape2D_akdh6"]
size = Vector2(335, 344)
[sub_resource type="Animation" id="Animation_sxh2u"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(-1, 1)]
}
[sub_resource type="Animation" id="Animation_vxanw"]
resource_name = "left"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(-1, 1)]
}
[sub_resource type="Animation" id="Animation_nuh11"]
resource_name = "left"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_dwflo"]
_data = {
"RESET": SubResource("Animation_sxh2u"),
"left": SubResource("Animation_vxanw"),
"right": SubResource("Animation_nuh11")
}
[sub_resource type="Curve" id="Curve_u430e"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.2, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 3
@@ -125,6 +177,11 @@ visible = false
position = Vector2(-2.5, -1)
shape = SubResource("RectangleShape2D_akdh6")
[node name="animator" parent="texture" index="1"]
libraries = {
"": SubResource("AnimationLibrary_dwflo")
}
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
[node name="sprintParticle" type="GPUParticles2D" parent="texture" index="6"]
@@ -136,6 +193,8 @@ process_material = SubResource("ParticleProcessMaterial_5v3nj")
texture = ExtResource("13_v2sdb")
[node name="mask" type="Sprite2D" parent="texture" index="7"]
unique_name_in_owner = true
visible = false
material = SubResource("ShaderMaterial_6h05p")
texture = ExtResource("13_v2sdb")