[gd_scene load_steps=18 format=3 uid="uid://c5a4y477ijpgc"] [ext_resource type="Script" path="res://Ships/BaseShip/base_ship.gd" id="1_pak63"] [ext_resource type="Texture2D" uid="uid://bm5i6kyig4uo1" path="res://PlayerShip/Sprites/spaceship_body.png" id="2_xuocg"] [ext_resource type="Script" path="res://Ships/BaseShip/AttackLaser/AttackLaser.gd" id="3_46b1w"] [ext_resource type="Texture2D" uid="uid://crnvgev1rs5va" path="res://icon.svg" id="7_c7f2m"] [ext_resource type="Script" path="res://PlayerShip/MiningLaser/HitEffect.gd" id="8_j0p5n"] [ext_resource type="PackedScene" uid="uid://codl8rdyoul5n" path="res://Components/movement.tscn" id="9_jalrn"] [ext_resource type="Shader" path="res://PlayerShip/MiningLaser/laser_tip.gdshader" id="9_tdigo"] [ext_resource type="PackedScene" uid="uid://kd3qcddxatqa" path="res://Components/health.tscn" id="10_1told"] [ext_resource type="Texture2D" uid="uid://b1qks8o720rti" path="res://PlayerShip/laser_particle.png" id="10_6hitd"] [ext_resource type="PackedScene" uid="uid://bikylql0uik2" path="res://Components/shield.tscn" id="10_m62uh"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_yysyw"] size = Vector2(64, 64) [sub_resource type="Shader" id="Shader_3alab"] code = "shader_type canvas_item; uniform vec3 color = vec3(0.5, 0.5, 0.95); uniform float temporal_freq = 1.0; uniform float longitudinal_freq = -1.5; const float pulse_excursion = 0.3; const float thickness = 0.8; void fragment() { vec2 uv = UV * 2.0 - 1.0; COLOR.rgb = color ; float phase_y = uv.y + temporal_freq*TIME; float a_y = 1.0 - pulse_excursion*abs(sin(2.0*PI*longitudinal_freq*phase_y)); float a_x = 1.0-smoothstep(0.0, 2.0*thickness, abs(uv.x)); // COLOR.a = a_x*a_y; COLOR.a = min(a_x, a_y); } " [sub_resource type="ShaderMaterial" id="ShaderMaterial_arhys"] shader = SubResource("Shader_3alab") shader_parameter/color = Vector3(0.95, 0.2, 0.2) shader_parameter/temporal_freq = 5.0 shader_parameter/longitudinal_freq = 0.5 [sub_resource type="ShaderMaterial" id="ShaderMaterial_046vf"] shader = ExtResource("9_tdigo") [sub_resource type="Animation" id="Animation_kgwnu"] resource_name = "flicker" loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath(".:scale") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.5, 1), "transitions": PackedFloat32Array(1, 1, 1), "update": 0, "values": [Vector2(0.3, 0.3), Vector2(0.32, 0.32), Vector2(0.3, 0.3)] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_wslj3"] _data = { "flicker": SubResource("Animation_kgwnu") } [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ytpkw"] lifetime_randomness = 0.4 emission_shape = 3 emission_box_extents = Vector3(5, 0, 0) particle_flag_disable_z = true direction = Vector3(0, 1, 0) spread = 70.0 gravity = Vector3(0, 0, 0) initial_velocity_min = 30.0 initial_velocity_max = 50.0 orbit_velocity_min = 0.0 orbit_velocity_max = 0.0 angle_max = 45.0 scale_min = 0.05 scale_max = 0.08 hue_variation_min = 0.1 hue_variation_max = 0.14 [node name="PirateShip" type="RigidBody2D"] collision_mask = 3 max_contacts_reported = 4 contact_monitor = true script = ExtResource("1_pak63") [node name="PlayerCamera" type="Camera2D" parent="."] unique_name_in_owner = true [node name="BodySprite" type="Sprite2D" parent="."] modulate = Color(1, 0, 0, 1) scale = Vector2(0.5, 0.5) texture = ExtResource("2_xuocg") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2(0, -0.5) shape = SubResource("RectangleShape2D_yysyw") [node name="AttackLaser" type="Node2D" parent="."] unique_name_in_owner = true material = SubResource("ShaderMaterial_arhys") rotation = 1.5708 script = ExtResource("3_46b1w") [node name="Base" type="Node2D" parent="AttackLaser"] [node name="ColorRect" type="ColorRect" parent="AttackLaser/Base"] custom_minimum_size = Vector2(20, 20) offset_left = -10.0 offset_top = -10.0 offset_right = 10.0 offset_bottom = 10.0 [node name="ColorRect2" type="ColorRect" parent="AttackLaser/Base"] custom_minimum_size = Vector2(10, 10) offset_left = -5.0 offset_top = -10.0 offset_right = 5.0 color = Color(0.545098, 0.596078, 0.85098, 1) [node name="Beam" type="Polygon2D" parent="AttackLaser"] unique_name_in_owner = true use_parent_material = true texture = ExtResource("7_c7f2m") polygon = PackedVector2Array(5, 0, 5, -100, -5, -100, -5, 0) uv = PackedVector2Array(128, 0, 128, 128, 0, 128, 0, 0) [node name="RayCast2D" type="RayCast2D" parent="AttackLaser"] collision_mask = 3 collide_with_areas = true [node name="HitEffect" type="Node2D" parent="AttackLaser"] unique_name_in_owner = true position = Vector2(0, -100) script = ExtResource("8_j0p5n") [node name="EndPoint" type="Sprite2D" parent="AttackLaser/HitEffect"] material = SubResource("ShaderMaterial_046vf") scale = Vector2(0.303327, 0.303327) texture = ExtResource("10_6hitd") region_rect = Rect2(0, 32, 64, 32) [node name="AnimationPlayer" type="AnimationPlayer" parent="AttackLaser/HitEffect/EndPoint"] speed_scale = 5.0 libraries = { "": SubResource("AnimationLibrary_wslj3") } [node name="Particles" type="GPUParticles2D" parent="AttackLaser/HitEffect"] amount = 40 process_material = SubResource("ParticleProcessMaterial_ytpkw") texture = ExtResource("10_6hitd") lifetime = 0.5 trail_lifetime = 0.05 [node name="Movement" parent="." instance=ExtResource("9_jalrn")] [node name="Health" parent="." instance=ExtResource("10_1told")] max_health = 50.0 [node name="Shield" parent="." instance=ExtResource("10_m62uh")]