Brick.tscn 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. [gd_scene load_steps=7 format=2]
  2. [ext_resource path="res://component/entity/brick/color_brik.png" type="Texture" id=1]
  3. [ext_resource path="res://component/entity/brick/Brick.gd" type="Script" id=2]
  4. [ext_resource path="res://component/entity/brick/BrickMainSprite.gd" type="Script" id=3]
  5. [ext_resource path="res://component/entity/brick/BrickLifeDisplay.gd" type="Script" id=4]
  6. [ext_resource path="res://component/entity/brick/common_brick.png" type="Texture" id=5]
  7. [sub_resource type="RectangleShape2D" id=1]
  8. extents = Vector2( 20, 10 )
  9. [node name="Brick" type="StaticBody2D"]
  10. collision_layer = 4
  11. collision_mask = 0
  12. script = ExtResource( 2 )
  13. [node name="BackSprite" type="Sprite" parent="."]
  14. texture = ExtResource( 5 )
  15. centered = false
  16. [node name="ColorSprite" type="Sprite" parent="."]
  17. texture = ExtResource( 1 )
  18. centered = false
  19. script = ExtResource( 3 )
  20. [node name="Shape" type="CollisionShape2D" parent="."]
  21. position = Vector2( 20, 10 )
  22. shape = SubResource( 1 )
  23. [node name="LifeDisplay" type="Node2D" parent="."]
  24. script = ExtResource( 4 )
  25. [connection signal="life_changed" from="." to="LifeDisplay" method="_on_Brick_life_changed"]
  26. [connection signal="life_changed" from="." to="ColorSprite" method="_on_Brick_life_changed"]