changes to coin

This commit is contained in:
Martin Araneda 2022-05-24 15:23:29 -04:00
parent 57289dcb8f
commit a079d8aa37
3 changed files with 12 additions and 5 deletions

View File

@ -1,6 +1,7 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=7 format=2]
[ext_resource path="res://assets/coin.png" type="Texture" id=1]
[ext_resource path="res://Collectables/Coin/Coin.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 6.0
@ -22,10 +23,17 @@ animations = [ {
} ]
[node name="coin" type="Area2D"]
collision_layer = 4
script = ExtResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 9, 9 )
shape = SubResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 4 )
frame = 1
playing = true
centered = false
[connection signal="body_entered" from="." to="." method="_on_coin_body_entered"]

View File

@ -12,7 +12,7 @@
extents = Vector2( 7, 12 )
[node name="Player" type="KinematicBody2D"]
collision_mask = 2
collision_mask = 6
script = ExtResource( 5 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]

View File

@ -10,7 +10,6 @@
[node name="Player" parent="." instance=ExtResource( 2 )]
collision_layer = 5
collision_mask = 6
[node name="Camera2D" type="Camera2D" parent="Player"]
current = true
@ -44,7 +43,7 @@ centered = false
script = ExtResource( 1 )
[node name="coin" parent="." instance=ExtResource( 5 )]
position = Vector2( 72, 456 )
position = Vector2( 72, 450 )
[node name="coin2" parent="." instance=ExtResource( 5 )]
position = Vector2( 240, 456 )
position = Vector2( 234, 450 )