Compare commits
4 Commits
e79786dc23
...
4c71cb01ca
Author | SHA1 | Date | |
---|---|---|---|
4c71cb01ca | |||
87d999a809 | |||
ff1e411b88 | |||
88f3c75314 |
@ -48,7 +48,7 @@ animations = [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_t7ytd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"duration": 0.3,
|
||||
"texture": ExtResource("2_xak3r")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
|
@ -84,7 +84,7 @@ ui_夜行船6,夜行船,,,,,Night Voyage
|
||||
prop_空手,空手,,,,,Empty hands
|
||||
prop_空手_说明,空空如也,,,,,Nothing at all
|
||||
prop_信碎片1,信碎片(一),,,[#texture=c01/信件左上.png],,Letter Fragment (I)
|
||||
prop_信碎片1_说明,(看不清)院长童玉君 民国二十一年十月十五日,,,,,"(Illegible) ...Director Tong Yujun, October 15th, Year 21 of the Republic"
|
||||
prop_信碎片1_说明,(看不清)院长童玉君 民国二十年十月十五日,,,,,"(Illegible) ...Director Tong Yujun, October 15th, Year 20 of the Republic"
|
||||
prop_信碎片2,信碎片(二),,,[#texture=c01/信件右上.png],,Letter Fragment (II)
|
||||
prop_信碎片2_说明,小萍:你现下境况如何?你虽离开浦育院已久,但我始终没有忘记为你祈祷。愿上帝(看不清),,,,,"Xiao Ping: How are you faring now? Though you left Puyu Orphanage long ago, I have never forgotten to pray for you. May God (illegible)..."
|
||||
prop_银元,银元,,,[#texture=c01/银元.png],,Silver Dollar
|
||||
@ -156,9 +156,9 @@ prop_新鲜的肉_说明,新鲜的肉说明,,,,,
|
||||
prop_符纸钥匙,符纸钥匙,,,[#texture=c03/符纸钥匙.png][#inspect=c03/ux_符纸钥匙.png],,
|
||||
prop_符纸钥匙_说明,符纸钥匙说明,,,,,
|
||||
prop_院长的信,院长的信,,,[#texture=c01/院长的信物品.png][#inspect=c01/院长的信.png],,Director's Letter
|
||||
prop_院长的信_说明,小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十一年十月十五日{br}公寓地址 芦昌路26弄3号,,,,,"Xiao Ping:{br}How are you faring now?{br}Though you left Puyu Orphanage long ago, I have never forgotten to pray for you.{br}May God bless you to walk the path of true enlightenment. I believe this was also your father's earnest wish when he entrusted you to my care.{br}Now that you are grown, regardless of whatever reasons your parents had for separating from you, you deserve the right to know the truth. I have attached the apartment address to this letter, though I know little beyond this.{br}If you have time, you are welcome to visit Puyu Orphanage.{br}Director Tong Yujun{br}October 15th, Year 21 of the Republic{br}Apartment Address: No. 3, Lane 26, Luchang Road"
|
||||
prop_院长的信_说明,小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十年十月十五日{br}公寓地址 芦昌路26弄3号,,,,,"Xiao Ping:{br}How are you faring now?{br}Though you left Puyu Orphanage long ago, I have never forgotten to pray for you.{br}May God bless you to walk the path of true enlightenment. I believe this was also your father's earnest wish when he entrusted you to my care.{br}Now that you are grown, regardless of whatever reasons your parents had for separating from you, you deserve the right to know the truth. I have attached the apartment address to this letter, though I know little beyond this.{br}If you have time, you are welcome to visit Puyu Orphanage.{br}Director Tong Yujun{br}October 15th, Year 20 of the Republic{br}Apartment Address: No. 3, Lane 26, Luchang Road"
|
||||
prop_船票,船票,,,[#texture=c02/船票.png],,Boat Ticket
|
||||
prop_船票_说明,民国二十一年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院?,,,,,"October 17th, Year 21 of the Republic{br}Shanghai-Nanjing-Jinan-Beiping-Linxi-Manzhouli{br}Third Class Berth 3-23{br}The ticket was booked long ago. I had given up all hope until the director replied to my letter. If I cannot find the truth tonight, I will take this ticket to the unknown and salvage answers devoured by time from the waves.{br}Who are my birth parents? Why did they send me to Puyu Orphanage?"
|
||||
prop_船票_说明,民国二十年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院?,,,,,"October 17th, Year 20 of the Republic{br}Shanghai-Nanjing-Jinan-Beiping-Linxi-Manzhouli{br}Third Class Berth 3-23{br}The ticket was booked long ago. I had given up all hope until the director replied to my letter. If I cannot find the truth tonight, I will take this ticket to the unknown and salvage answers devoured by time from the waves.{br}Who are my birth parents? Why did they send me to Puyu Orphanage?"
|
||||
prop_眼镜盒,眼镜盒,,,[#texture=c02/眼镜盒.png],,Glasses Case
|
||||
prop_眼镜盒_说明,这副眼镜对我很重要。{br}记得小时候在浦育院的日子,我经常会在半夜时听到奇怪的说话声,还时不时能看见其他小孩子看不见的东西。{br}院长不知从哪儿找来了这样一副眼镜,戴上它后那些怪事就很少发生。{br}随着年龄增长,我几乎已用不到这副眼镜。现在它对我来说似乎有了新的意义。,,,,,"These glasses are very important to me.{br}I remember during my childhood at Puyu Orphanage, I would often hear strange voices at midnight and sometimes see things other children couldn't see.{br}The director found these glasses somewhere. After wearing them, those strange occurrences rarely happened.{br}As I grew older, I hardly needed these glasses anymore. Now they seem to have taken on new meaning for me."
|
||||
prop_小蝉人偶,小蝉人偶,,,[#texture=c02/小蝉人偶.png],,Little Chan Doll
|
||||
|
|
@ -103,7 +103,7 @@
|
||||
# texture 路径从 "res://asset/art/prop/" 之后算起
|
||||
# c01
|
||||
信碎片(一) [#texture=c01/信件左上.png] [ID:prop_信碎片1]
|
||||
(看不清)院长童玉君 民国二十一年十月十五日 [ID:prop_信碎片1_说明]
|
||||
(看不清)院长童玉君 民国二十年十月十五日 [ID:prop_信碎片1_说明]
|
||||
信碎片(二) [#texture=c01/信件右上.png] [ID:prop_信碎片2]
|
||||
小萍:你现下境况如何?你虽离开浦育院已久,但我始终没有忘记为你祈祷。愿上帝(看不清) [ID:prop_信碎片2_说明]
|
||||
银元 [#texture=c01/银元.png] [ID:prop_银元]
|
||||
@ -191,10 +191,10 @@
|
||||
~ ImportantPropItems
|
||||
# c01
|
||||
院长的信 [#texture=c01/院长的信物品.png][#inspect=c01/院长的信.png] [ID:prop_院长的信]
|
||||
小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十一年十月十五日{br}公寓地址 芦昌路26弄3号 [ID:prop_院长的信_说明]
|
||||
小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十年十月十五日{br}公寓地址 芦昌路26弄3号 [ID:prop_院长的信_说明]
|
||||
# c02
|
||||
船票 [#texture=c02/船票.png] [ID:prop_船票]
|
||||
民国二十一年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院? [ID:prop_船票_说明]
|
||||
民国二十年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院? [ID:prop_船票_说明]
|
||||
眼镜盒 [#texture=c02/眼镜盒.png] [ID:prop_眼镜盒]
|
||||
这副眼镜对我很重要。{br}记得小时候在浦育院的日子,我经常会在半夜时听到奇怪的说话声,还时不时能看见其他小孩子看不见的东西。{br}院长不知从哪儿找来了这样一副眼镜,戴上它后那些怪事就很少发生。{br}随着年龄增长,我几乎已用不到这副眼镜。现在它对我来说似乎有了新的意义。[ID:prop_眼镜盒_说明]
|
||||
小蝉人偶[#texture=c02/小蝉人偶.png] [ID:prop_小蝉人偶]
|
||||
|
@ -46,6 +46,7 @@ metadata/_edit_vertical_guides_ = [-15.0, -3.0]
|
||||
[node name="PointLight2D" type="PointLight2D" parent="."]
|
||||
position = Vector2(0, -60)
|
||||
energy = 1.2
|
||||
range_layer_min = -10
|
||||
range_item_cull_mask = 15
|
||||
shadow_enabled = true
|
||||
texture = SubResource("GradientTexture2D_gk3xo")
|
||||
@ -55,6 +56,7 @@ height = 10.0
|
||||
[node name="CattyPointLight2D" type="PointLight2D" parent="."]
|
||||
position = Vector2(0, -60)
|
||||
energy = 0.0
|
||||
range_layer_min = -10
|
||||
range_item_cull_mask = 15
|
||||
shadow_enabled = true
|
||||
texture = SubResource("GradientTexture2D_e2i85")
|
||||
|
@ -192,7 +192,7 @@ var ANIMATION_CONFIG = {
|
||||
"scale": Vector2(1, 1),
|
||||
"speed_walking": 70.0,
|
||||
"can_run": true,
|
||||
"speed_runnig": 110.0,
|
||||
"speed_runnig": 150.0,
|
||||
"walk_footstep": 0.5,
|
||||
"run_footstep": 0.5,
|
||||
"os_height": 70.0,
|
||||
|
@ -71,9 +71,9 @@ func _ready() -> void:
|
||||
print("restarting: skip ground _ready()")
|
||||
return
|
||||
_validate_scene_name()
|
||||
_set_camera_and_player_boundary()
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
_set_camera_and_player_boundary()
|
||||
_setup_scene()
|
||||
_setup_runtime()
|
||||
_arrange_nodes_to_group(self)
|
||||
|
@ -1428,6 +1428,7 @@ action_configs = Array[Dictionary]([{
|
||||
move_configs = Array[Dictionary]([{
|
||||
"animation": "c03_胖子_拖小孩_走",
|
||||
"animation_next": "c03_胖子_托小孩_停",
|
||||
"duration": 1e+07,
|
||||
"movement_x": 450.0,
|
||||
"velocity": Vector2(80, 0)
|
||||
}])
|
||||
|
@ -350,7 +350,7 @@ note_key = "c03_s09_胖子干尸"
|
||||
position = Vector2(341, 45)
|
||||
stream = ExtResource("11_qr48f")
|
||||
volume_db = 10.0
|
||||
max_distance = 1000.0
|
||||
max_distance = 600.0
|
||||
attenuation = 2.0
|
||||
bus = &"game_sfx"
|
||||
script = ExtResource("10_htuhx")
|
||||
|
@ -4,7 +4,7 @@ extends AnimationRoot
|
||||
|
||||
# 覆盖该方法
|
||||
func _default_data() -> Dictionary:
|
||||
return {"has_entered": false}
|
||||
return {}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@ -14,35 +14,163 @@ func _ready() -> void:
|
||||
|
||||
|
||||
#region node_reference
|
||||
var sfx_meat_hill: Sfx
|
||||
var chop_timer: Timer
|
||||
var meat_hill: Node2D
|
||||
var monster: Node2D
|
||||
var monster_target: Node2D
|
||||
var range_of_stages := PackedVector2Array()
|
||||
#endregion
|
||||
|
||||
|
||||
# 读取设置变量名
|
||||
func _setup_node_reference() -> void:
|
||||
sfx_meat_hill = $"Sfx肉山掉落"
|
||||
chop_timer = $"../DeployLayer/ChopTimer"
|
||||
meat_hill = $"../DeployLayer/肉山Transform"
|
||||
monster = $"../CanvasLayer/胖子游戏棺材怪"
|
||||
monster_target = $"../DeployLayer/MonsterMoveTarget"
|
||||
range_of_stages.resize(3)
|
||||
range_of_stages[0].x = $"../DeployLayer/Start1".global_position.x
|
||||
range_of_stages[0].y = $"../DeployLayer/End1".global_position.x
|
||||
range_of_stages[1].x = $"../DeployLayer/Start2".global_position.x
|
||||
range_of_stages[1].y = $"../DeployLayer/End2".global_position.x
|
||||
range_of_stages[2].x = $"../DeployLayer/Start3".global_position.x
|
||||
range_of_stages[2].y = $"../DeployLayer/End3".global_position.x
|
||||
|
||||
|
||||
func _on_ground_ready() -> void:
|
||||
_check_first_enter()
|
||||
var right_x = SceneManager.get_player().player_movement_rect.size.x
|
||||
SceneManager.get_camera_marker().limit_right = int(right_x) + 50
|
||||
_run_game()
|
||||
_enter_scene()
|
||||
# 设置相机范围
|
||||
var player = SceneManager.get_player()
|
||||
var right_x = player.player_movement_rect.size.x
|
||||
var rect := Rect2i(0, -158, int(right_x) + 50, 316)
|
||||
SceneManager.get_camera_marker().apply_limits(rect)
|
||||
monster.before_restart.connect(_on_monster_restart)
|
||||
|
||||
|
||||
func _check_first_enter() -> void:
|
||||
if not data["has_entered"]:
|
||||
SceneManager.lock_player(0, 5, true)
|
||||
set_data("has_entered", true)
|
||||
SceneManager.pause_and_hide_player_sprite(1.5)
|
||||
await SceneManager.get_player().animation_finished
|
||||
SceneManager.unlock_player()
|
||||
|
||||
|
||||
# 0:初始化; 1:砍字; 2:隐藏_定点砍; 3:显现_动态砍; 4:隐藏_追踪砍;
|
||||
#0: 初始化; 1-3 三关
|
||||
var current_stage := 0
|
||||
var aiming_duration := 2.0
|
||||
|
||||
# 1.0s 一次
|
||||
func _on_chop_timer_timeout() -> void:
|
||||
# 限制在 range_of_stages 范围内
|
||||
var s_range = range_of_stages[current_stage - 1]
|
||||
var player = SceneManager.get_player()
|
||||
var player_pos = player.global_position
|
||||
if player_pos.x < s_range.x or player_pos.x > s_range.y:
|
||||
print("棺材怪 chop out of range, s_range=", s_range, "player_pos.x=", player_pos.x)
|
||||
return
|
||||
if current_stage == 1:
|
||||
# 第一关: 静态隐藏砍
|
||||
monster.chop_left(aiming_duration)
|
||||
# monster.chop_right(aiming_duration)
|
||||
elif current_stage == 2:
|
||||
monster.chop_right(aiming_duration)
|
||||
var next_x = player_pos.x + player.velocity.x * aiming_duration + randf_range(-20.0, 30.0)
|
||||
monster_target.global_position.x = clampf(next_x, s_range.x, s_range.y)
|
||||
await Util.wait(1.0)
|
||||
next_x = player_pos.x + player.velocity.x + randf_range(0.0, 100.0)
|
||||
monster_target.global_position.x = clampf(next_x, s_range.x, s_range.y)
|
||||
elif current_stage == 3:
|
||||
# 越来越快
|
||||
aiming_duration = clampf(aiming_duration - 0.2, 1.0, 3.0)
|
||||
chop_timer.wait_time = aiming_duration + 0.5
|
||||
monster.chop_right(aiming_duration)
|
||||
var next_x = player_pos.x + player.velocity.x * aiming_duration
|
||||
monster_target.global_position.x = clampf(next_x, s_range.x, s_range.y)
|
||||
await Util.wait(1.0)
|
||||
next_x = player_pos.x + player.velocity.x * aiming_duration + randf_range(-30.0, 50.0)
|
||||
monster_target.global_position.x = clampf(next_x, s_range.x, s_range.y)
|
||||
if GlobalConfig.DEBUG:
|
||||
print("棺材怪 chop next_x=", monster_target.global_position.x, "s_range=", s_range)
|
||||
|
||||
func drop_meat_hill_1() -> void:
|
||||
monster.hand_mode = 0
|
||||
var ambush = $"../DeployLayer/Ambush肉山1"
|
||||
ambush.enabled = false
|
||||
var x = ambush.global_position.x
|
||||
_drop_meat_hill(x)
|
||||
current_stage = 1
|
||||
monster_target.global_position.x = range_of_stages[0].x + 300.0
|
||||
monster.refresh_position()
|
||||
|
||||
|
||||
func drop_meat_hill_2() -> void:
|
||||
monster.hand_mode = 1
|
||||
var ambush = $"../DeployLayer/Ambush肉山2"
|
||||
ambush.enabled = false
|
||||
var x = ambush.global_position.x
|
||||
_drop_meat_hill(x)
|
||||
# 进入第二关: 动态显示砍
|
||||
monster.mute = false
|
||||
monster_target.global_position.x = range_of_stages[1].x + 300.0
|
||||
monster.refresh_position()
|
||||
var tween = create_tween()
|
||||
tween.tween_property(monster, "self_modulate:a", 1.0, 1.0)
|
||||
tween.tween_callback(func():
|
||||
current_stage = 2
|
||||
)
|
||||
|
||||
func drop_meat_hill_3() -> void:
|
||||
monster.hand_mode = 1
|
||||
var ambush = $"../DeployLayer/Ambush肉山3"
|
||||
ambush.enabled = false
|
||||
var x = ambush.global_position.x
|
||||
_drop_meat_hill(x)
|
||||
# 进入第三关: 动态隐藏砍
|
||||
# monster.mute = false
|
||||
var tween = create_tween()
|
||||
tween.tween_property(monster, "self_modulate:a", 0.0, 1.0)
|
||||
tween.tween_callback(func():
|
||||
monster_target.global_position.x = range_of_stages[2].x + 300.0
|
||||
monster.refresh_position()
|
||||
monster.MOVE_SPEED = 280.0
|
||||
monster.mute = true
|
||||
current_stage = 3
|
||||
)
|
||||
|
||||
|
||||
func _on_monster_restart() -> void:
|
||||
var ambush_node = get_node("../DeployLayer/Ambush肉山" + str(current_stage))
|
||||
ArchiveManager.archive.player_global_position_x = ambush_node.global_position.x - 50.0
|
||||
|
||||
|
||||
|
||||
# 天上掉肉
|
||||
func _drop_meat_hill(ambush_x: float) -> void:
|
||||
var camera = SceneManager.get_camera_marker()
|
||||
var tween = create_tween()
|
||||
var start_y = -200.0
|
||||
var target_y = SceneManager.get_player().global_position.y
|
||||
meat_hill.global_position = Vector2(ambush_x - 120.0, start_y)
|
||||
# 伪自由落体(2.0 s),从 start_y tween 到 target_y
|
||||
tween.tween_method(_drop.bind(start_y, target_y), 0.0, 1.0, 0.8)
|
||||
tween.tween_callback(sfx_meat_hill.play)
|
||||
tween.tween_callback(camera.shake_camera)
|
||||
|
||||
|
||||
func _drop(progress: float, start_y: float, target_y: float) -> void:
|
||||
# 伪自由落体(2.0 s),从 start_y tween 到 target_y
|
||||
# progress 先慢后快
|
||||
progress = progress * progress * progress
|
||||
var y = start_y + (target_y - start_y) * progress
|
||||
meat_hill.global_position.y = y
|
||||
|
||||
|
||||
func _enter_scene() -> void:
|
||||
var portal_x = $"../DeployLayer/portal_left".global_position.x
|
||||
var player_x = SceneManager.get_player().global_position.x
|
||||
if GlobalConfig.DEBUG and player_x > 100:
|
||||
return
|
||||
SceneManager.get_player().global_position.x = portal_x
|
||||
SceneManager.lock_player(0, 5, true)
|
||||
SceneManager.pause_and_hide_player_sprite(1.5)
|
||||
await SceneManager.get_player().animation_finished
|
||||
SceneManager.unlock_player()
|
||||
|
||||
|
||||
func _run_game() -> void:
|
||||
await Util.wait(2.0)
|
||||
|
@ -1,20 +1,24 @@
|
||||
[gd_scene load_steps=30 format=3 uid="uid://clgwc3jcqarpe"]
|
||||
[gd_scene load_steps=35 format=3 uid="uid://clgwc3jcqarpe"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_0c2p2"]
|
||||
[ext_resource type="Script" uid="uid://cs4ddcjq81c1d" path="res://scene/ground/scene/c03/s10_胖子游戏1.gd" id="2_tthij"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvc2emnfcmabx" path="res://asset/audio/sfx/环境音/白噪音/白噪声楼道1.ogg" id="3_7f2bb"]
|
||||
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="4_60xwi"]
|
||||
[ext_resource type="Texture2D" uid="uid://b22lmq2qtsmf1" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/最后的背景 循环贴图.png" id="5_a608f"]
|
||||
[ext_resource type="AudioStream" uid="uid://cv6aivf1jcvd3" path="res://asset/audio/mixkit/mixkit-meat-hit.ogg" id="5_ogxtw"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3bmukyjja1id" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/前景.png" id="6_hno1l"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd8vkws24b5vy" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉山后 可以和背景移动速度不一样 循环贴图.png" id="6_x0t6p"]
|
||||
[ext_resource type="Texture2D" uid="uid://dpt0s2ujvcjs5" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉山前 可以和背景移动速度不一样 循环贴图.png" id="7_8s7iq"]
|
||||
[ext_resource type="Texture2D" uid="uid://jimhy0dgkeoi" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/地面.png" id="8_2van8"]
|
||||
[ext_resource type="Texture2D" uid="uid://ditusmce10u83" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第二段/肉山.png" id="8_o5hrx"]
|
||||
[ext_resource type="Texture2D" uid="uid://bo3at7wmybm00" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第二段/肉山门遮挡.png" id="9_g6bno"]
|
||||
[ext_resource type="Script" uid="uid://d800iqh7jeqa" path="res://scene/ground/script/c03/胖子游戏棺材怪.gd" id="9_js8ld"]
|
||||
[ext_resource type="Texture2D" uid="uid://q3n7lw1ngoqh" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/遮罩 循环贴图.png" id="9_podki"]
|
||||
[ext_resource type="Script" uid="uid://wapo47a1oddf" path="res://scene/entity/audio/sfx2d.gd" id="10_f57cq"]
|
||||
[ext_resource type="AudioStream" uid="uid://b82bmxv4ehijj" path="res://asset/audio/effect/footstep/footstep_snow_002.ogg" id="10_js8ld"]
|
||||
[ext_resource type="Texture2D" uid="uid://da80qq8jl8mtp" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块1.png" id="10_pr5np"]
|
||||
[ext_resource type="Texture2D" uid="uid://bieyil13hhemh" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块2.png" id="11_3wrhx"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="11_lljm3"]
|
||||
[ext_resource type="Texture2D" uid="uid://g3ohxmylc316" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块3.png" id="12_jcaoy"]
|
||||
[ext_resource type="AudioStream" uid="uid://cxivq3ngkwauh" path="res://asset/audio/effect/action/chop.ogg" id="12_whxhi"]
|
||||
[ext_resource type="Texture2D" uid="uid://2hvfbno7wgjl" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块4.png" id="13_8ancs"]
|
||||
@ -36,6 +40,9 @@ height = 300.0
|
||||
radius = 15.0
|
||||
height = 293.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_lljm3"]
|
||||
radius = 74.0
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_f57cq"]
|
||||
playback_mode = 1
|
||||
random_pitch = 1.1
|
||||
@ -72,6 +79,12 @@ mode = "场景背景音"
|
||||
"感应玩家操作" = false
|
||||
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
|
||||
|
||||
[node name="Sfx肉山掉落" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="1"]
|
||||
stream = ExtResource("5_ogxtw")
|
||||
bus = &"game_sfx"
|
||||
script = ExtResource("4_60xwi")
|
||||
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
|
||||
|
||||
[node name="BGSprite2D" parent="Ground" index="2"]
|
||||
light_mask = 5
|
||||
offset = Vector2(0, -158)
|
||||
@ -88,10 +101,18 @@ texture = ExtResource("17_f57cq")
|
||||
position = Vector2(77, 11)
|
||||
|
||||
[node name="portal_right" parent="Ground/DeployLayer" index="1"]
|
||||
position = Vector2(8158, 7)
|
||||
position = Vector2(8170, 31)
|
||||
texture = ExtResource("8_o5hrx")
|
||||
offset = Vector2(65, -59)
|
||||
sign_mark_offset = Vector2(0, -28.54)
|
||||
target_scene = "c03_s11"
|
||||
target_portal = "left"
|
||||
|
||||
[node name="遮挡" type="Sprite2D" parent="Ground/DeployLayer/portal_right" index="8"]
|
||||
z_index = 10
|
||||
position = Vector2(17.5, -8)
|
||||
texture = ExtResource("9_g6bno")
|
||||
|
||||
[node name="胖子的母亲" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="2"]
|
||||
position = Vector2(613, 32)
|
||||
sprite_frames = ExtResource("18_f57cq")
|
||||
@ -99,12 +120,12 @@ animation = &"胖子的母亲"
|
||||
autoplay = "胖子的母亲"
|
||||
|
||||
[node name="落点左" type="Sprite2D" parent="Ground/DeployLayer" index="3"]
|
||||
position = Vector2(501, 98)
|
||||
position = Vector2(1582, 98)
|
||||
scale = Vector2(1e-05, 1e-05)
|
||||
texture = ExtResource("18_js8ld")
|
||||
|
||||
[node name="左侧手" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="4"]
|
||||
position = Vector2(501, -317)
|
||||
position = Vector2(1582, -317)
|
||||
sprite_frames = ExtResource("16_f57cq")
|
||||
animation = &"左手砍"
|
||||
offset = Vector2(-11, -13)
|
||||
@ -129,12 +150,12 @@ shape = SubResource("CapsuleShape2D_whxhi")
|
||||
disabled = true
|
||||
|
||||
[node name="落点右" type="Sprite2D" parent="Ground/DeployLayer" index="5"]
|
||||
position = Vector2(1077, 98)
|
||||
position = Vector2(2158, 98)
|
||||
scale = Vector2(1e-05, 1e-05)
|
||||
texture = ExtResource("20_whxhi")
|
||||
|
||||
[node name="右侧手" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="6"]
|
||||
position = Vector2(1077, -317)
|
||||
position = Vector2(2158, -317)
|
||||
sprite_frames = ExtResource("16_f57cq")
|
||||
animation = &"右手砍"
|
||||
offset = Vector2(9, -12)
|
||||
@ -159,7 +180,84 @@ shape = SubResource("CapsuleShape2D_whxhi")
|
||||
disabled = true
|
||||
|
||||
[node name="MonsterMoveTarget" type="Marker2D" parent="Ground/DeployLayer" index="7"]
|
||||
position = Vector2(1401, 7)
|
||||
position = Vector2(1646, -1)
|
||||
|
||||
[node name="肉山" type="AnimatableBody2D" parent="Ground/DeployLayer" index="8"]
|
||||
position = Vector2(162, -421)
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
|
||||
[node name="天上掉的肉4" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(2.53979, -89.2959)
|
||||
rotation = 0.307938
|
||||
texture = ExtResource("13_8ancs")
|
||||
|
||||
[node name="天上掉的肉5" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(-27.4602, -67.2959)
|
||||
rotation = -0.370446
|
||||
texture = ExtResource("11_3wrhx")
|
||||
|
||||
[node name="天上掉的肉" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(14.5398, -56.2959)
|
||||
rotation = 0.138633
|
||||
texture = ExtResource("11_3wrhx")
|
||||
|
||||
[node name="天上掉的肉2" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(-43.4602, -32.2959)
|
||||
rotation = -0.384091
|
||||
texture = ExtResource("14_bm1fy")
|
||||
|
||||
[node name="天上掉的肉3" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(-4.54016, -19.4051)
|
||||
rotation = 0.0182861
|
||||
texture = ExtResource("12_jcaoy")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(-6, -38)
|
||||
shape = SubResource("CircleShape2D_lljm3")
|
||||
|
||||
[node name="肉山Transform" type="RemoteTransform2D" parent="Ground/DeployLayer" index="9"]
|
||||
position = Vector2(162, -421)
|
||||
remote_path = NodePath("../肉山")
|
||||
update_rotation = false
|
||||
update_scale = false
|
||||
|
||||
[node name="Ambush肉山1" parent="Ground/DeployLayer" index="10" instance=ExtResource("11_lljm3")]
|
||||
position = Vector2(1238, -3)
|
||||
one_shot = false
|
||||
hook_method = "drop_meat_hill_1"
|
||||
|
||||
[node name="Start1" type="Marker2D" parent="Ground/DeployLayer" index="11"]
|
||||
position = Vector2(1261, -2)
|
||||
|
||||
[node name="End1" type="Marker2D" parent="Ground/DeployLayer" index="12"]
|
||||
position = Vector2(1926, -3)
|
||||
|
||||
[node name="Ambush肉山2" parent="Ground/DeployLayer" index="13" instance=ExtResource("11_lljm3")]
|
||||
position = Vector2(2078, -8)
|
||||
one_shot = false
|
||||
hook_method = "drop_meat_hill_2"
|
||||
|
||||
[node name="Start2" type="Marker2D" parent="Ground/DeployLayer" index="14"]
|
||||
position = Vector2(2145, -11)
|
||||
|
||||
[node name="End2" type="Marker2D" parent="Ground/DeployLayer" index="15"]
|
||||
position = Vector2(4128, -16)
|
||||
|
||||
[node name="Ambush肉山3" parent="Ground/DeployLayer" index="16" instance=ExtResource("11_lljm3")]
|
||||
position = Vector2(4337, -13)
|
||||
one_shot = false
|
||||
hook_method = "drop_meat_hill_3"
|
||||
|
||||
[node name="Start3" type="Marker2D" parent="Ground/DeployLayer" index="17"]
|
||||
position = Vector2(4562, -10)
|
||||
|
||||
[node name="End3" type="Marker2D" parent="Ground/DeployLayer" index="18"]
|
||||
position = Vector2(7820, -14)
|
||||
|
||||
[node name="ChopTimer" type="Timer" parent="Ground/DeployLayer" index="19"]
|
||||
wait_time = 2.0
|
||||
autostart = true
|
||||
|
||||
[node name="MainPlayer" parent="Ground" index="5"]
|
||||
position = Vector2(396, 98)
|
||||
@ -227,11 +325,13 @@ layer = -2
|
||||
follow_viewport_enabled = true
|
||||
|
||||
[node name="胖子游戏棺材怪" type="AnimatedSprite2D" parent="Ground/CanvasLayer" node_paths=PackedStringArray("move_target", "left_side_sprite", "right_side_sprite", "left_area", "right_area", "left_static_collision", "right_static_collision")]
|
||||
self_modulate = Color(1, 1, 1, 0)
|
||||
z_index = -1
|
||||
position = Vector2(809, -17)
|
||||
position = Vector2(1890, -17)
|
||||
sprite_frames = ExtResource("16_f57cq")
|
||||
animation = &"棺材怪右砍"
|
||||
script = ExtResource("9_js8ld")
|
||||
mute = true
|
||||
move_target = NodePath("../../DeployLayer/MonsterMoveTarget")
|
||||
left_side_sprite = NodePath("../../DeployLayer/左侧手")
|
||||
right_side_sprite = NodePath("../../DeployLayer/右侧手")
|
||||
@ -327,4 +427,6 @@ texture = ExtResource("13_8ancs")
|
||||
position = Vector2(724, -47)
|
||||
texture = ExtResource("14_bm1fy")
|
||||
|
||||
[connection signal="timeout" from="Ground/DeployLayer/ChopTimer" to="Ground/AnimationPlayer" method="_on_chop_timer_timeout"]
|
||||
|
||||
[editable path="Ground"]
|
||||
|
@ -22,14 +22,19 @@ func _setup_node_reference() -> void:
|
||||
pass
|
||||
|
||||
func _on_ground_ready() -> void:
|
||||
pass
|
||||
# 设置相机范围
|
||||
var player = SceneManager.get_player()
|
||||
var right_x = player.player_movement_rect.size.x
|
||||
var rect := Rect2i(0, -158, int(right_x) + 320, 316)
|
||||
SceneManager.get_camera_marker().apply_limits(rect)
|
||||
|
||||
|
||||
func eat_meat() -> void:
|
||||
var light_pivot = $"../DeployLayer/LightPivot"
|
||||
SceneManager.lock_player()
|
||||
$"../DeployLayer/Ambush吃肉".enabled = false
|
||||
await SceneManager.get_player().walk_to_x(850.0).finished
|
||||
var x = $"../DeployLayer/Pro吃肉".global_position.x
|
||||
await SceneManager.get_player().walk_to_x(x).finished
|
||||
# 第一帧没有瘦子,后面才有
|
||||
var player = SceneManager.get_player() as MainPlayer
|
||||
player.reparent_light(light_pivot)
|
||||
@ -41,3 +46,6 @@ func eat_meat() -> void:
|
||||
SceneManager.get_ground_loader().transition_to_scene("c03_s07", "2")
|
||||
|
||||
|
||||
func collapse() -> void:
|
||||
$"../DeployLayer/Ambush小孩山塌了".enabled = false
|
||||
|
||||
|
@ -1,13 +1,22 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://cxabqg87g4vxc"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://cxabqg87g4vxc"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_ly8ge"]
|
||||
[ext_resource type="Script" uid="uid://f4uampm47832" path="res://scene/ground/scene/c03/s12_胖子游戏3.gd" id="2_c01lu"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvc2emnfcmabx" path="res://asset/audio/sfx/环境音/白噪音/白噪声楼道1.ogg" id="3_h404e"]
|
||||
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="4_fjio5"]
|
||||
[ext_resource type="Texture2D" uid="uid://brfbsaw6v35ru" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第四段/胖子游戏第四段效果/0.png" id="6_y18rp"]
|
||||
[ext_resource type="Texture2D" uid="uid://jimhy0dgkeoi" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/地面.png" id="9_fjio5"]
|
||||
[ext_resource type="Texture2D" uid="uid://b22lmq2qtsmf1" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/最后的背景 循环贴图.png" id="9_mr0pm"]
|
||||
[ext_resource type="Script" uid="uid://cphfob11f7atx" path="res://addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.gd" id="9_vyyx8"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://cb3b44a1jpybb" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第四段/c03_胖子游戏第四段_frames.tres" id="10_7x1vi"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd8vkws24b5vy" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉山后 可以和背景移动速度不一样 循环贴图.png" id="10_47wdn"]
|
||||
[ext_resource type="Texture2D" uid="uid://q3n7lw1ngoqh" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/遮罩 循环贴图.png" id="10_bi3i1"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="11_sul0a"]
|
||||
[ext_resource type="Texture2D" uid="uid://dpt0s2ujvcjs5" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉山前 可以和背景移动速度不一样 循环贴图.png" id="11_vyyx8"]
|
||||
[ext_resource type="Texture2D" uid="uid://da80qq8jl8mtp" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块1.png" id="11_y18rp"]
|
||||
[ext_resource type="Texture2D" uid="uid://bieyil13hhemh" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块2.png" id="12_mr0pm"]
|
||||
[ext_resource type="Texture2D" uid="uid://g3ohxmylc316" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块3.png" id="13_47wdn"]
|
||||
[ext_resource type="Texture2D" uid="uid://2hvfbno7wgjl" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块4.png" id="14_vyyx8"]
|
||||
[ext_resource type="Texture2D" uid="uid://85unc5qju4kl" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块5.png" id="15_7x1vi"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ay855"]
|
||||
length = 0.001
|
||||
@ -123,31 +132,46 @@ metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
|
||||
|
||||
[node name="BGSprite2D" parent="Ground" index="2"]
|
||||
light_mask = 5
|
||||
texture = ExtResource("6_y18rp")
|
||||
position = Vector2(2797, 0)
|
||||
offset = Vector2(0, -158)
|
||||
|
||||
[node name="portal_left" parent="Ground/DeployLayer" index="0"]
|
||||
position = Vector2(69, 21)
|
||||
|
||||
[node name="portal_right" parent="Ground/DeployLayer" index="1"]
|
||||
position = Vector2(1392, -9)
|
||||
position = Vector2(4013, -30)
|
||||
|
||||
[node name="Pro吃肉" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="2"]
|
||||
position = Vector2(850, 95)
|
||||
position = Vector2(3647, 95)
|
||||
sprite_frames = ExtResource("10_7x1vi")
|
||||
animation = &"爬绞肉机最终的"
|
||||
offset = Vector2(88, -105)
|
||||
script = ExtResource("9_vyyx8")
|
||||
autostart = false
|
||||
metadata/_custom_type_script = "uid://cphfob11f7atx"
|
||||
|
||||
[node name="Ambush吃肉" parent="Ground/DeployLayer" index="3" instance=ExtResource("11_sul0a")]
|
||||
position = Vector2(842, 54)
|
||||
position = Vector2(3639, 54)
|
||||
sign_mark_offset = Vector2(39, -9)
|
||||
trigger_mode = "interact"
|
||||
one_shot = false
|
||||
hook_method = "eat_meat"
|
||||
|
||||
[node name="LightPivot" type="Marker2D" parent="Ground/DeployLayer" index="4"]
|
||||
[node name="小孩山塌了" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="4"]
|
||||
position = Vector2(2687, -2)
|
||||
sprite_frames = ExtResource("10_7x1vi")
|
||||
animation = &"小孩山塌了"
|
||||
script = ExtResource("9_vyyx8")
|
||||
autostart = false
|
||||
metadata/_custom_type_script = "uid://cphfob11f7atx"
|
||||
|
||||
[node name="Ambush小孩山塌了" parent="Ground/DeployLayer" index="5" instance=ExtResource("11_sul0a")]
|
||||
position = Vector2(2715, 55)
|
||||
sign_mark_offset = Vector2(39, -9)
|
||||
one_shot = false
|
||||
hook_method = "collapse"
|
||||
|
||||
[node name="LightPivot" type="Marker2D" parent="Ground/DeployLayer" index="6"]
|
||||
position = Vector2(850, 95)
|
||||
|
||||
[node name="MainPlayer" parent="Ground" index="5"]
|
||||
@ -163,11 +187,76 @@ limit_right = 1200
|
||||
offset = Vector2(0, 50)
|
||||
|
||||
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
|
||||
points = PackedVector2Array(30, 150, 850, 151)
|
||||
points = PackedVector2Array(30, 150, 3647, 151)
|
||||
|
||||
[node name="DirectionalLight2D" parent="Ground" index="8"]
|
||||
visible = false
|
||||
energy = 0.6
|
||||
blend_mode = 1
|
||||
range_layer_min = -10
|
||||
range_layer_max = 10
|
||||
|
||||
[node name="ParallaxBackground" type="ParallaxBackground" parent="Ground"]
|
||||
layer = -3
|
||||
|
||||
[node name="底图" type="ParallaxLayer" parent="Ground/ParallaxBackground"]
|
||||
z_index = -10
|
||||
motion_scale = Vector2(0.3, 1)
|
||||
motion_mirroring = Vector2(1200, 0)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Ground/ParallaxBackground/底图"]
|
||||
texture = ExtResource("9_mr0pm")
|
||||
|
||||
[node name="后山" type="ParallaxLayer" parent="Ground/ParallaxBackground"]
|
||||
z_index = -10
|
||||
motion_scale = Vector2(0.5, 1)
|
||||
motion_mirroring = Vector2(1134, 0)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Ground/ParallaxBackground/后山"]
|
||||
texture = ExtResource("10_47wdn")
|
||||
|
||||
[node name="前山" type="ParallaxLayer" parent="Ground/ParallaxBackground"]
|
||||
z_index = -10
|
||||
position = Vector2(0, 16)
|
||||
motion_scale = Vector2(0.8, 1)
|
||||
motion_mirroring = Vector2(1200, 0)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Ground/ParallaxBackground/前山"]
|
||||
texture = ExtResource("11_vyyx8")
|
||||
|
||||
[node name="ParallaxBackground2" type="ParallaxBackground" parent="Ground"]
|
||||
layer = -1
|
||||
|
||||
[node name="地面" type="ParallaxLayer" parent="Ground/ParallaxBackground2"]
|
||||
position = Vector2(0, 101)
|
||||
motion_mirroring = Vector2(1200, 0)
|
||||
|
||||
[node name="地面" type="Sprite2D" parent="Ground/ParallaxBackground2/地面"]
|
||||
texture = ExtResource("9_fjio5")
|
||||
|
||||
[node name="遮罩" type="Sprite2D" parent="Ground/ParallaxBackground2/地面"]
|
||||
modulate = Color(0.14902, 0.14902, 0.14902, 0.533333)
|
||||
position = Vector2(0, -101)
|
||||
texture = ExtResource("10_bi3i1")
|
||||
|
||||
[node name="肉1" type="Sprite2D" parent="Ground/ParallaxBackground2/地面"]
|
||||
position = Vector2(-143, -48)
|
||||
texture = ExtResource("11_y18rp")
|
||||
|
||||
[node name="肉2" type="Sprite2D" parent="Ground/ParallaxBackground2/地面"]
|
||||
position = Vector2(0, -49)
|
||||
texture = ExtResource("12_mr0pm")
|
||||
|
||||
[node name="肉3" type="Sprite2D" parent="Ground/ParallaxBackground2/地面"]
|
||||
position = Vector2(449, -57)
|
||||
texture = ExtResource("13_47wdn")
|
||||
|
||||
[node name="肉4" type="Sprite2D" parent="Ground/ParallaxBackground2/地面"]
|
||||
position = Vector2(153, -46)
|
||||
texture = ExtResource("14_vyyx8")
|
||||
|
||||
[node name="肉5" type="Sprite2D" parent="Ground/ParallaxBackground2/地面"]
|
||||
position = Vector2(724, -47)
|
||||
texture = ExtResource("15_7x1vi")
|
||||
|
||||
[editable path="Ground"]
|
||||
|
@ -39,12 +39,17 @@ func _ready() -> void:
|
||||
|
||||
|
||||
var rotationg_steps := 0
|
||||
var last_step_msec := 0
|
||||
const TOTAL_STEPS = 6 * 3 # 转 3 圈
|
||||
|
||||
|
||||
func _on_wheel_rotated(_radiant: float) -> void:
|
||||
if rotationg_steps >= TOTAL_STEPS:
|
||||
return
|
||||
var time = Time.get_ticks_msec()
|
||||
if time - last_step_msec < 200:
|
||||
return
|
||||
last_step_msec = time
|
||||
if not wheel_sfx.playing:
|
||||
wheel_sfx.play()
|
||||
rotationg_steps += 1
|
||||
|
@ -1,6 +1,8 @@
|
||||
extends AnimatedSprite2D
|
||||
|
||||
const MOVE_SPEED := 120.0
|
||||
signal before_restart
|
||||
|
||||
var MOVE_SPEED := 180.0
|
||||
const RESET_Y := -300.0
|
||||
|
||||
@export var mute := false:
|
||||
@ -27,6 +29,7 @@ const RESET_Y := -300.0
|
||||
var left_hand_x_offset: float
|
||||
var right_hand_x_offset: float
|
||||
var chopped_safe_period := false
|
||||
var finished := false
|
||||
|
||||
func _ready() -> void:
|
||||
left_hand_x_offset = remote_left_shadow.position.x
|
||||
@ -46,18 +49,28 @@ func _on_mute_updated() -> void:
|
||||
|
||||
|
||||
# 停止切肉动作, x 对齐到 move_target
|
||||
func refresh_monster() -> void:
|
||||
global_position.x = move_target.global_position.x
|
||||
func refresh_position() -> void:
|
||||
var target_x = move_target.global_position.x
|
||||
if hand_mode == 0:
|
||||
target_x -= left_hand_x_offset
|
||||
else:
|
||||
target_x -= right_hand_x_offset
|
||||
global_position.x = target_x
|
||||
remote_right_side.position.y = RESET_Y
|
||||
remote_left_side.position.y = RESET_Y
|
||||
remote_left_shadow.scale = Vector2.ZERO
|
||||
remote_right_shadow.scale = Vector2.ZERO
|
||||
|
||||
var aiming := false
|
||||
|
||||
func chop_left(aiming_duration := 3.0) -> void:
|
||||
var aiming := 0
|
||||
const AIMING_DURATION := 2.0
|
||||
|
||||
|
||||
func chop_left(aiming_duration := AIMING_DURATION) -> void:
|
||||
if aiming:
|
||||
return
|
||||
hand_mode = 0
|
||||
aiming = true
|
||||
aiming += 1
|
||||
_checkout_hand_animation(false)
|
||||
var tween = create_tween()
|
||||
if aiming_duration > 0.0:
|
||||
@ -65,19 +78,22 @@ func chop_left(aiming_duration := 3.0) -> void:
|
||||
tween.tween_callback(left_side_sprite.play)
|
||||
tween.tween_property(remote_left_side, "position:y", 0.0, 0.2)
|
||||
if aiming_duration <= 0.0:
|
||||
tween.parallel().tween_property(remote_left_shadow, "scale", Vector2.ONE, 0.2)
|
||||
tween.parallel().tween_property(remote_left_shadow, "scale", Vector2.ONE, 0.3)
|
||||
tween.tween_callback(chop_sfx.play)
|
||||
tween.tween_callback(toggle_safe_period.bind(true))
|
||||
tween.tween_callback(shake)
|
||||
tween.tween_interval(1.0)
|
||||
tween.tween_property(remote_left_side, "position:y", RESET_Y, 1.0)
|
||||
tween.parallel().tween_property(remote_left_shadow, "scale", Vector2.ZERO, 0.8)
|
||||
tween.tween_callback(func(): aiming -= 1)
|
||||
tween.tween_interval(0.1)
|
||||
tween.tween_property(remote_left_shadow, "scale", Vector2.ZERO, 0.4)
|
||||
tween.parallel().tween_property(remote_left_side, "position:y", RESET_Y, 0.5)
|
||||
tween.tween_callback(toggle_safe_period.bind(false))
|
||||
tween.tween_callback(func(): aiming = false)
|
||||
|
||||
func chop_right(aiming_duration := 3.0) -> void:
|
||||
|
||||
func chop_right(aiming_duration := AIMING_DURATION) -> void:
|
||||
if aiming:
|
||||
return
|
||||
hand_mode = 1
|
||||
aiming = true
|
||||
aiming += 1
|
||||
_checkout_hand_animation(false)
|
||||
var tween = create_tween()
|
||||
if aiming_duration > 0.0:
|
||||
@ -85,15 +101,15 @@ func chop_right(aiming_duration := 3.0) -> void:
|
||||
tween.tween_callback(right_side_sprite.play)
|
||||
tween.tween_property(remote_right_side, "position:y", 0.0, 0.2)
|
||||
if aiming_duration <= 0.0:
|
||||
tween.parallel().tween_property(remote_right_shadow, "scale", Vector2.ONE, 0.2)
|
||||
tween.parallel().tween_property(remote_right_shadow, "scale", Vector2.ONE, 0.3)
|
||||
tween.tween_callback(chop_sfx.play)
|
||||
tween.tween_callback(toggle_safe_period.bind(true))
|
||||
tween.tween_callback(shake)
|
||||
tween.tween_interval(1.0)
|
||||
tween.tween_property(remote_right_side, "position:y", RESET_Y, 1.0)
|
||||
tween.parallel().tween_property(remote_right_shadow, "scale", Vector2.ZERO, 0.8)
|
||||
tween.tween_callback(func(): aiming -= 1)
|
||||
tween.tween_interval(0.1)
|
||||
tween.tween_property(remote_right_shadow, "scale", Vector2.ZERO, 0.4)
|
||||
tween.parallel().tween_property(remote_right_side, "position:y", RESET_Y, 0.5)
|
||||
tween.tween_callback(toggle_safe_period.bind(false))
|
||||
tween.tween_callback(func(): aiming = false)
|
||||
|
||||
|
||||
func toggle_safe_period(safe: bool) -> void:
|
||||
@ -109,10 +125,14 @@ func shake() -> void:
|
||||
func _on_player_chopped(_body) -> void:
|
||||
if chopped_safe_period:
|
||||
return
|
||||
if finished:
|
||||
return
|
||||
finished = true
|
||||
SceneManager.lock_player()
|
||||
await SceneManager.player_action(7)
|
||||
await Util.wait(1.0)
|
||||
SceneManager.unlock_player()
|
||||
before_restart.emit()
|
||||
# restart
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
@ -130,8 +150,8 @@ func _physics_process(delta: float) -> void:
|
||||
footstep_sfx.stop()
|
||||
else:
|
||||
var speed = MOVE_SPEED
|
||||
if aiming:
|
||||
speed *= 0.3
|
||||
# if aiming:
|
||||
# speed *= 0.6
|
||||
global_position.x = move_toward(x, target_x, delta * speed)
|
||||
# if Time.get_ticks_msec() % 100 == 0:
|
||||
# prints(x, target_x)
|
||||
|
Loading…
Reference in New Issue
Block a user