优化猫鼠追逐表现

This commit is contained in:
cakipaul 2025-06-29 23:18:47 +08:00
parent 4cabe3247d
commit 3ede841004
5 changed files with 23 additions and 5 deletions

View File

@ -99,7 +99,6 @@ mouse_filter = 2
[node name="PanelContainer" type="PanelContainer" parent="OSPivot/MarginContainer"]
unique_name_in_owner = true
modulate = Color(1, 1, 1, 0)
light_mask = 16
layout_mode = 2
size_flags_vertical = 8

View File

@ -69,6 +69,20 @@ func _on_ground_ready() -> void:
# 解除镜头 x 右侧限制
SceneManager.get_camera_marker().limit_right = 10000
#talk count
talk_count = 0
if standing_kid1.get_node("对话1ambush").played:
talk_count += 1
if standing_kid2.get_node("对话2ambush").played:
talk_count += 1
if game_kid.get_node("对话3ambush").played:
talk_count += 1
# 玩家不能超过开始跑的位置
var player = SceneManager.get_player() as MainPlayer
if player.position.x > 1800:
player.position.x = 1800
func _dean_flip_book() -> void:
if dean.animation == "院长呼吸":
@ -229,7 +243,6 @@ func obstacles_ambush3_triggered():
game_kid.sprite_frames.set_animation_loop("【胖小孩背着残疾小孩】摔倒", false)
game_kid.animation_finished.connect(_on_kid_fall_finished, CONNECT_ONE_SHOT)
# 残疾小孩冲刺
func _on_kid_fall_finished():
obstacles.get_node("遮盖").visible = true
@ -239,6 +252,11 @@ func _on_kid_fall_finished():
cat_shadow.play("【墙上小孩猫影子】变身")
# 启用失败 ambush 检测
cat_rat_game_fail_ambush.enabled = true
# cat_shadow 渐隐
var tween = create_tween()
tween.tween_interval(10.0)
tween.tween_property(cat_shadow, "modulate:a", 0.0, 4.0)
func _on_mid_ambush_success():

View File

@ -505,7 +505,6 @@ position = Vector2(2, 39)
sign_mark_offset = Vector2(0, -3.86)
trigger_mode = "interact"
cooldown_time = 1.0
lock_player_on_playing_dialogue = null
hook_dialogue_title = "c01_s06_四个小孩_对话2"
hook_method = "talk2"
@ -642,7 +641,7 @@ lock_player_on_playing_dialogue = null
hook_method = "game_succeed"
[node name="Fog" parent="Ground/DeployLayer/猫鼠游戏胜利ambush" instance=ExtResource("14_d5def")]
z_index = 10
z_index = 100
material = SubResource("ShaderMaterial_xf6rb")
position = Vector2(0, -93)
sprite_frames = SubResource("SpriteFrames_vduqs")

View File

@ -637,7 +637,8 @@ frame_progress = 0.298829
snap_to_edge = false
action_key = 3
sign_mark_height = 11.0
speaking_sign_height = 55.0
speaking_sign_height = 49.0
sign_x_offset = -2.0
collision_width_and_x = Vector2(37.08, 0)
dialogue_title = "c02_s11_井边疯子对话"

View File

@ -273,6 +273,7 @@ offset_left = -17.0
offset_top = 5.0
offset_right = -17.0
offset_bottom = 5.0
display_sign = true
[node name="CollisionShape2D" parent="Ground/DeployLayer/Ambush偷听/Area2D" index="0"]
shape = SubResource("RectangleShape2D_kwj7c")