glitch-in-the-system/Nodes/Pickup.tscn

44 lines
1.1 KiB
Plaintext

[gd_scene load_steps=7 format=2]
[ext_resource path="res://Nodes/Pickup.gd" type="Script" id=1]
[ext_resource path="res://Art/pickup1.png" type="Texture" id=2]
[ext_resource path="res://Art/pickup2.png" type="Texture" id=3]
[sub_resource type="GDScript" id=1]
script/source = "extends Area2D
func _ready():
connect(\"body_entered\", self, \"_collide\")
func _collide(body):
if body.has_method(\"pickupCoin\"):
body.pickupCoin()
queue_free()"
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 6, 6 )
[sub_resource type="SpriteFrames" id=3]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]
[node name="Pickup" type="Node2D"]
script = ExtResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
gravity = 0.0
angular_damp = 0.0
script = SubResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 2 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="Area2D/CollisionShape2D"]
frames = SubResource( 3 )
frame = 1
playing = true