main.tscn 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. [gd_scene load_steps=8 format=3 uid="uid://dath4f6h4tbmk"]
  2. [ext_resource type="Script" path="res://main.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://bqpyg61et07pf" path="res://godot.png" id="2_tapbf"]
  4. [sub_resource type="Gradient" id="Gradient_npp8a"]
  5. offsets = PackedFloat32Array(0)
  6. colors = PackedColorArray(0, 0, 0, 1)
  7. [sub_resource type="GradientTexture2D" id="GradientTexture2D_md057"]
  8. gradient = SubResource("Gradient_npp8a")
  9. width = 800
  10. height = 10
  11. [sub_resource type="Gradient" id="Gradient_vuuif"]
  12. offsets = PackedFloat32Array(0)
  13. colors = PackedColorArray(0, 1, 0, 1)
  14. [sub_resource type="GradientTexture2D" id="GradientTexture2D_35fte"]
  15. gradient = SubResource("Gradient_vuuif")
  16. width = 800
  17. height = 10
  18. [sub_resource type="Curve2D" id="Curve2D_7nae7"]
  19. _data = {
  20. "points": PackedVector2Array(-142, -129, 142, 129, 2, 2, 0, 0, 0, 0, 311, 5, 172, -42, -172, 42, 45, -130, 83, 25, -83, -25, -150, -7, -16, 28, 16, -28, -198, -75, 0, 0, 0, 0, -71, -132)
  21. }
  22. point_count = 6
  23. [node name="TweenDemo" type="CanvasLayer"]
  24. script = ExtResource("1")
  25. metadata/_edit_lock_ = true
  26. [node name="VBoxContainer" type="VBoxContainer" parent="."]
  27. anchors_preset = 15
  28. anchor_right = 1.0
  29. anchor_bottom = 1.0
  30. grow_horizontal = 2
  31. grow_vertical = 2
  32. [node name="ColorRect" type="ColorRect" parent="VBoxContainer"]
  33. layout_mode = 2
  34. size_flags_vertical = 3
  35. color = Color(0.027451, 0, 0.168627, 1)
  36. [node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
  37. layout_mode = 2
  38. [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/PanelContainer"]
  39. layout_mode = 2
  40. [node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer"]
  41. layout_mode = 2
  42. alignment = 1
  43. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer3"]
  44. layout_mode = 2
  45. text = "Loops"
  46. [node name="Loops" type="SpinBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer3"]
  47. unique_name_in_owner = true
  48. layout_mode = 2
  49. min_value = 1.0
  50. value = 1.0
  51. [node name="Infinite" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer3"]
  52. unique_name_in_owner = true
  53. layout_mode = 2
  54. text = "Infinite?"
  55. [node name="Reset" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer3"]
  56. unique_name_in_owner = true
  57. layout_mode = 2
  58. tooltip_text = "If enabled, the Tween will take an extra step to ensure
  59. that all properties are restored to their initial value."
  60. button_pressed = true
  61. text = "Reset Between Loops?"
  62. [node name="Button" type="Button" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer3"]
  63. layout_mode = 2
  64. text = "Start Animation"
  65. [node name="HSeparator2" type="HSeparator" parent="VBoxContainer/PanelContainer/VBoxContainer"]
  66. layout_mode = 2
  67. [node name="HFlowContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer"]
  68. layout_mode = 2
  69. theme_override_constants/separation = 16
  70. alignment = 1
  71. [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  72. layout_mode = 2
  73. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer"]
  74. layout_mode = 2
  75. text = "Step 1"
  76. horizontal_alignment = 1
  77. [node name="MoveTo" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer"]
  78. unique_name_in_owner = true
  79. layout_mode = 2
  80. button_pressed = true
  81. text = "Move To"
  82. [node name="Ease1" type="OptionButton" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer"]
  83. unique_name_in_owner = true
  84. layout_mode = 2
  85. item_count = 4
  86. selected = 0
  87. popup/item_0/text = "In"
  88. popup/item_0/id = 0
  89. popup/item_1/text = "Out"
  90. popup/item_1/id = 1
  91. popup/item_2/text = "In/Out"
  92. popup/item_2/id = 2
  93. popup/item_3/text = "Out/In"
  94. popup/item_3/id = 3
  95. [node name="Trans1" type="OptionButton" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer"]
  96. unique_name_in_owner = true
  97. layout_mode = 2
  98. item_count = 11
  99. selected = 0
  100. popup/item_0/text = "Linear"
  101. popup/item_0/id = 2
  102. popup/item_1/text = "Sine"
  103. popup/item_1/id = 1
  104. popup/item_2/text = "Quint"
  105. popup/item_2/id = 2
  106. popup/item_3/text = "Quart"
  107. popup/item_3/id = 3
  108. popup/item_4/text = "Quad"
  109. popup/item_4/id = 4
  110. popup/item_5/text = "Expo"
  111. popup/item_5/id = 5
  112. popup/item_6/text = "Elastic"
  113. popup/item_6/id = 6
  114. popup/item_7/text = "Cubic"
  115. popup/item_7/id = 7
  116. popup/item_8/text = "Circ"
  117. popup/item_8/id = 8
  118. popup/item_9/text = "Bounce"
  119. popup/item_9/id = 9
  120. popup/item_10/text = "Back"
  121. popup/item_10/id = 10
  122. [node name="VBoxContainer2" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  123. layout_mode = 2
  124. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer2"]
  125. layout_mode = 2
  126. text = "Step 2"
  127. horizontal_alignment = 1
  128. [node name="ColorRed" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer2"]
  129. unique_name_in_owner = true
  130. layout_mode = 2
  131. button_pressed = true
  132. text = "Color Red"
  133. [node name="VBoxContainer3" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  134. layout_mode = 2
  135. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer3"]
  136. layout_mode = 2
  137. text = "Step 3"
  138. horizontal_alignment = 1
  139. [node name="MoveRight" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer3"]
  140. unique_name_in_owner = true
  141. layout_mode = 2
  142. button_pressed = true
  143. text = "Move Right"
  144. [node name="Roll" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer3"]
  145. unique_name_in_owner = true
  146. layout_mode = 2
  147. button_pressed = true
  148. text = "Roll"
  149. [node name="Ease3" type="OptionButton" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer3"]
  150. unique_name_in_owner = true
  151. layout_mode = 2
  152. item_count = 4
  153. selected = 0
  154. popup/item_0/text = "In"
  155. popup/item_0/id = 0
  156. popup/item_1/text = "Out"
  157. popup/item_1/id = 1
  158. popup/item_2/text = "In/Out"
  159. popup/item_2/id = 2
  160. popup/item_3/text = "Out/In"
  161. popup/item_3/id = 3
  162. [node name="Trans3" type="OptionButton" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer3"]
  163. unique_name_in_owner = true
  164. layout_mode = 2
  165. item_count = 11
  166. selected = 10
  167. popup/item_0/text = "Linear"
  168. popup/item_0/id = 2
  169. popup/item_1/text = "Sine"
  170. popup/item_1/id = 1
  171. popup/item_2/text = "Quint"
  172. popup/item_2/id = 2
  173. popup/item_3/text = "Quart"
  174. popup/item_3/id = 3
  175. popup/item_4/text = "Quad"
  176. popup/item_4/id = 4
  177. popup/item_5/text = "Expo"
  178. popup/item_5/id = 5
  179. popup/item_6/text = "Elastic"
  180. popup/item_6/id = 6
  181. popup/item_7/text = "Cubic"
  182. popup/item_7/id = 7
  183. popup/item_8/text = "Circ"
  184. popup/item_8/id = 8
  185. popup/item_9/text = "Bounce"
  186. popup/item_9/id = 9
  187. popup/item_10/text = "Back"
  188. popup/item_10/id = 10
  189. [node name="VBoxContainer4" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  190. layout_mode = 2
  191. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer4"]
  192. layout_mode = 2
  193. text = "Step 4"
  194. horizontal_alignment = 1
  195. [node name="MoveLeft" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer4"]
  196. unique_name_in_owner = true
  197. layout_mode = 2
  198. button_pressed = true
  199. text = "Move Left"
  200. [node name="Jump" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer4"]
  201. unique_name_in_owner = true
  202. layout_mode = 2
  203. button_pressed = true
  204. text = "Jump"
  205. [node name="VBoxContainer5" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  206. layout_mode = 2
  207. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer5"]
  208. layout_mode = 2
  209. text = "Step 5"
  210. horizontal_alignment = 1
  211. [node name="Blink" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer5"]
  212. unique_name_in_owner = true
  213. layout_mode = 2
  214. button_pressed = true
  215. text = "Blink"
  216. [node name="VBoxContainer6" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  217. layout_mode = 2
  218. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer6"]
  219. layout_mode = 2
  220. text = "Step 6"
  221. horizontal_alignment = 1
  222. [node name="Teleport" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer6"]
  223. unique_name_in_owner = true
  224. layout_mode = 2
  225. button_pressed = true
  226. text = "Teleport"
  227. [node name="VBoxContainer10" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  228. layout_mode = 2
  229. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer10"]
  230. layout_mode = 2
  231. text = "Step 7"
  232. horizontal_alignment = 1
  233. [node name="Curve" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer10"]
  234. unique_name_in_owner = true
  235. layout_mode = 2
  236. button_pressed = true
  237. text = "Curve"
  238. [node name="Ease7" type="OptionButton" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer10"]
  239. unique_name_in_owner = true
  240. layout_mode = 2
  241. item_count = 4
  242. selected = 1
  243. popup/item_0/text = "In"
  244. popup/item_0/id = 0
  245. popup/item_1/text = "Out"
  246. popup/item_1/id = 1
  247. popup/item_2/text = "In/Out"
  248. popup/item_2/id = 2
  249. popup/item_3/text = "Out/In"
  250. popup/item_3/id = 3
  251. [node name="Trans7" type="OptionButton" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer10"]
  252. unique_name_in_owner = true
  253. layout_mode = 2
  254. item_count = 11
  255. selected = 9
  256. popup/item_0/text = "Linear"
  257. popup/item_0/id = 2
  258. popup/item_1/text = "Sine"
  259. popup/item_1/id = 1
  260. popup/item_2/text = "Quint"
  261. popup/item_2/id = 2
  262. popup/item_3/text = "Quart"
  263. popup/item_3/id = 3
  264. popup/item_4/text = "Quad"
  265. popup/item_4/id = 4
  266. popup/item_5/text = "Expo"
  267. popup/item_5/id = 5
  268. popup/item_6/text = "Elastic"
  269. popup/item_6/id = 6
  270. popup/item_7/text = "Cubic"
  271. popup/item_7/id = 7
  272. popup/item_8/text = "Circ"
  273. popup/item_8/id = 8
  274. popup/item_9/text = "Bounce"
  275. popup/item_9/id = 9
  276. popup/item_10/text = "Back"
  277. popup/item_10/id = 10
  278. [node name="VBoxContainer9" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  279. layout_mode = 2
  280. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer9"]
  281. layout_mode = 2
  282. text = "Step 8"
  283. horizontal_alignment = 1
  284. [node name="Wait" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer9"]
  285. unique_name_in_owner = true
  286. layout_mode = 2
  287. button_pressed = true
  288. text = "Wait"
  289. [node name="VBoxContainer7" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  290. layout_mode = 2
  291. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer7"]
  292. layout_mode = 2
  293. text = "Step 9"
  294. horizontal_alignment = 1
  295. [node name="Countdown" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer7"]
  296. unique_name_in_owner = true
  297. layout_mode = 2
  298. button_pressed = true
  299. text = "Countdown"
  300. [node name="VBoxContainer8" type="VBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer"]
  301. layout_mode = 2
  302. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer8"]
  303. layout_mode = 2
  304. text = "Step 10"
  305. horizontal_alignment = 1
  306. [node name="Enlarge" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer8"]
  307. unique_name_in_owner = true
  308. layout_mode = 2
  309. button_pressed = true
  310. text = "Enlarge"
  311. [node name="Vanish" type="CheckBox" parent="VBoxContainer/PanelContainer/VBoxContainer/HFlowContainer/VBoxContainer8"]
  312. unique_name_in_owner = true
  313. layout_mode = 2
  314. button_pressed = true
  315. text = "Vanish"
  316. [node name="HSeparator" type="HSeparator" parent="VBoxContainer/PanelContainer/VBoxContainer"]
  317. layout_mode = 2
  318. [node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer"]
  319. layout_mode = 2
  320. alignment = 1
  321. [node name="Button2" type="Button" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer4"]
  322. layout_mode = 2
  323. text = "Pause/Resume"
  324. [node name="Button3" type="Button" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer4"]
  325. layout_mode = 2
  326. text = "Kill Tween"
  327. [node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/PanelContainer/VBoxContainer"]
  328. layout_mode = 2
  329. alignment = 1
  330. [node name="Label" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer2"]
  331. layout_mode = 2
  332. text = "Speed Scale"
  333. [node name="SpeedSlider" type="HSlider" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer2"]
  334. unique_name_in_owner = true
  335. custom_minimum_size = Vector2(600, 0)
  336. layout_mode = 2
  337. size_flags_vertical = 4
  338. max_value = 5.0
  339. step = 0.01
  340. value = 1.0
  341. [node name="SpeedLabel" type="Label" parent="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer2"]
  342. unique_name_in_owner = true
  343. custom_minimum_size = Vector2(50, 0)
  344. layout_mode = 2
  345. text = "1x"
  346. horizontal_alignment = 1
  347. [node name="Progress" type="TextureProgressBar" parent="VBoxContainer/PanelContainer/VBoxContainer"]
  348. unique_name_in_owner = true
  349. layout_mode = 2
  350. size_flags_horizontal = 4
  351. step = 0.001
  352. texture_under = SubResource("GradientTexture2D_md057")
  353. texture_progress = SubResource("GradientTexture2D_35fte")
  354. [node name="Node2D" type="Node2D" parent="."]
  355. [node name="Icon" type="Sprite2D" parent="Node2D"]
  356. unique_name_in_owner = true
  357. position = Vector2(99, 165)
  358. texture = ExtResource("2_tapbf")
  359. [node name="CountdownLabel" type="Label" parent="Node2D/Icon"]
  360. unique_name_in_owner = true
  361. visible = false
  362. anchors_preset = 15
  363. anchor_right = 1.0
  364. anchor_bottom = 1.0
  365. offset_left = -32.0
  366. offset_top = -32.0
  367. offset_right = -32.0
  368. offset_bottom = -32.0
  369. grow_horizontal = 2
  370. grow_vertical = 2
  371. theme_override_colors/font_color = Color(1, 1, 1, 1)
  372. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  373. theme_override_constants/outline_size = 16
  374. theme_override_font_sizes/font_size = 32
  375. text = "10
  376. "
  377. horizontal_alignment = 1
  378. vertical_alignment = 1
  379. [node name="Path2D" type="Path2D" parent="."]
  380. position = Vector2(473, 204)
  381. curve = SubResource("Curve2D_7nae7")
  382. [connection signal="toggled" from="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer3/Infinite" to="." method="inifnite_toggled"]
  383. [connection signal="pressed" from="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer3/Button" to="." method="start_animation"]
  384. [connection signal="pressed" from="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer4/Button2" to="." method="pause_resume"]
  385. [connection signal="pressed" from="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer4/Button3" to="." method="kill_tween"]
  386. [connection signal="value_changed" from="VBoxContainer/PanelContainer/VBoxContainer/HBoxContainer2/SpeedSlider" to="." method="speed_changed"]