mirror of
https://github.com/SEISYUNLie/Platform-Jump.git
synced 2026-10-26 19:01:10 +08:00
Initial commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
extends Area2D
|
||||
|
||||
var damage = 1
|
||||
|
||||
func _ready():
|
||||
body_entered.connect(_on_body_entered)
|
||||
|
||||
func _on_body_entered(body):
|
||||
if body.is_in_group("player"):
|
||||
body.take_damage(damage)
|
||||
@@ -0,0 +1 @@
|
||||
uid://3ugbvq1iadqi
|
||||
@@ -0,0 +1,20 @@
|
||||
[gd_scene format=3 uid="uid://dh3mm14yem44n"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3ugbvq1iadqi" path="res://scenes/prefabs/hazards/spikes_double.gd" id="1_hlpjn"]
|
||||
[ext_resource type="Texture2D" uid="uid://wmoyejtjsmhh" path="res://assets/game/obstacles/spikes_double.png" id="1_texture"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="Shape_spikes"]
|
||||
size = Vector2(14, 6)
|
||||
|
||||
[node name="SpikesDouble" type="Area2D" unique_id=1646987965 groups=["hazard"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_hlpjn")
|
||||
|
||||
[node name="Sprite" type="Sprite2D" parent="." unique_id=997342456]
|
||||
texture_filter = 1
|
||||
texture = ExtResource("1_texture")
|
||||
|
||||
[node name="DetectionArea" type="CollisionShape2D" parent="." unique_id=997417100]
|
||||
position = Vector2(0, 4)
|
||||
shape = SubResource("Shape_spikes")
|
||||
Reference in New Issue
Block a user