新增物件-易碎矿块;Lv1 s7-10微调;攀爬落石优化
This commit is contained in:
parent
b1fa8edf53
commit
4f109c218b
|
|
@ -5,10 +5,10 @@ func _ready() -> void:
|
|||
#$L1_S1.switch_act_by_id(1)
|
||||
#$L1_S2.switch_act_by_id(1)
|
||||
#$L1_S3.switch_act_by_id(1)
|
||||
$L1_S4.switch_act_by_id(1)
|
||||
#$L1_S4.switch_act_by_id(1)
|
||||
#$L1_S5.switch_act_by_id(1)
|
||||
#$L1_S6.switch_act_by_id(1)
|
||||
#$L1_S7.switch_act_by_id(1)
|
||||
$L1_S7.switch_act_by_id(1)
|
||||
#$L1_S8.switch_act_by_id(1)
|
||||
#$L1_S9.switch_act_by_id(1)
|
||||
await get_tree().process_frame
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[ext_resource type="Script" uid="uid://c3lbocrolvqyg" path="res://_props/_prefabs/plateform/movable_plateform.gd" id="1_w8q55"]
|
||||
|
||||
[node name="MovablePlateform" type="AnimatableBody2D" groups=["GRAPABLE"]]
|
||||
[node name="MovablePlateform" type="AnimatableBody2D" groups=["GRAPABLE", "ROCK_BREAK"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
script = ExtResource("1_w8q55")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
extends StaticBody2D
|
||||
|
||||
@export var break_groups: Array[String] = ["ROCK_BREAK"]
|
||||
|
||||
func _ready():
|
||||
$Area2D.body_entered.connect(_on_body_entered)
|
||||
|
||||
func _on_body_entered(body: Node):
|
||||
if _can_be_broken_by(body):
|
||||
break_self()
|
||||
|
||||
func _can_be_broken_by(node: Node) -> bool:
|
||||
for group in break_groups:
|
||||
if node.is_in_group(group):
|
||||
return true
|
||||
return false
|
||||
|
||||
func break_self():
|
||||
# 可以在这插入动画、粒子、音效
|
||||
queue_free()
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cega12j8xp7lx
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://iv8w7iisdqm0"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="1_i8uj5"]
|
||||
[ext_resource type="Script" uid="uid://cega12j8xp7lx" path="res://_props/fragile_rock/fragile_rock.gd" id="1_tme8j"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_i8uj5"]
|
||||
size = Vector2(48, 48)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tme8j"]
|
||||
size = Vector2(50, 50)
|
||||
|
||||
[node name="FragileRock" type="StaticBody2D" groups=["GRAPABLE"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 6
|
||||
script = ExtResource("1_tme8j")
|
||||
break_groups = null
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
position = Vector2(4.7683716e-07, -4.7683716e-07)
|
||||
scale = Vector2(0.37499997, 0.37499997)
|
||||
texture = ExtResource("1_i8uj5")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_i8uj5")
|
||||
debug_color = Color(1, 0.24705882, 0.40784314, 0.41960785)
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
collision_layer = 0
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
shape = SubResource("RectangleShape2D_tme8j")
|
||||
debug_color = Color(0.20694017, 0.5377888, 0.9240256, 0.41960785)
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
size = Vector2(52, 51)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mvp6g"]
|
||||
size = Vector2(64, 56)
|
||||
size = Vector2(54, 52.5)
|
||||
|
||||
[node name="TriggerFallRock_Climb" type="Node2D"]
|
||||
script = ExtResource("1_n6tyk")
|
||||
|
|
@ -17,7 +17,7 @@ script = ExtResource("1_n6tyk")
|
|||
[node name="rock" parent="." instance=ExtResource("2_ibofv")]
|
||||
position = Vector2(0, -74)
|
||||
falling_gravity = 600.0
|
||||
max_fall_speed = 1000.0
|
||||
max_fall_speed = 1500.0
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="rock"]
|
||||
position = Vector2(0, 73.99999)
|
||||
|
|
@ -33,7 +33,7 @@ debug_color = Color(0.99629647, 0, 0.19810504, 0.41960785)
|
|||
debug_print = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerTriggerVolumn"]
|
||||
position = Vector2(0, -4)
|
||||
position = Vector2(0, -0.75)
|
||||
shape = SubResource("RectangleShape2D_mvp6g")
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
|
|
|
|||
|
|
@ -168,7 +168,8 @@ visible = false
|
|||
position = Vector2(504, -1608)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Props/PlayerTriggerVolumn"]
|
||||
position = Vector2(248, 0)
|
||||
visible = false
|
||||
position = Vector2(857, -56)
|
||||
shape = SubResource("RectangleShape2D_nvw5u")
|
||||
debug_color = Color(0.8497597, 0.2655047, 0.64659345, 0.41960785)
|
||||
|
||||
|
|
@ -229,11 +230,12 @@ position = Vector2(920, -1480)
|
|||
position = Vector2(1000, -1480)
|
||||
|
||||
[node name="PathDriveMovePlateform2" parent="." node_paths=PackedStringArray("path2d", "plateform", "player_trigger") instance=ExtResource("25_ldp4y")]
|
||||
position = Vector2(520, -1752)
|
||||
position = Vector2(1164, -1762)
|
||||
path2d = NodePath("Path2D")
|
||||
plateform = NodePath("MovablePlateform")
|
||||
player_trigger = NodePath("MovablePlateform/PlayerTriggerVolumn")
|
||||
move_speed = 300.0
|
||||
returning_speed = 100.0
|
||||
acceleration = 1000.0
|
||||
|
||||
[node name="MovablePlateform" parent="PathDriveMovePlateform2" node_paths=PackedStringArray("shaking_target") instance=ExtResource("26_k1jrx")]
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ script = ExtResource("9_v8ejv")
|
|||
|
||||
[node name="CameraAnchor" parent="Props" instance=ExtResource("10_fwa5x")]
|
||||
position = Vector2(-344, -1312)
|
||||
use_camera_limit = false
|
||||
follow_player = true
|
||||
|
||||
[node name="[Prop_0000]" type="Node" parent="Props/CameraAnchor"]
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ position = Vector2(56.000004, -1688)
|
|||
scale = Vector2(0.95, 0.95)
|
||||
|
||||
[node name="TriggerFallRock_Climb" parent="." instance=ExtResource("26_wsgut")]
|
||||
position = Vector2(217.00002, -1608)
|
||||
position = Vector2(216.00002, -1608)
|
||||
scale = Vector2(0.95, 0.95)
|
||||
|
||||
[node name="spring" parent="." instance=ExtResource("25_v3u1d")]
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -46,6 +46,7 @@ ROOM="房间分组,其下存在所有的Room"
|
|||
PLAYER="玩家分组,其下只存在玩家控制器"
|
||||
GRAPABLE=""
|
||||
PLAYER_RESPAWN="所有的PlayerRespawnPoint的绑定Group"
|
||||
ROCK_BREAK="Can break fragile rock."
|
||||
|
||||
[input]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue