diff --git a/hidden_spike.gd b/hidden_spike.gd new file mode 100644 index 0000000..b2dfba2 --- /dev/null +++ b/hidden_spike.gd @@ -0,0 +1,14 @@ +extends Node2D + +func _ready() -> void: + add_to_group("Hidden") + +func _process(delta: float) -> void: + pass + +func on_contact(body: Node2D) -> void: + if body==%Player2D and %Player2D.death_cooldown == 0: + print("SLASH KILL") + %Player2D/Jetpack/DeathSound.play() + %Player2D.on_death(false,%Player2D.position) + print(body) diff --git a/hidden_spike.gd.uid b/hidden_spike.gd.uid new file mode 100644 index 0000000..30240c2 --- /dev/null +++ b/hidden_spike.gd.uid @@ -0,0 +1 @@ +uid://b65drnv6461kp diff --git a/hidden_spike.tscn b/hidden_spike.tscn new file mode 100644 index 0000000..4554d3a --- /dev/null +++ b/hidden_spike.tscn @@ -0,0 +1,24 @@ +[gd_scene format=3 uid="uid://cap0wo5ij7hfv"] + +[ext_resource type="Script" uid="uid://b65drnv6461kp" path="res://hidden_spike.gd" id="1_k2eht"] +[ext_resource type="Texture2D" uid="uid://bu5wgerfu7cbc" path="res://art/spike.png" id="2_vt54o"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_xfwl5"] +size = Vector2(15, 7.5) + +[node name="HiddenSpike" type="Node2D" unique_id=1739014101] +visible = false +script = ExtResource("1_k2eht") + +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=813041394] +texture_filter = 1 +position = Vector2(0, 2) +texture = ExtResource("2_vt54o") + +[node name="Area2D" type="Area2D" parent="." unique_id=170499029] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=1865546056] +position = Vector2(0, 4.75) +shape = SubResource("RectangleShape2D_xfwl5") + +[connection signal="body_entered" from="Area2D" to="." method="on_contact"] diff --git a/world.tscn b/world.tscn index 5666061..817cbcc 100644 --- a/world.tscn +++ b/world.tscn @@ -27,6 +27,8 @@ [ext_resource type="PackedScene" uid="uid://byfgwmvln8ukh" path="res://vertical_block.tscn" id="25_mc2jv"] [ext_resource type="PackedScene" uid="uid://dt43trxumfv0i" path="res://hidden_sign.tscn" id="26_bo7i5"] [ext_resource type="PackedScene" uid="uid://b1ccvtwwb1cl7" path="res://long_floor_spike.tscn" id="27_4h6ng"] +[ext_resource type="PackedScene" uid="uid://cap0wo5ij7hfv" path="res://hidden_spike.tscn" id="28_k83mh"] +[ext_resource type="Script" uid="uid://b65drnv6461kp" path="res://hidden_spike.gd" id="29_qktwf"] [node name="World" type="Node2D" unique_id=1327991900] process_mode = 1 @@ -560,6 +562,18 @@ position = Vector2(7607, -277.12885) [node name="LongBlock" parent="." unique_id=1836871184 instance=ExtResource("3_dwbse")] position = Vector2(7963, -271.12885) +[node name="LongBlock6" parent="." unique_id=578305907 instance=ExtResource("3_dwbse")] +position = Vector2(8112, -673.5051) + +[node name="LongBlock7" parent="." unique_id=1715379866 instance=ExtResource("3_dwbse")] +position = Vector2(8224, -674.48975) + +[node name="LongBlock8" parent="." unique_id=218061444 instance=ExtResource("3_dwbse")] +position = Vector2(8335, -673.5052) + +[node name="LongBlock9" parent="." unique_id=1660898332 instance=ExtResource("3_dwbse")] +position = Vector2(8447, -674.4898) + [node name="VerticalLongBlock2" parent="." unique_id=10220440 instance=ExtResource("4_pkg7o")] position = Vector2(7864, -212.12886) @@ -856,4 +870,11 @@ position = Vector2(-1804, 363.3383) sign_text = "YOUR DASH WILL ALSO BE REFRESHED..." text_dismiss_timer = 4 +[node name="HiddenSpike" parent="." unique_id=1878715961 instance=ExtResource("28_k83mh")] +position = Vector2(8232, -721.7533) + +[node name="HiddenSpike2" type="Node2D" parent="." unique_id=141634991] +position = Vector2(8254, -686.30566) +script = ExtResource("29_qktwf") + [connection signal="toggled" from="CanvasLayer/MusicButton" to="CanvasLayer/MusicButton" method="_on_toggled"]