bacteria.tscn 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. [gd_scene load_steps=18 format=2]
  2. [ext_resource path="res://bacteria.gd" type="Script" id=1]
  3. [ext_resource path="res://sprite/Besourinho.png" type="Texture" id=2]
  4. [ext_resource path="res://Health.tscn" type="PackedScene" id=3]
  5. [ext_resource path="res://hitbox.tscn" type="PackedScene" id=4]
  6. [ext_resource path="res://particles.tscn" type="PackedScene" id=5]
  7. [ext_resource path="res://newdynamicfont.tres" type="DynamicFont" id=6]
  8. [ext_resource path="res://ui/interfaceBevel.png" type="Texture" id=7]
  9. [ext_resource path="res://sounds/footsteps2.ogg" type="AudioStream" id=8]
  10. [sub_resource type="RectangleShape2D" id=1]
  11. [sub_resource type="StyleBoxFlat" id=4]
  12. bg_color = Color( 0.0705882, 0.262745, 0.329412, 1 )
  13. [sub_resource type="StyleBoxFlat" id=5]
  14. bg_color = Color( 0.0156863, 0.709804, 0.0196078, 1 )
  15. [sub_resource type="Theme" id=6]
  16. ProgressBar/colors/font_color = Color( 0, 0, 0, 1 )
  17. ProgressBar/colors/font_color_shadow = Color( 0, 0, 0, 1 )
  18. ProgressBar/fonts/font = null
  19. ProgressBar/styles/bg = SubResource( 4 )
  20. ProgressBar/styles/fg = SubResource( 5 )
  21. [sub_resource type="StyleBoxFlat" id=7]
  22. bg_color = Color( 0.270588, 0, 0, 1 )
  23. [sub_resource type="StyleBoxFlat" id=8]
  24. bg_color = Color( 1, 0, 0, 1 )
  25. [sub_resource type="Theme" id=9]
  26. ProgressBar/colors/font_color = Color( 0, 0, 0, 1 )
  27. ProgressBar/colors/font_color_shadow = Color( 0, 0, 0, 1 )
  28. ProgressBar/fonts/font = null
  29. ProgressBar/styles/bg = SubResource( 7 )
  30. ProgressBar/styles/fg = SubResource( 8 )
  31. [sub_resource type="Animation" id=2]
  32. resource_name = "Nova Animação"
  33. loop = true
  34. tracks/0/type = "value"
  35. tracks/0/path = NodePath("Icon/l/menbros0:rotation_degrees")
  36. tracks/0/interp = 1
  37. tracks/0/loop_wrap = true
  38. tracks/0/imported = false
  39. tracks/0/enabled = true
  40. tracks/0/keys = {
  41. "times": PoolRealArray( -0.00999999, 0.5, 0.99 ),
  42. "transitions": PoolRealArray( 1, 1, 1 ),
  43. "update": 0,
  44. "values": [ 70.0, 110.0, 70.0 ]
  45. }
  46. tracks/1/type = "value"
  47. tracks/1/path = NodePath("Icon/l/menbros1:rotation_degrees")
  48. tracks/1/interp = 1
  49. tracks/1/loop_wrap = true
  50. tracks/1/imported = false
  51. tracks/1/enabled = true
  52. tracks/1/keys = {
  53. "times": PoolRealArray( -0.00999999, 0.5, 1 ),
  54. "transitions": PoolRealArray( 1, 1, 1 ),
  55. "update": 0,
  56. "values": [ 70.0, 110.0, 70.0 ]
  57. }
  58. tracks/2/type = "value"
  59. tracks/2/path = NodePath("Icon/r/menbros0:rotation_degrees")
  60. tracks/2/interp = 1
  61. tracks/2/loop_wrap = true
  62. tracks/2/imported = false
  63. tracks/2/enabled = true
  64. tracks/2/keys = {
  65. "times": PoolRealArray( 0, 0.5, 1 ),
  66. "transitions": PoolRealArray( 1, 1, 1 ),
  67. "update": 0,
  68. "values": [ 110.0, 70.0, 110.0 ]
  69. }
  70. tracks/3/type = "value"
  71. tracks/3/path = NodePath("Icon/l/menbros2:rotation_degrees")
  72. tracks/3/interp = 1
  73. tracks/3/loop_wrap = true
  74. tracks/3/imported = false
  75. tracks/3/enabled = true
  76. tracks/3/keys = {
  77. "times": PoolRealArray( 0, 0.5, 1 ),
  78. "transitions": PoolRealArray( 1, 1, 1 ),
  79. "update": 0,
  80. "values": [ 110.0, 70.0, 110.0 ]
  81. }
  82. tracks/4/type = "value"
  83. tracks/4/path = NodePath("Icon/r/menbros1:rotation_degrees")
  84. tracks/4/interp = 1
  85. tracks/4/loop_wrap = true
  86. tracks/4/imported = false
  87. tracks/4/enabled = true
  88. tracks/4/keys = {
  89. "times": PoolRealArray( 0, 0.5, 1 ),
  90. "transitions": PoolRealArray( 1, 1, 1 ),
  91. "update": 0,
  92. "values": [ 110.0, 70.0, 110.0 ]
  93. }
  94. tracks/5/type = "value"
  95. tracks/5/path = NodePath("Icon/r/menbros2:rotation_degrees")
  96. tracks/5/interp = 1
  97. tracks/5/loop_wrap = true
  98. tracks/5/imported = false
  99. tracks/5/enabled = true
  100. tracks/5/keys = {
  101. "times": PoolRealArray( -0.00999999, 0.5, 1 ),
  102. "transitions": PoolRealArray( 1, 1, 1 ),
  103. "update": 0,
  104. "values": [ 70.0, 110.0, 70.0 ]
  105. }
  106. tracks/6/type = "value"
  107. tracks/6/path = NodePath("Icon:scale")
  108. tracks/6/interp = 1
  109. tracks/6/loop_wrap = true
  110. tracks/6/imported = false
  111. tracks/6/enabled = true
  112. tracks/6/keys = {
  113. "times": PoolRealArray( 0, 0.3, 0.7, 1 ),
  114. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  115. "update": 0,
  116. "values": [ Vector2( 1, 1 ), Vector2( 0.9, 1.1 ), Vector2( 1.05, 0.95 ), Vector2( 1, 1 ) ]
  117. }
  118. [sub_resource type="Animation" id=3]
  119. length = 0.001
  120. tracks/0/type = "value"
  121. tracks/0/path = NodePath("Icon/l/menbros0:rotation_degrees")
  122. tracks/0/interp = 1
  123. tracks/0/loop_wrap = true
  124. tracks/0/imported = false
  125. tracks/0/enabled = true
  126. tracks/0/keys = {
  127. "times": PoolRealArray( 0 ),
  128. "transitions": PoolRealArray( 1 ),
  129. "update": 0,
  130. "values": [ 90.0 ]
  131. }
  132. tracks/1/type = "value"
  133. tracks/1/path = NodePath("Icon/l/menbros1:rotation_degrees")
  134. tracks/1/interp = 1
  135. tracks/1/loop_wrap = true
  136. tracks/1/imported = false
  137. tracks/1/enabled = true
  138. tracks/1/keys = {
  139. "times": PoolRealArray( 0 ),
  140. "transitions": PoolRealArray( 1 ),
  141. "update": 0,
  142. "values": [ 90.0 ]
  143. }
  144. tracks/2/type = "value"
  145. tracks/2/path = NodePath("Icon/r/menbros0:rotation_degrees")
  146. tracks/2/interp = 1
  147. tracks/2/loop_wrap = true
  148. tracks/2/imported = false
  149. tracks/2/enabled = true
  150. tracks/2/keys = {
  151. "times": PoolRealArray( 0 ),
  152. "transitions": PoolRealArray( 1 ),
  153. "update": 0,
  154. "values": [ 90.0 ]
  155. }
  156. tracks/3/type = "value"
  157. tracks/3/path = NodePath("Icon/l/menbros2:rotation_degrees")
  158. tracks/3/interp = 1
  159. tracks/3/loop_wrap = true
  160. tracks/3/imported = false
  161. tracks/3/enabled = true
  162. tracks/3/keys = {
  163. "times": PoolRealArray( 0 ),
  164. "transitions": PoolRealArray( 1 ),
  165. "update": 0,
  166. "values": [ 90.0 ]
  167. }
  168. tracks/4/type = "value"
  169. tracks/4/path = NodePath("Icon/r/menbros1:rotation_degrees")
  170. tracks/4/interp = 1
  171. tracks/4/loop_wrap = true
  172. tracks/4/imported = false
  173. tracks/4/enabled = true
  174. tracks/4/keys = {
  175. "times": PoolRealArray( 0 ),
  176. "transitions": PoolRealArray( 1 ),
  177. "update": 0,
  178. "values": [ 90.0 ]
  179. }
  180. tracks/5/type = "value"
  181. tracks/5/path = NodePath("Icon/r/menbros2:rotation_degrees")
  182. tracks/5/interp = 1
  183. tracks/5/loop_wrap = true
  184. tracks/5/imported = false
  185. tracks/5/enabled = true
  186. tracks/5/keys = {
  187. "times": PoolRealArray( 0 ),
  188. "transitions": PoolRealArray( 1 ),
  189. "update": 0,
  190. "values": [ 90.0 ]
  191. }
  192. tracks/6/type = "value"
  193. tracks/6/path = NodePath("Icon:scale")
  194. tracks/6/interp = 1
  195. tracks/6/loop_wrap = true
  196. tracks/6/imported = false
  197. tracks/6/enabled = true
  198. tracks/6/keys = {
  199. "times": PoolRealArray( 0 ),
  200. "transitions": PoolRealArray( 1 ),
  201. "update": 0,
  202. "values": [ Vector2( 1, 1 ) ]
  203. }
  204. [node name="bacteria" type="KinematicBody2D" groups=["player"]]
  205. script = ExtResource( 1 )
  206. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  207. shape = SubResource( 1 )
  208. [node name="Camera2D" type="Camera2D" parent="."]
  209. current = true
  210. [node name="hitbox" parent="." instance=ExtResource( 4 )]
  211. dmg = 10
  212. [node name="particles" parent="." instance=ExtResource( 5 )]
  213. rotation = 1.5708
  214. [node name="Icon" type="Sprite" parent="."]
  215. texture = ExtResource( 2 )
  216. [node name="l" type="Node2D" parent="Icon"]
  217. z_index = -1
  218. [node name="menbros0" type="Position2D" parent="Icon/l"]
  219. position = Vector2( -27, -20 )
  220. rotation = 1.5708
  221. [node name="menbros1" type="Position2D" parent="Icon/l"]
  222. position = Vector2( 8, -16 )
  223. rotation = 1.5708
  224. [node name="menbros2" type="Position2D" parent="Icon/l"]
  225. position = Vector2( -9, -20 )
  226. rotation = 1.5708
  227. [node name="r" type="Node2D" parent="Icon"]
  228. scale = Vector2( 1, -1 )
  229. z_index = -1
  230. [node name="menbros0" type="Position2D" parent="Icon/r"]
  231. position = Vector2( -27, -20 )
  232. rotation = 1.5708
  233. [node name="menbros1" type="Position2D" parent="Icon/r"]
  234. position = Vector2( 8, -16 )
  235. rotation = 1.5708
  236. [node name="menbros2" type="Position2D" parent="Icon/r"]
  237. position = Vector2( -9, -20 )
  238. rotation = 1.5708
  239. [node name="Health" parent="." instance=ExtResource( 3 )]
  240. health_max = 50
  241. progressbar = NodePath("../CanvasLayer/ProgressBar3")
  242. text = NodePath("../CanvasLayer/VBoxContainer/Label2")
  243. [node name="CanvasLayer" type="CanvasLayer" parent="."]
  244. offset = Vector2( 0, 60 )
  245. transform = Transform2D( 1, 0, 0, 1, 0, 60 )
  246. [node name="ProgressBar2" type="ProgressBar" parent="CanvasLayer"]
  247. show_behind_parent = true
  248. margin_left = 22.0
  249. margin_top = 21.0
  250. margin_right = 520.0
  251. margin_bottom = 37.0
  252. theme = SubResource( 6 )
  253. custom_fonts/font = ExtResource( 6 )
  254. max_value = 0.1
  255. percent_visible = false
  256. [node name="ProgressBar3" type="ProgressBar" parent="CanvasLayer"]
  257. show_behind_parent = true
  258. margin_left = 41.0
  259. margin_top = 38.0
  260. margin_right = 501.0
  261. margin_bottom = 54.0
  262. theme = SubResource( 9 )
  263. custom_fonts/font = ExtResource( 6 )
  264. max_value = 50.0
  265. value = 20.0
  266. percent_visible = false
  267. [node name="InterfaceBevel" type="Sprite" parent="CanvasLayer"]
  268. scale = Vector2( 0.75, 0.75 )
  269. texture = ExtResource( 7 )
  270. centered = false
  271. [node name="VBoxContainer" type="Control" parent="CanvasLayer"]
  272. anchor_right = 1.0
  273. anchor_bottom = 1.0
  274. [node name="Label" type="Label" parent="CanvasLayer/VBoxContainer"]
  275. margin_top = 22.0
  276. margin_right = 540.0
  277. margin_bottom = 41.0
  278. custom_fonts/font = ExtResource( 6 )
  279. text = "0"
  280. align = 1
  281. [node name="Label2" type="Label" parent="CanvasLayer/VBoxContainer"]
  282. margin_top = 38.0
  283. margin_right = 540.0
  284. margin_bottom = 57.0
  285. custom_fonts/font = ExtResource( 6 )
  286. text = "999"
  287. align = 1
  288. [node name="Label3" type="Label" parent="CanvasLayer/VBoxContainer"]
  289. margin_top = 6.0
  290. margin_right = 540.0
  291. margin_bottom = 25.0
  292. custom_fonts/font = ExtResource( 6 )
  293. text = "Lv.1"
  294. align = 1
  295. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  296. autoplay = "Nova Animação"
  297. playback_speed = 1.5
  298. "anims/Nova Animação" = SubResource( 2 )
  299. anims/RESET = SubResource( 3 )
  300. [node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
  301. stream = ExtResource( 8 )
  302. autoplay = true
  303. bus = "sfx"
  304. [connection signal="gotxp" from="hitbox" to="." method="_on_hitbox_gotxp"]
  305. [connection signal="regenhealth" from="hitbox" to="Health" method="_damage"]
  306. [connection signal="die" from="Health" to="." method="_on_Health_die"]