cliff-hanger/Obstacles/MovingObstacle.tscn

38 lines
1.1 KiB
Plaintext
Executable File

[gd_scene load_steps=5 format=2]
[ext_resource path="res://Obstacles/MovingObstacle.gd" type="Script" id=1]
[ext_resource path="res://Platforms.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 5.63992, 4.78028 )
[sub_resource type="CircleShape2D" id=2]
[node name="MovingObstacle" type="Node2D"]
script = ExtResource( 1 )
[node name="Body" type="KinematicBody2D" parent="." groups=[
"moving",
]]
collision_layer = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Body"]
shape = SubResource( 1 )
[node name="icon" type="Sprite" parent="Body"]
position = Vector2( 0, -0.248032 )
scale = Vector2( 0.251647, 0.804106 )
texture = ExtResource( 2 )
region_enabled = true
region_rect = Rect2( 0, 0, 72, 24 )
[node name="Area2D" type="Area2D" parent="Body"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Body/Area2D"]
shape = SubResource( 2 )
[node name="MoveTween" type="Tween" parent="."]
repeat = true
playback/repeat = true
[connection signal="body_entered" from="Body/Area2D" to="." method="_on_Area2D_body_entered"]