|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
[ext_resource path="res://component/entity/brick/color_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/BrickMainColor.gd" type="Script" id=3]
|
|
|
[ext_resource path="res://component/entity/brick/BrickLifeDisplay.gd" type="Script" id=4]
|
|
|
[ext_resource path="res://component/entity/brick/common_brick.png" type="Texture" id=5]
|
|
|
|
|
@@ -18,10 +18,12 @@ script = ExtResource( 2 )
|
|
|
texture = ExtResource( 5 )
|
|
|
centered = false
|
|
|
|
|
|
-[node name="ColorSprite" type="Sprite" parent="."]
|
|
|
+[node name="MainColor" type="Node2D" parent="."]
|
|
|
+script = ExtResource( 3 )
|
|
|
+
|
|
|
+[node name="ColorSprite" type="Sprite" parent="MainColor"]
|
|
|
texture = ExtResource( 1 )
|
|
|
centered = false
|
|
|
-script = ExtResource( 3 )
|
|
|
|
|
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
|
|
position = Vector2( 20, 10 )
|
|
@@ -29,5 +31,5 @@ shape = SubResource( 1 )
|
|
|
|
|
|
[node name="LifeDisplay" type="Node2D" parent="."]
|
|
|
script = ExtResource( 4 )
|
|
|
+[connection signal="life_changed" from="." to="MainColor" method="_on_Brick_life_changed"]
|
|
|
[connection signal="life_changed" from="." to="LifeDisplay" method="_on_Brick_life_changed"]
|
|
|
-[connection signal="life_changed" from="." to="ColorSprite" method="_on_Brick_life_changed"]
|