Files
przygody-pana-cegly/objects/entities/flying_enemy.tscn
Gabriel Kaszewski 604520cad5 Wave enemies (#9)
* Add enemy wave management and path following components

* cleanup
2025-08-31 02:08:35 +02:00

199 lines
8.1 KiB
Plaintext

[gd_scene load_steps=30 format=3 uid="uid://xp4njljog0x2"]
[ext_resource type="Texture2D" uid="uid://22k1u37j6k8y" path="res://sprites/flying_enemy.png" id="1_30hhw"]
[ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="1_uyhuj"]
[ext_resource type="AudioStream" uid="uid://b3tsqhr06pbrs" path="res://sfx/enemy_hurt.wav" id="3_fd2du"]
[ext_resource type="Script" uid="uid://dgb8bqcri7nsj" path="res://scripts/components/HealthComponent.cs" id="3_uyhuj"]
[ext_resource type="AudioStream" uid="uid://dyev46uqusimi" path="res://sfx/shoot.wav" id="4_rhq76"]
[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="6_q78ru"]
[ext_resource type="PackedScene" uid="uid://t422jkov2t1b" path="res://objects/entities/red_laser.tscn" id="7_4ajjm"]
[ext_resource type="Script" uid="uid://bnaxy8cw3wrko" path="res://scripts/components/PeriodicShootingComponent.cs" id="7_weo6b"]
[ext_resource type="Script" uid="uid://cfdugoeduudar" path="res://scripts/components/EnemyDeathComponent.cs" id="9_6p4k7"]
[ext_resource type="Script" uid="uid://dvyd26ricriql" path="res://scripts/components/FlashingComponent.cs" id="10_jmybk"]
[ext_resource type="Script" uid="uid://bo506l4x0808e" path="res://scripts/components/HitComponent.cs" id="11_2yvae"]
[ext_resource type="Script" uid="uid://t8rsvwdwt8ea" path="res://scripts/components/StatusEffectComponent.cs" id="12_xlup2"]
[ext_resource type="Script" uid="uid://cxuig4xh8nfov" path="res://scripts/components/FireEffectComponent.cs" id="13_mrjm6"]
[ext_resource type="PackedScene" uid="uid://b12tppjkkqpt4" path="res://objects/fxs/hit_particles.tscn" id="13_xlup2"]
[ext_resource type="PackedScene" uid="uid://dx80ivlvuuew4" path="res://objects/fxs/fire_fx.tscn" id="14_mrjm6"]
[ext_resource type="Script" uid="uid://d1388lhp2gpgr" path="res://scripts/components/IceEffectComponent.cs" id="14_pkino"]
[ext_resource type="PackedScene" uid="uid://ck6nml06tm6ue" path="res://objects/fxs/ice_fx.tscn" id="15_pkino"]
[ext_resource type="Script" uid="uid://b4hvq2i66fjhi" path="res://scripts/components/PathFollowerComponent.cs" id="18_q78ru"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_hil2i"]
radius = 6.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_q78ru"]
shader = ExtResource("1_uyhuj")
shader_parameter/enabled = false
shader_parameter/tint = Color(1, 1, 1, 1)
[sub_resource type="Curve" id="Curve_68xvh"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.870036, 0.767164), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 3
[sub_resource type="CurveTexture" id="CurveTexture_ivniq"]
curve = SubResource("Curve_68xvh")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_fd2du"]
lifetime_randomness = 0.1
particle_flag_disable_z = true
emission_shape = 1
emission_sphere_radius = 2.0
direction = Vector3(0, 1, 0)
initial_velocity_min = 1.0
initial_velocity_max = 10.0
gravity = Vector3(0, 98, 0)
scale_min = 0.6
scale_curve = SubResource("CurveTexture_ivniq")
color = Color(0.635294, 1, 0.952941, 1)
[sub_resource type="Gradient" id="Gradient_iybpd"]
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_f1fvy"]
gradient = SubResource("Gradient_iybpd")
[sub_resource type="Curve" id="Curve_f2w8b"]
_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_f2w8b")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_qxfb0"]
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.47451, 0.47451, 0.47451, 1)
color_ramp = SubResource("GradientTexture1D_f1fvy")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cmp1h"]
size = Vector2(16, 26)
[node name="Flying Enemy" type="CharacterBody2D"]
collision_layer = 8
collision_mask = 21
motion_mode = 1
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
shape = SubResource("CapsuleShape2D_hil2i")
[node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_q78ru")
texture = ExtResource("1_30hhw")
[node name="Jetpack Particles" type="GPUParticles2D" parent="."]
z_index = -1
position = Vector2(-4, 16)
explosiveness = 0.5
fixed_fps = 24
process_material = SubResource("ParticleProcessMaterial_fd2du")
[node name="Jetpack Particles2" type="GPUParticles2D" parent="."]
z_index = -1
position = Vector2(4, 16)
explosiveness = 0.5
fixed_fps = 24
process_material = SubResource("ParticleProcessMaterial_fd2du")
[node name="HealthComponent" type="Node2D" parent="." node_paths=PackedStringArray("HurtSfx")]
script = ExtResource("3_uyhuj")
HurtSfx = NodePath("../sfx_hurt")
[node name="sfx_hurt" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("3_fd2du")
bus = &"sfx"
[node name="sfx_shoot" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("4_rhq76")
bus = &"sfx"
[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")]
script = ExtResource("6_q78ru")
Area = NodePath("../Hitbox")
[node name="PeriodicShootingComponent" type="Node" parent="." node_paths=PackedStringArray("BulletSpawnRight", "BulletSpawnLeft")]
script = ExtResource("7_weo6b")
BulletScene = ExtResource("7_4ajjm")
ShootInterval = 2.0
BulletSpawnRight = NodePath("../laser spawn point right")
BulletSpawnLeft = NodePath("../laser spawn point left")
ShootingIntervalVariation = 0.5
[node name="EnemyDeathComponent" type="Node" parent="." node_paths=PackedStringArray("CollisionShape", "Health")]
script = ExtResource("9_6p4k7")
TweenDuration = 0.1
CollisionShape = NodePath("../CollisionShape2D")
Health = NodePath("../HealthComponent")
[node name="FlashingComponent" type="Node" parent="." node_paths=PackedStringArray("Sprite", "HealthComponent")]
process_mode = 3
script = ExtResource("10_jmybk")
Sprite = NodePath("../Sprite2D")
HealthComponent = NodePath("../HealthComponent")
[node name="HitComponent" type="Node" parent="." node_paths=PackedStringArray("Sprite", "Health", "HitFx")]
script = ExtResource("11_2yvae")
Sprite = NodePath("../Sprite2D")
Health = NodePath("../HealthComponent")
HitFx = NodePath("../HitParticles")
[node name="StatusEffectComponent" type="Node" parent="."]
script = ExtResource("12_xlup2")
[node name="FireEffectComponent" type="Node" parent="." node_paths=PackedStringArray("Health", "StatusEffectComponent", "FireFX")]
script = ExtResource("13_mrjm6")
Health = NodePath("../HealthComponent")
StatusEffectComponent = NodePath("../StatusEffectComponent")
FireFX = NodePath("../FireFX")
[node name="IceEffectComponent" type="Node" parent="." node_paths=PackedStringArray("ComponentsToDisable", "StatusEffectComponent", "IceFx")]
script = ExtResource("14_pkino")
ComponentsToDisable = [NodePath("../PeriodicShootingComponent"), NodePath("../DamageComponent")]
StatusEffectComponent = NodePath("../StatusEffectComponent")
IceFx = NodePath("../Ice FX")
[node name="HitParticles" parent="." instance=ExtResource("13_xlup2")]
position = Vector2(0, 1)
process_material = SubResource("ParticleProcessMaterial_qxfb0")
[node name="FireFX" parent="." instance=ExtResource("14_mrjm6")]
position = Vector2(0, 9)
emitting = false
amount = 2048
[node name="Ice FX" parent="." instance=ExtResource("15_pkino")]
visible = false
position = Vector2(1, 0)
scale = Vector2(0.684407, 0.929677)
[node name="laser spawn point right" type="Node2D" parent="."]
position = Vector2(8, -2)
[node name="laser spawn point left" type="Node2D" parent="."]
position = Vector2(-9, -2)
[node name="Hitbox" type="Area2D" parent="."]
collision_layer = 8
collision_mask = 20
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2(0, 2)
shape = SubResource("RectangleShape2D_cmp1h")
[node name="PathFollowerComponent" type="Node2D" parent="."]
script = ExtResource("18_q78ru")
ShouldRotate = false
metadata/_custom_type_script = "uid://b4hvq2i66fjhi"