Files
slopvivors/scenes/enemies/enemy_base.tscn

94 lines
2.8 KiB
Plaintext

[gd_scene load_steps=10 format=3 uid="uid://b7vq8xspnlyeu"]
[ext_resource type="Script" uid="uid://dxn17u7ltuibw" path="res://scenes/enemies/enemy_base.gd" id="1_qty17"]
[ext_resource type="AnimationLibrary" uid="uid://dos4y853hq1gu" path="res://animation/generic_anims.res" id="2_pkqou"]
[ext_resource type="Shader" uid="uid://p7evv1wldgsa" path="res://assets/shaders/hit_flash.gdshader" id="2_satqt"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qa0nx"]
shader = ExtResource("2_satqt")
shader_parameter/flash_amount = 0.0
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_pkqou"]
size = Vector2(32, 32)
[sub_resource type="CircleShape2D" id="CircleShape2D_satqt"]
radius = 6.0
[sub_resource type="Animation" id="Animation_satqt"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:material:shader_parameter/flash_amount")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qa0nx"]
_data = {
&"RESET": SubResource("Animation_satqt")
}
[sub_resource type="CircleShape2D" id="CircleShape2D_pkqou"]
[node name="EnemyBase" type="CharacterBody2D"]
collision_layer = 2
collision_mask = 3
script = ExtResource("1_qty17")
[node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_qa0nx")
texture = SubResource("PlaceholderTexture2D_pkqou")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_satqt")
[node name="TargetCast" type="RayCast2D" parent="." groups=["damagable", "enemy"]]
enabled = false
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_qa0nx"),
&"generic_anims": ExtResource("2_pkqou")
}
[node name="ContactDamageCD" type="Timer" parent="."]
wait_time = 0.5
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
[node name="ShapeCast2D" type="ShapeCast2D" parent="."]
shape = SubResource("CircleShape2D_pkqou")
max_results = 2
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"]