fuzzyworld

godot-shooter / change-html-template / files / Enemy.tscn

Branch change-html-template · default branch · all branches

Enemy.tscn

3.7 KB · history · blame

1[gd_scene load_steps=8 format=2]
2
3[ext_resource path="res://assets/kenney_simple-space/PNG/Default/enemy_A.png" type="Texture" id=1]
4[ext_resource path="res://Enemy.gd" type="Script" id=2]
5[ext_resource path="res://assets/kenney_crosshair-pack/PNG/White Retina/crosshair041.png" type="Texture" id=3]
6[ext_resource path="res://CharacterTheme.tres" type="Theme" id=4]
7
8[sub_resource type="Animation" id=1]
9length = 3.0
10
11[sub_resource type="Animation" id=3]
12resource_name = "fade_in"
13length = 3.0
14tracks/0/type = "value"
15tracks/0/path = NodePath(".:modulate")
16tracks/0/interp = 1
17tracks/0/loop_wrap = true
18tracks/0/imported = false
19tracks/0/enabled = true
20tracks/0/keys = {
21"times": PoolRealArray( 0, 3 ),
22"transitions": PoolRealArray( 1, 1 ),
23"update": 0,
24"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
25}
26tracks/1/type = "value"
27tracks/1/path = NodePath(".:scale")
28tracks/1/interp = 1
29tracks/1/loop_wrap = true
30tracks/1/imported = false
31tracks/1/enabled = true
32tracks/1/keys = {
33"times": PoolRealArray( -0.2, 3 ),
34"transitions": PoolRealArray( 1, 1 ),
35"update": 0,
36"values": [ Vector2( 0.01, 0.01 ), Vector2( 1, 1 ) ]
37}
38
39[sub_resource type="Animation" id=2]
40resource_name = "fade_out"
41tracks/0/type = "value"
42tracks/0/path = NodePath(".:modulate")
43tracks/0/interp = 1
44tracks/0/loop_wrap = true
45tracks/0/imported = false
46tracks/0/enabled = true
47tracks/0/keys = {
48"times": PoolRealArray( 0, 1 ),
49"transitions": PoolRealArray( 1, 1 ),
50"update": 0,
51"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
52}
53tracks/1/type = "method"
54tracks/1/path = NodePath(".")
55tracks/1/interp = 1
56tracks/1/loop_wrap = true
57tracks/1/imported = false
58tracks/1/enabled = true
59tracks/1/keys = {
60"times": PoolRealArray( 1 ),
61"transitions": PoolRealArray( 1 ),
62"values": [ {
63"args": [ ],
64"method": "remove_thyself"
65} ]
66}
67
68[node name="Enemy" type="KinematicBody2D"]
69script = ExtResource( 2 )
70max_health = 5
71
72[node name="Graphics" type="Node2D" parent="."]
73
74[node name="Alive" type="Sprite" parent="Graphics"]
75modulate = Color( 1, 0.537255, 0, 1 )
76texture = ExtResource( 1 )
77
78[node name="Container" type="Node2D" parent="Graphics/Alive"]
79
80[node name="HealthLabel" type="Label" parent="Graphics/Alive/Container"]
81margin_left = -25.0
82margin_top = 37.0
83margin_right = 25.0
84margin_bottom = 51.0
85theme = ExtResource( 4 )
86text = "HEALTH"
87
88[node name="Target" type="Sprite" parent="Graphics/Alive"]
89modulate = Color( 1, 0, 0, 1 )
90texture = ExtResource( 3 )
91
92[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
93anims/RESET = SubResource( 1 )
94anims/fade_in = SubResource( 3 )
95anims/fade_out = SubResource( 2 )
96
97[node name="DamagePoints" type="Node2D" parent="."]
98
99[node name="Position2D" type="Position2D" parent="DamagePoints"]
100position = Vector2( -16, 16 )
101
102[node name="Position2D4" type="Position2D" parent="DamagePoints"]
103position = Vector2( 0, -13 )
104
105[node name="Position2D2" type="Position2D" parent="DamagePoints"]
106position = Vector2( 16, 16 )
107
108[node name="RayCast2D" type="RayCast2D" parent="."]
109enabled = true
110cast_to = Vector2( 0, -50 )
111
112[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
113polygon = PoolVector2Array( 0, -23, -7, 5, -12, 9, -19, 9, -23, 14, -23, 19, -19, 23, -14, 23, -9, 19, -9, 14, -10, 12, -6, 9, 0, 15, 6, 9, 10, 12, 9, 14, 9, 19, 13, 23, 18, 23, 23, 18, 23, 14, 19, 10, 13, 10, 7, 5 )
114
115[node name="Area2D" type="Area2D" parent="."]
116
117[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Area2D"]
118polygon = PoolVector2Array( 0, -23, -7, 5, -12, 9, -19, 9, -23, 14, -23, 19, -19, 23, -14, 23, -9, 19, -9, 14, -10, 12, -6, 9, 0, 15, 6, 9, 10, 12, 9, 14, 9, 19, 13, 23, 18, 23, 23, 18, 23, 14, 19, 10, 13, 10, 7, 5 )
119
120[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]