95 lines
3 KiB
Text
95 lines
3 KiB
Text
[gd_scene load_steps=15 format=3 uid="uid://pyuorpwb7lpe"]
|
|
|
|
[ext_resource type="Script" uid="uid://dcrnf4r6c5qaw" path="res://player.gd" id="1_sweqy"]
|
|
[ext_resource type="PackedScene" uid="uid://bwxxdrdvo3le0" path="res://bullet.tscn" id="2_1jxqw"]
|
|
[ext_resource type="Texture2D" uid="uid://di2xhcwcdbhxg" path="res://Mini Pixel Pack 3/Player ship/Player_ship (16 x 16).png" id="2_2hs0m"]
|
|
[ext_resource type="Texture2D" uid="uid://ces8fm7lxh574" path="res://Mini Pixel Pack 3/Player ship/Boosters (16 x 16).png" id="3_1jxqw"]
|
|
[ext_resource type="Texture2D" uid="uid://bjdhq42ummgky" path="res://Mini Pixel Pack 3/Player ship/Boosters_left (16 x 16).png" id="4_dw050"]
|
|
[ext_resource type="Texture2D" uid="uid://cjv3xbuj65pav" path="res://Mini Pixel Pack 3/Player ship/Boosters_right (16 x 16).png" id="5_b26j0"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_n7ghd"]
|
|
atlas = ExtResource("3_1jxqw")
|
|
region = Rect2(0, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_nvl01"]
|
|
atlas = ExtResource("3_1jxqw")
|
|
region = Rect2(16, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ivps1"]
|
|
atlas = ExtResource("4_dw050")
|
|
region = Rect2(0, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_urp6f"]
|
|
atlas = ExtResource("4_dw050")
|
|
region = Rect2(16, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bwjto"]
|
|
atlas = ExtResource("5_b26j0")
|
|
region = Rect2(0, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_606se"]
|
|
atlas = ExtResource("5_b26j0")
|
|
region = Rect2(16, 0, 16, 16)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_u1c27"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_n7ghd")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_nvl01")
|
|
}],
|
|
"loop": true,
|
|
"name": &"forward",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_ivps1")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_urp6f")
|
|
}],
|
|
"loop": true,
|
|
"name": &"left",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_bwjto")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_606se")
|
|
}],
|
|
"loop": true,
|
|
"name": &"right",
|
|
"speed": 10.0
|
|
}]
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_op7ga"]
|
|
size = Vector2(14, 14)
|
|
|
|
[node name="Player" type="Area2D"]
|
|
script = ExtResource("1_sweqy")
|
|
bullet_scene = ExtResource("2_1jxqw")
|
|
|
|
[node name="Ship" type="Sprite2D" parent="."]
|
|
texture = ExtResource("2_2hs0m")
|
|
hframes = 3
|
|
frame = 1
|
|
|
|
[node name="Boosters" type="AnimatedSprite2D" parent="Ship"]
|
|
position = Vector2(0, 15)
|
|
sprite_frames = SubResource("SpriteFrames_u1c27")
|
|
animation = &"forward"
|
|
autoplay = "forward"
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
shape = SubResource("RectangleShape2D_op7ga")
|
|
|
|
[node name="GunCooldown" type="Timer" parent="."]
|
|
one_shot = true
|
|
|
|
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
|
[connection signal="timeout" from="GunCooldown" to="." method="_on_gun_cool_down_timeout"]
|