Button.tscn 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. [gd_scene load_steps=23 format=2]
  2. [ext_resource path="res://ui/TouchScreenButton.gd" type="Script" id=1]
  3. [ext_resource path="res://icon.png" type="Texture" id=2]
  4. [ext_resource path="res://sounds/sfx1.ogg" type="AudioStream" id=3]
  5. [ext_resource path="res://newdynamicfont.tres" type="DynamicFont" id=4]
  6. [ext_resource path="res://sounds/sfx2.ogg" type="AudioStream" id=5]
  7. [ext_resource path="res://sprite/symbols/icons/health.PNG" type="Texture" id=6]
  8. [ext_resource path="res://sprite/symbols/icons/speed.PNG" type="Texture" id=7]
  9. [ext_resource path="res://sprite/symbols/icons/swordred.PNG" type="Texture" id=8]
  10. [ext_resource path="res://sprite/symbols/icons/range.PNG" type="Texture" id=9]
  11. [ext_resource path="res://sprite/symbols/icons/icons/2Estrelas.PNG" type="Texture" id=10]
  12. [ext_resource path="res://sprite/symbols/icons/icons/5Estrelas.PNG" type="Texture" id=11]
  13. [ext_resource path="res://sprite/symbols/icons/icons/6Estrelas.PNG" type="Texture" id=12]
  14. [ext_resource path="res://sprite/symbols/icons/icons/7Estrelas.PNG" type="Texture" id=13]
  15. [ext_resource path="res://sprite/symbols/icons/starbase.PNG" type="Texture" id=14]
  16. [ext_resource path="res://sprite/symbols/icons/attackspeed.png" type="Texture" id=15]
  17. [ext_resource path="res://sprite/symbols/icons/swordpurple.PNG" type="Texture" id=16]
  18. [ext_resource path="res://sprite/symbols/icons/icons/8Estrelas.PNG" type="Texture" id=17]
  19. [ext_resource path="res://sprite/symbols/icons/icons/4Estrelas.PNG" type="Texture" id=18]
  20. [ext_resource path="res://sprite/symbols/icons/icons/3Estrelas.PNG" type="Texture" id=19]
  21. [ext_resource path="res://sprite/symbols/icons/icons/1Estrela.PNG" type="Texture" id=20]
  22. [sub_resource type="SpriteFrames" id=2]
  23. animations = [ {
  24. "frames": [ ExtResource( 6 ), ExtResource( 9 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 16 ), ExtResource( 15 ) ],
  25. "loop": true,
  26. "name": "default",
  27. "speed": 5.0
  28. }, {
  29. "frames": [ ExtResource( 20 ), ExtResource( 10 ), ExtResource( 19 ), ExtResource( 18 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 13 ), ExtResource( 17 ) ],
  30. "loop": true,
  31. "name": "stars",
  32. "speed": 5.0
  33. }, {
  34. "frames": [ ExtResource( 14 ) ],
  35. "loop": true,
  36. "name": "starbase",
  37. "speed": 5.0
  38. } ]
  39. [sub_resource type="RectangleShape2D" id=1]
  40. [node name="Button" type="TouchScreenButton"]
  41. normal = ExtResource( 2 )
  42. script = ExtResource( 1 )
  43. [node name="Button" type="Button" parent="."]
  44. margin_right = 63.0
  45. margin_bottom = 66.0
  46. flat = true
  47. [node name="Label" type="Label" parent="."]
  48. margin_left = -275.0
  49. margin_top = -1.0
  50. margin_right = -6.0
  51. margin_bottom = 63.0
  52. custom_fonts/font = ExtResource( 4 )
  53. text = "stuff"
  54. align = 1
  55. valign = 2
  56. [node name="Label" type="Label" parent="Label"]
  57. anchor_right = 1.0
  58. anchor_bottom = 1.0
  59. custom_fonts/font = ExtResource( 4 )
  60. align = 1
  61. [node name="ColorRect" type="ColorRect" parent="Label"]
  62. show_behind_parent = true
  63. anchor_right = 1.0
  64. anchor_bottom = 1.0
  65. color = Color( 0, 0, 0, 0.321569 )
  66. [node name="icons" type="Node2D" parent="Label"]
  67. position = Vector2( 9, 3 )
  68. scale = Vector2( 0.8, 0.8 )
  69. [node name="icon1" type="AnimatedSprite" parent="Label/icons"]
  70. position = Vector2( 27.5, 21.5 )
  71. frames = SubResource( 2 )
  72. [node name="starsback" type="AnimatedSprite" parent="Label/icons/icon1"]
  73. visible = false
  74. position = Vector2( 51, 0 )
  75. frames = SubResource( 2 )
  76. animation = "starbase"
  77. [node name="stars" type="AnimatedSprite" parent="Label/icons/icon1"]
  78. position = Vector2( 51, 0 )
  79. frames = SubResource( 2 )
  80. animation = "stars"
  81. [node name="icon2" type="AnimatedSprite" parent="Label/icons"]
  82. position = Vector2( 134.5, 21.5 )
  83. frames = SubResource( 2 )
  84. frame = 1
  85. [node name="starsback" type="AnimatedSprite" parent="Label/icons/icon2"]
  86. visible = false
  87. position = Vector2( 51, 0 )
  88. frames = SubResource( 2 )
  89. animation = "starbase"
  90. [node name="stars" type="AnimatedSprite" parent="Label/icons/icon2"]
  91. position = Vector2( 51, 0 )
  92. frames = SubResource( 2 )
  93. animation = "stars"
  94. [node name="icon3" type="AnimatedSprite" parent="Label/icons"]
  95. position = Vector2( 238, 21.5 )
  96. frames = SubResource( 2 )
  97. frame = 2
  98. [node name="starsback" type="AnimatedSprite" parent="Label/icons/icon3"]
  99. visible = false
  100. position = Vector2( 51, 0 )
  101. frames = SubResource( 2 )
  102. animation = "starbase"
  103. [node name="stars" type="AnimatedSprite" parent="Label/icons/icon3"]
  104. position = Vector2( 51, 0 )
  105. frames = SubResource( 2 )
  106. animation = "stars"
  107. [node name="col" type="Area2D" parent="."]
  108. collision_layer = 0
  109. collision_mask = 0
  110. [node name="CollisionShape2D" type="CollisionShape2D" parent="col"]
  111. position = Vector2( 32, 32 )
  112. shape = SubResource( 1 )
  113. [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
  114. stream = ExtResource( 3 )
  115. bus = "menu"
  116. [node name="AudioStreamPlayer2" type="AudioStreamPlayer" parent="."]
  117. stream = ExtResource( 5 )
  118. bus = "menu"
  119. [connection signal="pressed" from="." to="AudioStreamPlayer" method="play"]
  120. [connection signal="released" from="." to="AudioStreamPlayer2" method="play"]
  121. [connection signal="mouse_entered" from="Button" to="." method="_on_Button_mouse_entered"]
  122. [connection signal="mouse_exited" from="Button" to="." method="_on_Button_mouse_exited"]