|
@@ -1,8 +1,9 @@
|
|
|
-[gd_scene load_steps=5 format=2]
|
|
|
+[gd_scene load_steps=6 format=2]
|
|
|
|
|
|
[ext_resource path="res://component/entity/brick/brik.png" type="Texture" id=1]
|
|
|
[ext_resource path="res://component/entity/brick/Brick.gd" type="Script" id=2]
|
|
|
[ext_resource path="res://component/entity/brick/BrickMainSprite.gd" type="Script" id=3]
|
|
|
+[ext_resource path="res://component/entity/brick/BrickLifeDisplay.gd" type="Script" id=4]
|
|
|
|
|
|
[sub_resource type="RectangleShape2D" id=1]
|
|
|
extents = Vector2( 20, 10 )
|
|
@@ -20,5 +21,9 @@ script = ExtResource( 3 )
|
|
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
|
|
position = Vector2( 20, 10 )
|
|
|
shape = SubResource( 1 )
|
|
|
+
|
|
|
+[node name="LifeDisplay" type="Node2D" parent="."]
|
|
|
+script = ExtResource( 4 )
|
|
|
[connection signal="kace_damaged" from="." to="Sprite" method="_on_Brick_kace_damaged"]
|
|
|
[connection signal="life_changed" from="." to="Sprite" method="_on_Brick_life_changed"]
|
|
|
+[connection signal="life_changed" from="." to="LifeDisplay" method="_on_Brick_life_changed"]
|