新增藤蔓弹簧物件,Level1新增s10左侧三关;Level1初步完成
This commit is contained in:
parent
2c1ea309ef
commit
2d08a43d4c
|
|
@ -19,6 +19,8 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://d04rrja6xhmp4" path="res://_scene/level1/l1_s10_derivative/l1_s10_R3.tscn" id="17_ef7py"]
|
[ext_resource type="PackedScene" uid="uid://d04rrja6xhmp4" path="res://_scene/level1/l1_s10_derivative/l1_s10_R3.tscn" id="17_ef7py"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c681o3efaii8a" path="res://_scene/level1/l1_s10_derivative/l1_s10_R4.tscn" id="18_5vsgs"]
|
[ext_resource type="PackedScene" uid="uid://c681o3efaii8a" path="res://_scene/level1/l1_s10_derivative/l1_s10_R4.tscn" id="18_5vsgs"]
|
||||||
[ext_resource type="PackedScene" uid="uid://rkoopuv5ndr2" path="res://_scene/level1/l1_s10_derivative/l1_s10_L1.tscn" id="19_5ctuh"]
|
[ext_resource type="PackedScene" uid="uid://rkoopuv5ndr2" path="res://_scene/level1/l1_s10_derivative/l1_s10_L1.tscn" id="19_5ctuh"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bst6if5k6muxy" path="res://_scene/level1/l1_s10_derivative/l1_s10_L2.tscn" id="20_ns8iw"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cmqu6k42rd64d" path="res://_scene/level1/l1_s10_derivative/l1_s10_L3.tscn" id="21_n0kgp"]
|
||||||
|
|
||||||
[node name="Game" type="Node2D" unique_id=1155642617 groups=["PLAYER_RESPAWN"]]
|
[node name="Game" type="Node2D" unique_id=1155642617 groups=["PLAYER_RESPAWN"]]
|
||||||
script = ExtResource("1_yksyv")
|
script = ExtResource("1_yksyv")
|
||||||
|
|
@ -50,13 +52,16 @@ metadata/_edit_vertical_guides_ = [1074.0]
|
||||||
|
|
||||||
[node name="L1_S10" parent="." unique_id=99397381 instance=ExtResource("13_53pmm")]
|
[node name="L1_S10" parent="." unique_id=99397381 instance=ExtResource("13_53pmm")]
|
||||||
|
|
||||||
[node name="L1_S10_R1" parent="L1_S10" unique_id=845126004 instance=ExtResource("15_twc26")]
|
[node name="L1_S10_R1" parent="." unique_id=845126004 instance=ExtResource("15_twc26")]
|
||||||
|
|
||||||
[node name="L1_S10_R2" parent="L1_S10" unique_id=692644329 instance=ExtResource("16_jibn5")]
|
[node name="L1_S10_R2" parent="." unique_id=692644329 instance=ExtResource("16_jibn5")]
|
||||||
|
|
||||||
[node name="L1_S10_R3" parent="L1_S10" unique_id=2065908461 instance=ExtResource("17_ef7py")]
|
[node name="L1_S10_R3" parent="." unique_id=2065908461 instance=ExtResource("17_ef7py")]
|
||||||
|
|
||||||
[node name="L1_S10_R4" parent="L1_S10" unique_id=1329785958 instance=ExtResource("18_5vsgs")]
|
[node name="L1_S10_R4" parent="." unique_id=1329785958 instance=ExtResource("18_5vsgs")]
|
||||||
|
|
||||||
[node name="L1_S10_L1" parent="L1_S10" unique_id=1598546581 instance=ExtResource("19_5ctuh")]
|
[node name="L1_S10_L1" parent="." unique_id=1598546581 instance=ExtResource("19_5ctuh")]
|
||||||
position = Vector2(190, 78)
|
|
||||||
|
[node name="L1_S10_L2" parent="." unique_id=1168627092 instance=ExtResource("20_ns8iw")]
|
||||||
|
|
||||||
|
[node name="L1_S10_L3" parent="." unique_id=1755237319 instance=ExtResource("21_n0kgp")]
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,12 @@ func _ready() -> void:
|
||||||
#$L1_S8.switch_act_by_id(1)
|
#$L1_S8.switch_act_by_id(1)
|
||||||
#$L1_S9.switch_act_by_id(1)
|
#$L1_S9.switch_act_by_id(1)
|
||||||
#$L1_S10.switch_act_by_id(1)
|
#$L1_S10.switch_act_by_id(1)
|
||||||
$L1_S10/L1_S10_R1.switch_act_by_id(1)
|
#$L1_S10_R1.switch_act_by_id(1)
|
||||||
#$L1_S10/L1_S10_R2.switch_act_by_id(1)
|
#$L1_S10_R2.switch_act_by_id(1)
|
||||||
#$L1_S10/L1_S10_R3.switch_act_by_id(1)
|
#$L1_S10_R3.switch_act_by_id(1)
|
||||||
#$L1_S10/L1_S10_R4.switch_act_by_id(1)
|
#$L1_S10_R4.switch_act_by_id(1)
|
||||||
|
#$L1_S10_L1.switch_act_by_id(1)
|
||||||
|
|
||||||
GlobalEvent.player_follow_camera()
|
GlobalEvent.player_follow_camera()
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
get_tree().call_group(&"PLAYER_RESPAWN",&"respawn_avatar")
|
get_tree().call_group(&"PLAYER_RESPAWN",&"respawn_avatar")
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://d20u8tfktepxg"]
|
[gd_scene format=3 uid="uid://d20u8tfktepxg"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b7o5456qrwgbf" path="res://_props/_prefabs/collection/collection_prefab.gd" id="1_8ns1b"]
|
[ext_resource type="Script" uid="uid://b7o5456qrwgbf" path="res://_props/_prefabs/collection/collection_prefab.gd" id="1_8ns1b"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="2_qf7ju"]
|
||||||
|
|
||||||
[node name="CollectionPrefab" type="Area2D"]
|
[node name="CollectionPrefab" type="Area2D" unique_id=647938263]
|
||||||
collision_layer = 16
|
collision_layer = 16
|
||||||
collision_mask = 2
|
collision_mask = 2
|
||||||
script = ExtResource("1_8ns1b")
|
script = ExtResource("1_8ns1b")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=486383318]
|
||||||
|
scale = Vector2(0.2, 0.2)
|
||||||
|
texture = ExtResource("2_qf7ju")
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_scene format=3 uid="uid://dfwups0m7a5m4"]
|
[gd_scene format=3 uid="uid://dfwups0m7a5m4"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="1_a6xdh"]
|
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="1_a6xdh"]
|
||||||
[ext_resource type="Script" uid="uid://bog8pjjhrcd3g" path="res://_props/vine_platform/vine_platform.gd" id="1_jux4m"]
|
[ext_resource type="Script" uid="uid://bog8pjjhrcd3g" path="res://_props/_prefabs/vine_platform/vine_platform.gd" id="1_jux4m"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bonrls3iuhdqb" path="res://_props/_prefabs/player/player_trigger_volumn.tscn" id="2_1eb6k"]
|
[ext_resource type="PackedScene" uid="uid://bonrls3iuhdqb" path="res://_props/_prefabs/player/player_trigger_volumn.tscn" id="2_1eb6k"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1eb6k"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1eb6k"]
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://bju8jr1w4d60m"]
|
[gd_scene format=3 uid="uid://bju8jr1w4d60m"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="1_dd62g"]
|
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="1_dd62g"]
|
||||||
[ext_resource type="Script" uid="uid://cvrty667x12i6" path="res://_props/spring/spring.gd" id="1_mfmm2"]
|
[ext_resource type="Script" uid="uid://cvrty667x12i6" path="res://_props/spring/spring.gd" id="1_mfmm2"]
|
||||||
|
|
@ -6,16 +6,16 @@
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wsen7"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wsen7"]
|
||||||
size = Vector2(16, 16)
|
size = Vector2(16, 16)
|
||||||
|
|
||||||
[node name="spring" type="Area2D" groups=["GRAPABLE"]]
|
[node name="spring" type="Area2D" unique_id=470552845 groups=["GRAPABLE"]]
|
||||||
collision_layer = 4
|
collision_layer = 4
|
||||||
collision_mask = 2
|
collision_mask = 2
|
||||||
script = ExtResource("1_mfmm2")
|
script = ExtResource("1_mfmm2")
|
||||||
jump_speed = 1000.0
|
jump_speed = 1000.0
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=506922243]
|
||||||
position = Vector2(-2.3841858e-07, 0)
|
position = Vector2(-2.3841858e-07, 0)
|
||||||
scale = Vector2(0.12499999, 0.125)
|
scale = Vector2(0.12499999, 0.125)
|
||||||
texture = ExtResource("1_dd62g")
|
texture = ExtResource("1_dd62g")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=97358040]
|
||||||
shape = SubResource("RectangleShape2D_wsen7")
|
shape = SubResource("RectangleShape2D_wsen7")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://badmoya3nd161"]
|
[gd_scene format=3 uid="uid://badmoya3nd161"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dajlxaybacxxc" path="res://_props/trigger_fall_rock_climb/trigger_fall_rock_climb.gd" id="1_n6tyk"]
|
[ext_resource type="Script" uid="uid://dajlxaybacxxc" path="res://_props/trigger_fall_rock_climb/trigger_fall_rock_climb.gd" id="1_n6tyk"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cmjwk4gr1nfns" path="res://_props/_prefabs/rock.tscn" id="2_ibofv"]
|
[ext_resource type="PackedScene" uid="uid://cmjwk4gr1nfns" path="res://_props/_prefabs/rock.tscn" id="2_ibofv"]
|
||||||
|
|
@ -11,31 +11,31 @@ size = Vector2(52, 52)
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mvp6g"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mvp6g"]
|
||||||
size = Vector2(54, 52.5)
|
size = Vector2(54, 52.5)
|
||||||
|
|
||||||
[node name="TriggerFallRock_Climb" type="Node2D"]
|
[node name="TriggerFallRock_Climb" type="Node2D" unique_id=788823859]
|
||||||
|
scale = Vector2(0.9, 0.9)
|
||||||
script = ExtResource("1_n6tyk")
|
script = ExtResource("1_n6tyk")
|
||||||
|
|
||||||
[node name="rock" parent="." instance=ExtResource("2_ibofv")]
|
[node name="rock" parent="." unique_id=1121422701 instance=ExtResource("2_ibofv")]
|
||||||
position = Vector2(0, -74)
|
position = Vector2(0, -74)
|
||||||
falling_gravity = 600.0
|
falling_gravity = 600.0
|
||||||
max_fall_speed = 1500.0
|
max_fall_speed = 1500.0
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="rock"]
|
[node name="Sprite2D" type="Sprite2D" parent="rock" unique_id=2092021495]
|
||||||
position = Vector2(0, 73.99999)
|
position = Vector2(0, 73.99999)
|
||||||
scale = Vector2(0.405, 0.405)
|
scale = Vector2(0.405, 0.405)
|
||||||
texture = ExtResource("3_mb81t")
|
texture = ExtResource("3_mb81t")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="rock"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="rock" unique_id=2039714799]
|
||||||
position = Vector2(0, 74)
|
position = Vector2(0, 74)
|
||||||
shape = SubResource("RectangleShape2D_vv0hj")
|
shape = SubResource("RectangleShape2D_vv0hj")
|
||||||
debug_color = Color(0.99629647, 0, 0.19810504, 0.41960785)
|
debug_color = Color(0.99629647, 0, 0.19810504, 0.41960785)
|
||||||
|
|
||||||
[node name="PlayerTriggerVolumn" parent="." instance=ExtResource("4_txegh")]
|
[node name="PlayerTriggerVolumn" parent="." unique_id=296183028 instance=ExtResource("4_txegh")]
|
||||||
debug_print = true
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerTriggerVolumn"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerTriggerVolumn" unique_id=1068719796]
|
||||||
position = Vector2(0, -0.75)
|
position = Vector2(0, -0.75)
|
||||||
shape = SubResource("RectangleShape2D_mvp6g")
|
shape = SubResource("RectangleShape2D_mvp6g")
|
||||||
|
|
||||||
[node name="Timer" type="Timer" parent="."]
|
[node name="Timer" type="Timer" parent="." unique_id=1698795583]
|
||||||
wait_time = 0.8
|
wait_time = 0.8
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://knrcnoedxvm6"]
|
[gd_scene format=3 uid="uid://knrcnoedxvm6"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8yl6l3tlam86" path="res://_props/trigger_fall_rock_hazard/trigger_fall_rock_hazard.gd" id="1_2ms0f"]
|
[ext_resource type="Script" uid="uid://b8yl6l3tlam86" path="res://_props/trigger_fall_rock_hazard/trigger_fall_rock_hazard.gd" id="1_2ms0f"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cmjwk4gr1nfns" path="res://_props/_prefabs/rock.tscn" id="2_ww3ib"]
|
[ext_resource type="PackedScene" uid="uid://cmjwk4gr1nfns" path="res://_props/_prefabs/rock.tscn" id="2_ww3ib"]
|
||||||
|
|
@ -11,29 +11,30 @@ size = Vector2(52, 52)
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mvp6g"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mvp6g"]
|
||||||
size = Vector2(52, 108.5)
|
size = Vector2(52, 108.5)
|
||||||
|
|
||||||
[node name="TriggerFallRock_Hazard" type="Node2D" groups=["ROCK_BREAK"]]
|
[node name="TriggerFallRock_Hazard" type="Node2D" unique_id=248471 groups=["ROCK_BREAK"]]
|
||||||
|
scale = Vector2(0.9, 0.9)
|
||||||
script = ExtResource("1_2ms0f")
|
script = ExtResource("1_2ms0f")
|
||||||
|
|
||||||
[node name="rock" parent="." instance=ExtResource("2_ww3ib")]
|
[node name="rock" parent="." unique_id=1315018512 instance=ExtResource("2_ww3ib")]
|
||||||
position = Vector2(0, -82)
|
position = Vector2(0, -82)
|
||||||
falling_gravity = 600.0
|
falling_gravity = 600.0
|
||||||
max_fall_speed = 1000.0
|
max_fall_speed = 1000.0
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="rock"]
|
[node name="Sprite2D" type="Sprite2D" parent="rock" unique_id=947610890]
|
||||||
scale = Vector2(0.405, 0.405)
|
scale = Vector2(0.405, 0.405)
|
||||||
texture = ExtResource("3_f8vfu")
|
texture = ExtResource("3_f8vfu")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="rock"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="rock" unique_id=93634710]
|
||||||
shape = SubResource("RectangleShape2D_vv0hj")
|
shape = SubResource("RectangleShape2D_vv0hj")
|
||||||
debug_color = Color(0.99629647, 0, 0.19810504, 0.41960785)
|
debug_color = Color(0.99629647, 0, 0.19810504, 0.41960785)
|
||||||
|
|
||||||
[node name="PlayerTriggerVolumn" parent="." instance=ExtResource("4_s77mb")]
|
[node name="PlayerTriggerVolumn" parent="." unique_id=182002080 instance=ExtResource("4_s77mb")]
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerTriggerVolumn"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerTriggerVolumn" unique_id=821875896]
|
||||||
position = Vector2(0, -4)
|
position = Vector2(0, -4)
|
||||||
scale = Vector2(1, 1.92)
|
scale = Vector2(1, 1.92)
|
||||||
shape = SubResource("RectangleShape2D_mvp6g")
|
shape = SubResource("RectangleShape2D_mvp6g")
|
||||||
|
|
||||||
[node name="Timer" type="Timer" parent="."]
|
[node name="Timer" type="Timer" parent="." unique_id=130846245]
|
||||||
wait_time = 0.8
|
wait_time = 0.8
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
extends VinePlatform
|
||||||
|
|
||||||
|
@export var jump_speed: float = 600.0 # 向上的初速度
|
||||||
|
|
||||||
|
##跳跃声音特效
|
||||||
|
signal s_jump_sound
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
super._ready()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_player_entered(body: Node) -> void:
|
||||||
|
# 只处理 CharacterBody2D
|
||||||
|
if body is Player:
|
||||||
|
_trigger_platform()
|
||||||
|
# 给予垂直向上的速度
|
||||||
|
var dir := -global_transform.y.normalized()
|
||||||
|
body.velocity = dir * jump_speed
|
||||||
|
# 播放弹簧音效
|
||||||
|
on_ejection()
|
||||||
|
# 触发破碎机制
|
||||||
|
_trigger_platform()
|
||||||
|
|
||||||
|
|
||||||
|
func on_ejection() -> void:
|
||||||
|
# 播放弹簧音效
|
||||||
|
s_jump_sound.emit()
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bike0n5pc38qk
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
[gd_scene format=3 uid="uid://b188rk1rmyb2h"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bike0n5pc38qk" path="res://_props/vine_spring/vine_spring.gd" id="1_p0in6"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="2_c0rfy"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bonrls3iuhdqb" path="res://_props/_prefabs/player/player_trigger_volumn.tscn" id="3_ejnsy"]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1eb6k"]
|
||||||
|
size = Vector2(32, 16)
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1ul4y"]
|
||||||
|
size = Vector2(32, 24)
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jux4m"]
|
||||||
|
size = Vector2(38, 22)
|
||||||
|
|
||||||
|
[node name="VineSpring" type="StaticBody2D" unique_id=1779509136 groups=["GRAPABLE"]]
|
||||||
|
collision_layer = 4
|
||||||
|
collision_mask = 2
|
||||||
|
script = ExtResource("1_p0in6")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1586582263]
|
||||||
|
scale = Vector2(0.24999999, 0.125)
|
||||||
|
texture = ExtResource("2_c0rfy")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=314807201]
|
||||||
|
shape = SubResource("RectangleShape2D_1eb6k")
|
||||||
|
debug_color = Color(1, 0.24705882, 0.40784314, 0.41960785)
|
||||||
|
|
||||||
|
[node name="PlayerTriggerVolumn" parent="." unique_id=869831136 instance=ExtResource("3_ejnsy")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
debug_print = false
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerTriggerVolumn" unique_id=209979624]
|
||||||
|
position = Vector2(0, -4)
|
||||||
|
shape = SubResource("RectangleShape2D_1ul4y")
|
||||||
|
debug_color = Color(0.19215687, 0.6431373, 0, 0)
|
||||||
|
|
||||||
|
[node name="HookAttractVolumn" type="Area2D" parent="." unique_id=71519728]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
collision_layer = 32
|
||||||
|
collision_mask = 0
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="HookAttractVolumn" unique_id=1847255495]
|
||||||
|
shape = SubResource("RectangleShape2D_jux4m")
|
||||||
|
debug_color = Color(1, 0, 0.14509805, 0)
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue