184 lines
7.6 KiB
Plaintext
184 lines
7.6 KiB
Plaintext
[gd_scene load_steps=29 format=3 uid="uid://8wy1jxy1lihn"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://dhkwyv6ayb5qb" path="res://sprites/flying_ship.png" id="1_umrfk"]
|
|
[ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="2_vlo17"]
|
|
[ext_resource type="Texture2D" uid="uid://b7gp0gqvkv8j4" path="res://sprites/MrBrick_base.png" id="3_e1par"]
|
|
[ext_resource type="Texture2D" uid="uid://jl1gwqchhpdc" path="res://sprites/left_eye.png" id="4_d5f6y"]
|
|
[ext_resource type="Texture2D" uid="uid://iiawtnwmeny3" path="res://sprites/right_eye.png" id="5_k3peb"]
|
|
[ext_resource type="Script" uid="uid://btfsq0bvtrx3t" path="res://scripts/components/health.gd" id="6_e1par"]
|
|
[ext_resource type="AudioStream" uid="uid://bmfn6p88gy575" path="res://sfx/player_hurt.wav" id="7_q8x53"]
|
|
[ext_resource type="AudioStream" uid="uid://ycgtf6wj7mto" path="res://sfx/heal.wav" id="8_5aboc"]
|
|
[ext_resource type="PackedScene" uid="uid://b12tppjkkqpt4" path="res://objects/fxs/hit_particles.tscn" id="9_buvrj"]
|
|
[ext_resource type="Script" uid="uid://ijrli0x8ij8v" path="res://scripts/components/invulnerability_component.gd" id="10_y4xwp"]
|
|
[ext_resource type="Script" uid="uid://dqmbvuutd5c3c" path="res://scripts/components/flashing_component.gd" id="11_m7okj"]
|
|
[ext_resource type="Script" uid="uid://ceq8n7yw7qxpi" path="res://scripts/components/hit_component.gd" id="12_dwqug"]
|
|
[ext_resource type="Script" uid="uid://b3mrdvre1y567" path="res://scripts/components/ship_movement.gd" id="13_m7okj"]
|
|
[ext_resource type="Script" uid="uid://d1ctdx52gskv1" path="res://scripts/components/ship_shooter.gd" id="14_e7gat"]
|
|
[ext_resource type="AudioStream" uid="uid://dyev46uqusimi" path="res://sfx/shoot.wav" id="15_4fjnq"]
|
|
[ext_resource type="PackedScene" uid="uid://dtem8jgcyoqar" path="res://objects/entities/green_laser.tscn" id="15_67g38"]
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_y4xwp"]
|
|
size = Vector2(16, 32)
|
|
|
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_q8x53"]
|
|
shader = ExtResource("2_vlo17")
|
|
shader_parameter/enabled = false
|
|
shader_parameter/tint = Color(1, 1, 1, 1)
|
|
|
|
[sub_resource type="Gradient" id="Gradient_umrfk"]
|
|
offsets = PackedFloat32Array(0, 0.173759, 0.521277, 0.687943, 0.886525, 1)
|
|
colors = PackedColorArray(1.635, 0.188, 0, 1, 1.89, 0.318, 0, 1, 1, 0.470588, 0.188235, 1, 1, 0.635294, 0, 1, 1, 0.858824, 0.635294, 1, 1, 1, 1, 0.501961)
|
|
|
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_g31n1"]
|
|
gradient = SubResource("Gradient_umrfk")
|
|
use_hdr = true
|
|
|
|
[sub_resource type="Curve" id="Curve_wcyu2"]
|
|
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.606498, 0.621642), -1.25408, -1.25408, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
|
point_count = 3
|
|
|
|
[sub_resource type="CurveTexture" id="CurveTexture_epnjh"]
|
|
curve = SubResource("Curve_wcyu2")
|
|
|
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_vlo17"]
|
|
lifetime_randomness = 0.85
|
|
particle_flag_disable_z = true
|
|
emission_shape = 1
|
|
emission_sphere_radius = 3.0
|
|
angle_min = -35.0
|
|
angle_max = 35.0
|
|
direction = Vector3(0, 1, 0)
|
|
initial_velocity_min = 30.0
|
|
initial_velocity_max = 60.0
|
|
gravity = Vector3(0, 98, 0)
|
|
scale_min = 2.0
|
|
scale_max = 4.0
|
|
scale_curve = SubResource("CurveTexture_epnjh")
|
|
color_ramp = SubResource("GradientTexture1D_g31n1")
|
|
|
|
[sub_resource type="Gradient" id="Gradient_m7okj"]
|
|
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
|
|
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_f1fvy"]
|
|
gradient = SubResource("Gradient_m7okj")
|
|
|
|
[sub_resource type="Curve" id="Curve_dwqug"]
|
|
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
|
point_count = 2
|
|
|
|
[sub_resource type="CurveTexture" id="CurveTexture_7b7mt"]
|
|
curve = SubResource("Curve_dwqug")
|
|
|
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_e7gat"]
|
|
resource_local_to_scene = true
|
|
lifetime_randomness = 1.0
|
|
particle_flag_disable_z = true
|
|
emission_shape = 1
|
|
emission_sphere_radius = 8.0
|
|
direction = Vector3(0.1, -0.5, 0)
|
|
initial_velocity_min = 200.0
|
|
initial_velocity_max = 400.0
|
|
gravity = Vector3(0, 80, 0)
|
|
damping_min = 400.0
|
|
damping_max = 800.0
|
|
scale_max = 3.0
|
|
scale_curve = SubResource("CurveTexture_7b7mt")
|
|
color = Color(0.764706, 0.443137, 0, 1)
|
|
color_ramp = SubResource("GradientTexture1D_f1fvy")
|
|
|
|
[node name="Flying ship" type="CharacterBody2D"]
|
|
collision_layer = 4
|
|
collision_mask = 9
|
|
motion_mode = 1
|
|
|
|
[node name="CollisionShape2D" type="CollisionPolygon2D" parent="."]
|
|
position = Vector2(-0.5, 7)
|
|
polygon = PackedVector2Array(-13.5, -8, -13.5, -10, -12.5, -11, -10.5, -11, -8.5, -8, -7.5, -7, 10.5, -7, 15.5, -3, 15.5, -1, 10.5, 3, 6.5, 4, 4.5, 5, 2.5, 7, -1.5, 7, -5.5, 4, -9.5, 3, -11.5, 2, -14.5, -1, -14.5, -3, -12.5, -5, -11.5, -5, -11.5, -7, -12.5, -7)
|
|
|
|
[node name="Player hitbox" type="CollisionShape2D" parent="."]
|
|
position = Vector2(-2, -7)
|
|
shape = SubResource("RectangleShape2D_y4xwp")
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
position = Vector2(0, -1)
|
|
texture = ExtResource("1_umrfk")
|
|
|
|
[node name="Brick Position" type="Node2D" parent="."]
|
|
|
|
[node name="Root" type="Node2D" parent="Brick Position"]
|
|
z_index = -1
|
|
position = Vector2(-2, -7)
|
|
|
|
[node name="Base" type="Sprite2D" parent="Brick Position/Root"]
|
|
material = SubResource("ShaderMaterial_q8x53")
|
|
texture = ExtResource("3_e1par")
|
|
|
|
[node name="Left Eye" type="Sprite2D" parent="Brick Position/Root"]
|
|
position = Vector2(-7, -6)
|
|
texture = ExtResource("4_d5f6y")
|
|
hframes = 2
|
|
|
|
[node name="Right Eye" type="Sprite2D" parent="Brick Position/Root"]
|
|
position = Vector2(6, -5)
|
|
texture = ExtResource("5_k3peb")
|
|
hframes = 2
|
|
|
|
[node name="Engine particles" type="GPUParticles2D" parent="."]
|
|
z_index = -1
|
|
position = Vector2(0, 12)
|
|
amount = 64
|
|
fixed_fps = 24
|
|
process_material = SubResource("ParticleProcessMaterial_vlo17")
|
|
|
|
[node name="HealthComponent" type="Node" parent="." node_paths=PackedStringArray("hurt_fx", "heal_fx")]
|
|
script = ExtResource("6_e1par")
|
|
hurt_fx = NodePath("../sfx_hurt")
|
|
heal_fx = NodePath("../sfx_heal")
|
|
metadata/_custom_type_script = "uid://btfsq0bvtrx3t"
|
|
|
|
[node name="sfx_hurt" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("7_q8x53")
|
|
|
|
[node name="sfx_heal" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("8_5aboc")
|
|
|
|
[node name="HitParticles" parent="." instance=ExtResource("9_buvrj")]
|
|
position = Vector2(-2, -5)
|
|
process_material = SubResource("ParticleProcessMaterial_e7gat")
|
|
|
|
[node name="InvulnerabilityComponent" type="Node" parent="." node_paths=PackedStringArray("flashing_component")]
|
|
script = ExtResource("10_y4xwp")
|
|
flashing_component = NodePath("../FlashingComponent Base")
|
|
|
|
[node name="FlashingComponent Base" type="Node" parent="." node_paths=PackedStringArray("sprite", "health_component")]
|
|
script = ExtResource("11_m7okj")
|
|
sprite = NodePath("../Brick Position/Root/Base")
|
|
flash_duration = 1.0
|
|
health_component = NodePath("../HealthComponent")
|
|
|
|
[node name="HitComponent" type="Node" parent="." node_paths=PackedStringArray("sprite", "health_component", "hit_fx")]
|
|
script = ExtResource("12_dwqug")
|
|
sprite = NodePath("../Brick Position/Root/Base")
|
|
health_component = NodePath("../HealthComponent")
|
|
hit_fx = NodePath("../HitParticles")
|
|
metadata/_custom_type_script = "uid://ceq8n7yw7qxpi"
|
|
|
|
[node name="ShipMovement" type="Node" parent="." node_paths=PackedStringArray("body")]
|
|
script = ExtResource("13_m7okj")
|
|
acceleration = 800.0
|
|
friction = 600.0
|
|
body = NodePath("..")
|
|
|
|
[node name="Shoot spawn" type="Marker2D" parent="."]
|
|
position = Vector2(16, -2)
|
|
gizmo_extents = 1.0
|
|
|
|
[node name="ShipShooter" type="Node" parent="." node_paths=PackedStringArray("bullet_spawn", "shoot_sfx")]
|
|
script = ExtResource("14_e7gat")
|
|
bullet_scene = ExtResource("15_67g38")
|
|
bullet_spawn = NodePath("../Shoot spawn")
|
|
shoot_sfx = NodePath("../sfx_shoot")
|
|
|
|
[node name="sfx_shoot" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("15_4fjnq")
|