-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUnit.tscn
112 lines (90 loc) · 2.77 KB
/
Unit.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
[gd_scene load_steps=11 format=2]
[ext_resource path="res://Unit.gd" type="Script" id=1]
[ext_resource path="res://images/enemy_idle1.png" type="Texture" id=2]
[ext_resource path="res://images/enemy_idle2.png" type="Texture" id=3]
[ext_resource path="res://images/enemy_idle3.png" type="Texture" id=4]
[ext_resource path="res://images/enemy_idle4.png" type="Texture" id=5]
[ext_resource path="res://HealthBar.tscn" type="PackedScene" id=6]
[sub_resource type="RectangleShape2D" id=1]
custom_solver_bias = 0.0
extents = Vector2( 32, 32 )
[sub_resource type="SpriteFrames" id=2]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "default",
"speed": 12.0
} ]
[sub_resource type="Animation" id=3]
resource_name = "death"
length = 1.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("AnimatedSprite:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 0, 0, 0, 1 ) ]
}
[sub_resource type="Animation" id=4]
resource_name = "hit"
length = 0.5
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("AnimatedSprite:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 0.496094, 0.496094, 1 ), Color( 1, 1, 1, 1 ) ]
}
[node name="Unit" type="Area2D" index="0"]
input_pickable = true
gravity_vec = Vector2( 0, 0 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
audio_bus_override = false
audio_bus_name = "Master"
script = ExtResource( 1 )
_sections_unfolded = [ "Transform" ]
__meta__ = {
"_edit_group_": true,
"_edit_vertical_guides_": [ ]
}
max_health = 100.0
damage = 15
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="0"]
shape = SubResource( 1 )
_sections_unfolded = [ "Transform", "Z Index" ]
[node name="AnimatedSprite" type="AnimatedSprite" parent="." index="1"]
frames = SubResource( 2 )
animation = "default"
_sections_unfolded = [ "Material", "Visibility" ]
[node name="HealthBarContainer" parent="." index="2" instance=ExtResource( 6 )]
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="3"]
root_node = NodePath("..")
autoplay = ""
playback_process_mode = 1
playback_default_blend_time = 0.0
playback_speed = 1.0
anims/death = SubResource( 3 )
anims/hit = SubResource( 4 )
blend_times = [ ]
_sections_unfolded = [ "Playback Options" ]
[node name="InvincibleTimer" type="Timer" parent="." index="4"]
process_mode = 1
wait_time = 0.5
one_shot = true
autostart = false