2022-11-10 00:17:42 -03:00
|
|
|
[gd_scene load_steps=7 format=2]
|
2022-11-09 20:21:26 -03:00
|
|
|
|
|
|
|
[ext_resource path="res://assets/collectable/energy.png" type="Texture" id=1]
|
2022-11-10 00:17:42 -03:00
|
|
|
[ext_resource path="res://scenes/collectables/Energy.cs" type="Script" id=2]
|
2022-11-09 20:21:26 -03:00
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id=1]
|
|
|
|
atlas = ExtResource( 1 )
|
|
|
|
region = Rect2( 0, 0, 16, 16 )
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id=2]
|
|
|
|
atlas = ExtResource( 1 )
|
|
|
|
region = Rect2( 16, 0, 16, 16 )
|
|
|
|
|
|
|
|
[sub_resource type="SpriteFrames" id=3]
|
|
|
|
animations = [ {
|
|
|
|
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
|
|
|
|
"loop": true,
|
|
|
|
"name": "glow",
|
|
|
|
"speed": 4.0
|
|
|
|
} ]
|
|
|
|
|
|
|
|
[sub_resource type="RectangleShape2D" id=4]
|
2022-11-19 23:06:17 -03:00
|
|
|
extents = Vector2( 2.5, 5.75 )
|
2022-11-09 20:21:26 -03:00
|
|
|
|
|
|
|
[node name="Energy" type="Area2D"]
|
2022-11-10 00:17:42 -03:00
|
|
|
collision_layer = 8
|
|
|
|
script = ExtResource( 2 )
|
2022-11-09 20:21:26 -03:00
|
|
|
|
|
|
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
|
|
|
frames = SubResource( 3 )
|
|
|
|
animation = "glow"
|
2022-11-19 23:06:17 -03:00
|
|
|
centered = false
|
2022-11-09 20:21:26 -03:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
2022-11-19 23:06:17 -03:00
|
|
|
position = Vector2( 7.5, 7.25 )
|
2022-11-09 20:21:26 -03:00
|
|
|
shape = SubResource( 4 )
|
2022-11-10 00:17:42 -03:00
|
|
|
|
2022-11-19 23:06:17 -03:00
|
|
|
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
|
|
|
|
position = Vector2( 14, 11 )
|
|
|
|
rect = Rect2( -10, -10, 7, 13 )
|
|
|
|
|
2022-11-10 00:17:42 -03:00
|
|
|
[connection signal="body_entered" from="." to="." method="OnEnergyBodyEntered"]
|
2022-11-19 23:06:17 -03:00
|
|
|
[connection signal="screen_entered" from="VisibilityNotifier2D" to="." method="OnVisibilityNotifier2DScreenEntered"]
|
|
|
|
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="OnVisibilityNotifier2DScreenExited"]
|