|
| 1 | +[gd_scene load_steps=10 format=2] |
| 2 | + |
| 3 | +[ext_resource path="res://images/box.png" type="Texture" id=1] |
| 4 | +[ext_resource path="res://images/shell.png" type="Texture" id=2] |
| 5 | +[ext_resource path="res://images/small-shells.png" type="Texture" id=3] |
| 6 | +[ext_resource path="res://images/spring.png" type="Texture" id=4] |
| 7 | +[ext_resource path="res://images/big-shell.png" type="Texture" id=5] |
| 8 | +[ext_resource path="res://Box.gd" type="Script" id=6] |
| 9 | +[ext_resource path="res://Shell.tscn" type="PackedScene" id=7] |
| 10 | + |
| 11 | +[sub_resource type="SpriteFrames" id=1] |
| 12 | +animations = [ { |
| 13 | +"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 5 ), ExtResource( 4 ) ], |
| 14 | +"loop": true, |
| 15 | +"name": "default", |
| 16 | +"speed": 5.0 |
| 17 | +} ] |
| 18 | + |
| 19 | +[sub_resource type="CapsuleShape2D" id=3] |
| 20 | +radius = 10.7314 |
| 21 | +height = 44.8859 |
| 22 | + |
| 23 | +[node name="Box" type="RigidBody2D" groups=[ |
| 24 | +"heavy", |
| 25 | +"target", |
| 26 | +]] |
| 27 | +z_index = 1 |
| 28 | +z_as_relative = false |
| 29 | +script = ExtResource( 6 ) |
| 30 | +Shell = ExtResource( 7 ) |
| 31 | + |
| 32 | +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] |
| 33 | +position = Vector2( 0, -2 ) |
| 34 | +scale = Vector2( 0.063, 0.063 ) |
| 35 | +polygon = PoolVector2Array( -203.652, -271.332, -96.4444, -272.383, -96.4261, -311.874, 95.2381, -312.128, 95.2381, -273.189, 203.106, -273.434, 203.398, 270.991, 95.1389, 272.042, 94.5607, 310.2, -94.2023, 309.61, -95.0871, 271.858, -203.036, 271.858 ) |
| 36 | + |
| 37 | +[node name="Sprite" type="Sprite" parent="."] |
| 38 | +scale = Vector2( 0.063, 0.063 ) |
| 39 | +texture = ExtResource( 1 ) |
| 40 | + |
| 41 | +[node name="Content" type="AnimatedSprite" parent="Sprite"] |
| 42 | +modulate = Color( 0.776471, 0.776471, 0.776471, 1 ) |
| 43 | +position = Vector2( 0, -7 ) |
| 44 | +rotation = 0.207694 |
| 45 | +frames = SubResource( 1 ) |
| 46 | + |
| 47 | +[node name="PickArea" type="Area2D" parent="."] |
| 48 | + |
| 49 | +[node name="CollisionShape2D" type="CollisionShape2D" parent="PickArea"] |
| 50 | +scale = Vector2( 2.06014, -0.801646 ) |
| 51 | +shape = SubResource( 3 ) |
| 52 | + |
| 53 | +[node name="FallTimer" type="Timer" parent="."] |
| 54 | +wait_time = 0.6 |
| 55 | +one_shot = true |
| 56 | +autostart = true |
| 57 | + |
| 58 | +[node name="PickTimer" type="Timer" parent="."] |
| 59 | +wait_time = 0.06 |
| 60 | + |
| 61 | +[connection signal="body_entered" from="PickArea" to="." method="_on_PickArea_body_entered"] |
| 62 | +[connection signal="timeout" from="FallTimer" to="." method="_on_FallTimer_timeout"] |
| 63 | +[connection signal="timeout" from="PickTimer" to="." method="_on_PickTimer_timeout"] |
0 commit comments