summaryrefslogtreecommitdiff
path: root/unit/unit.tscn
blob: b69e71702e53ca70e3d59c7b70377e5e21e35c09 (plain)
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
[gd_scene load_steps=7 format=3 uid="uid://dglv8ajgj4i4c"]

[ext_resource type="Texture2D" uid="uid://blanietpri1be" path="res://icon.svg" id="1_0d47j"]
[ext_resource type="Script" uid="uid://rbk7n3puwr3q" path="res://unit/unit.gd" id="1_5uy8y"]
[ext_resource type="Script" uid="uid://bs4wgt1curlf7" path="res://unit/unit_data.gd" id="2_japly"]
[ext_resource type="Script" uid="uid://drs01qvt6fnrx" path="res://area_2d.gd" id="3_hs7ws"]

[sub_resource type="Resource" id="Resource_japly"]
script = ExtResource("2_japly")
health = 2
attack = 2
defense = 1
metadata/_custom_type_script = "uid://bs4wgt1curlf7"

[sub_resource type="RectangleShape2D" id="RectangleShape2D_4xd6x"]
size = Vector2(8, 8)

[node name="Unit" type="Node2D"]
z_index = 2
script = ExtResource("1_5uy8y")
unit_data = SubResource("Resource_japly")

[node name="Icon" type="Sprite2D" parent="."]
scale = Vector2(0.063, 0.063)
texture = ExtResource("1_0d47j")

[node name="Area2D" type="Area2D" parent="." node_paths=PackedStringArray("root_node")]
collision_layer = 2
collision_mask = 0
script = ExtResource("3_hs7ws")
root_node = NodePath("..")

[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("RectangleShape2D_4xd6x")

[node name="Label" type="Label" parent="."]
offset_left = -5.0
offset_right = 5.0
offset_bottom = 23.0
text = "0"