159 lines
5.5 KiB
Text
159 lines
5.5 KiB
Text
[gd_scene format=3 uid="uid://6wq3ynesnsha"]
|
|
|
|
[ext_resource type="Script" uid="uid://dulfr27gg4evl" path="res://scenes/player.gd" id="1_ur7pv"]
|
|
[ext_resource type="Texture2D" uid="uid://cq4we1m1yv22s" path="res://graphics/ship.png" id="2_qhqgy"]
|
|
[ext_resource type="Texture2D" uid="uid://crmbupr3qg0j" path="res://graphics/muzzle_flash.png" id="4_dqkch"]
|
|
[ext_resource type="Script" uid="uid://dss0dbwr71y6m" path="res://scripts/input_component.gd" id="4_smehm"]
|
|
[ext_resource type="Texture2D" uid="uid://b0iavxi8vaxtj" path="res://graphics/ship_thrusters.png" id="5_qlg0r"]
|
|
[ext_resource type="Script" uid="uid://c0rikbakpcags" path="res://scripts/movement_component.gd" id="5_ur7pv"]
|
|
[ext_resource type="Script" uid="uid://suynuijl68qp" path="res://scripts/shoot_component.gd" id="6_y4r1p"]
|
|
[ext_resource type="Script" uid="uid://ylmao2ndp22y" path="res://scripts/weapon_component.gd" id="7_d2wvv"]
|
|
[ext_resource type="Resource" uid="uid://b75ae840k03dy" path="res://resources/player_weapon_resources/weapon_shot_stock.tres" id="8_stock"]
|
|
[ext_resource type="Resource" uid="uid://bhc6aja38vyr" path="res://resources/player_weapon_resources/weapon_shot_spread.tres" id="9_ur7pv"]
|
|
[ext_resource type="Script" uid="uid://7n1itonn35fm" path="res://resources/player_weapon_resources/weapon_shot.gd" id="10_d2wvv"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tuyoq"]
|
|
atlas = ExtResource("5_qlg0r")
|
|
region = Rect2(28, 0, 14, 6)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fjrip"]
|
|
atlas = ExtResource("5_qlg0r")
|
|
region = Rect2(42, 0, 14, 6)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_smehm"]
|
|
atlas = ExtResource("5_qlg0r")
|
|
region = Rect2(1, 0, 14, 6)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ur7pv"]
|
|
atlas = ExtResource("5_qlg0r")
|
|
region = Rect2(15, 0, 14, 6)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_y4r1p"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_tuyoq")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_fjrip")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"banked",
|
|
"speed": 15.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_smehm")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_ur7pv")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"fwd",
|
|
"speed": 15.0
|
|
}]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qlg0r"]
|
|
atlas = ExtResource("4_dqkch")
|
|
region = Rect2(0, 0, 15, 8)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_y4r1p"]
|
|
atlas = ExtResource("4_dqkch")
|
|
region = Rect2(15, 0, 15, 8)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_d2wvv"]
|
|
atlas = ExtResource("4_dqkch")
|
|
region = Rect2(30, 0, 15, 8)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_3v2ag"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_qlg0r")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_y4r1p")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_d2wvv")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"stock",
|
|
"speed": 15.0
|
|
}]
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_qlg0r"]
|
|
size = Vector2(24, 10)
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tuyoq"]
|
|
size = Vector2(24, 30)
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_dqkch"]
|
|
size = Vector2(6, 5.75)
|
|
|
|
[node name="Player" type="Area2D" unique_id=652131079]
|
|
script = ExtResource("1_ur7pv")
|
|
|
|
[node name="Ship" type="Sprite2D" parent="." unique_id=1155866924]
|
|
unique_name_in_owner = true
|
|
texture = ExtResource("2_qhqgy")
|
|
hframes = 3
|
|
region_rect = Rect2(0, 0, 62, 24.370766)
|
|
|
|
[node name="Thrusters" type="AnimatedSprite2D" parent="Ship" unique_id=2096876587]
|
|
position = Vector2(0, 15)
|
|
sprite_frames = SubResource("SpriteFrames_y4r1p")
|
|
animation = &"fwd"
|
|
autoplay = "fwd"
|
|
|
|
[node name="MuzzleFlash" type="AnimatedSprite2D" parent="Ship" unique_id=1584132038]
|
|
unique_name_in_owner = true
|
|
position = Vector2(0.5, -16)
|
|
sprite_frames = SubResource("SpriteFrames_3v2ag")
|
|
animation = &"stock"
|
|
autoplay = "stock"
|
|
speed_scale = 1.75
|
|
|
|
[node name="MuzzleBox" type="CollisionShape2D" parent="." unique_id=1042837273]
|
|
unique_name_in_owner = true
|
|
position = Vector2(0, -17)
|
|
shape = SubResource("RectangleShape2D_qlg0r")
|
|
disabled = true
|
|
debug_color = Color(1, 0.5058824, 0.21960784, 0.41960785)
|
|
|
|
[node name="HelpBox" type="CollisionShape2D" parent="." unique_id=938667427]
|
|
position = Vector2(0, 3)
|
|
shape = SubResource("RectangleShape2D_tuyoq")
|
|
debug_color = Color(0, 1, 0, 0.41960785)
|
|
|
|
[node name="HitBox" type="CollisionShape2D" parent="." unique_id=485826453]
|
|
position = Vector2(0, 2)
|
|
shape = SubResource("RectangleShape2D_dqkch")
|
|
debug_color = Color(0.9843137, 0, 0, 0.80784315)
|
|
|
|
[node name="WeaponCooldown" type="Timer" parent="." unique_id=269678170]
|
|
|
|
[node name="InputComponent" type="Node" parent="." unique_id=2022056363]
|
|
unique_name_in_owner = true
|
|
script = ExtResource("4_smehm")
|
|
metadata/_custom_type_script = "uid://dss0dbwr71y6m"
|
|
|
|
[node name="MovementComponent" type="Node" parent="." unique_id=964075256 node_paths=PackedStringArray("player")]
|
|
unique_name_in_owner = true
|
|
script = ExtResource("5_ur7pv")
|
|
player = NodePath("..")
|
|
speed = 200.0
|
|
metadata/_custom_type_script = "uid://c0rikbakpcags"
|
|
|
|
[node name="ShootComponent" type="Node" parent="." unique_id=623642425]
|
|
unique_name_in_owner = true
|
|
script = ExtResource("6_y4r1p")
|
|
|
|
[node name="WeaponComponent" type="Node" parent="." unique_id=1648685183]
|
|
unique_name_in_owner = true
|
|
script = ExtResource("7_d2wvv")
|
|
weapon_data = ExtResource("9_ur7pv")
|
|
available_weapons = Array[ExtResource("10_d2wvv")]([ExtResource("8_stock"), ExtResource("9_ur7pv")])
|
|
metadata/_custom_type_script = "uid://ylmao2ndp22y"
|
|
|
|
[connection signal="timeout" from="WeaponCooldown" to="." method="_on_weapon_cooldown_timeout"]
|