spinpause.tscn 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. [gd_scene load_steps=4 format=2]
  2. [ext_resource path="res://spinpause.gd" type="Script" id=1]
  3. [sub_resource type="CubeMesh" id=1]
  4. size = Vector3( 2, 2, 2 )
  5. subdivide_width = 0
  6. subdivide_height = 0
  7. subdivide_depth = 0
  8. [sub_resource type="Animation" id=2]
  9. length = 10.0
  10. loop = true
  11. step = 0.1
  12. tracks/0/type = "value"
  13. tracks/0/path = NodePath("cube:rotation_degrees")
  14. tracks/0/interp = 1
  15. tracks/0/loop_wrap = true
  16. tracks/0/imported = false
  17. tracks/0/enabled = true
  18. tracks/0/keys = {
  19. "times": PoolRealArray( 0, 10 ),
  20. "transitions": PoolRealArray( 1, 1 ),
  21. "update": 0,
  22. "values": [ Vector3( 0, 0, 0 ), Vector3( 0, -360, 0 ) ]
  23. }
  24. [node name="pause_scene" type="Spatial" index="0"]
  25. script = ExtResource( 1 )
  26. [node name="cube" type="MeshInstance" parent="." index="0"]
  27. layers = 1
  28. material_override = null
  29. cast_shadow = 1
  30. extra_cull_margin = 0.0
  31. use_in_baked_light = false
  32. lod_min_distance = 0.0
  33. lod_min_hysteresis = 0.0
  34. lod_max_distance = 0.0
  35. lod_max_hysteresis = 0.0
  36. mesh = SubResource( 1 )
  37. skeleton = NodePath("..")
  38. material/0 = null
  39. [node name="camera" type="Camera" parent="." index="1"]
  40. transform = Transform( 0.571594, 0.275303, -0.772974, 0, 0.942035, 0.335515, 0.820537, -0.191779, 0.538461, -5.59754, 2.75935, 4.01344 )
  41. keep_aspect = 1
  42. cull_mask = 1048575
  43. environment = null
  44. h_offset = 0.0
  45. v_offset = 0.0
  46. doppler_tracking = 0
  47. projection = 0
  48. current = false
  49. fov = 74.0
  50. size = 1.0
  51. near = 0.1
  52. far = 100.0
  53. [node name="anim" type="AnimationPlayer" parent="." index="2"]
  54. root_node = NodePath("..")
  55. autoplay = "spin"
  56. playback_process_mode = 1
  57. playback_default_blend_time = 0.0
  58. playback_speed = 1.0
  59. anims/spin = SubResource( 2 )
  60. blend_times = [ ]
  61. autoplay = "spin"
  62. [node name="spot" type="SpotLight" parent="." index="3"]
  63. transform = Transform( 0.792992, 0.251051, -0.555101, 0, 0.911149, 0.412078, 0.609232, -0.326775, 0.722534, -3.05357, 1.80053, 3.64099 )
  64. layers = 1
  65. light_color = Color( 1, 1, 1, 1 )
  66. light_energy = 1.0
  67. light_indirect_energy = 1.0
  68. light_negative = false
  69. light_specular = 0.5
  70. light_bake_mode = 1
  71. light_cull_mask = -1
  72. shadow_enabled = false
  73. shadow_color = Color( 0, 0, 0, 1 )
  74. shadow_bias = 0.15
  75. shadow_contact = 0.0
  76. shadow_reverse_cull_face = false
  77. editor_only = false
  78. spot_range = 6.0
  79. spot_attenuation = 1.0
  80. spot_angle = 45.0
  81. spot_angle_attenuation = 1.0
  82. _sections_unfolded = [ "Spot" ]
  83. [node name="pause" type="Button" parent="." index="4"]
  84. anchor_left = 0.0
  85. anchor_top = 0.0
  86. anchor_right = 0.0
  87. anchor_bottom = 0.0
  88. margin_left = 24.0
  89. margin_top = 24.0
  90. margin_right = 120.0
  91. margin_bottom = 56.0
  92. rect_pivot_offset = Vector2( 0, 0 )
  93. focus_mode = 2
  94. mouse_filter = 0
  95. mouse_default_cursor_shape = 0
  96. size_flags_horizontal = 2
  97. size_flags_vertical = 2
  98. toggle_mode = false
  99. enabled_focus_mode = 2
  100. shortcut = null
  101. group = null
  102. text = "PAUSE!"
  103. flat = false
  104. align = 1
  105. [node name="pause_popup" type="PopupPanel" parent="." index="5"]
  106. pause_mode = 2
  107. visible = false
  108. self_modulate = Color( 1, 1, 1, 0.7 )
  109. anchor_left = 0.0
  110. anchor_top = 0.0
  111. anchor_right = 0.0
  112. anchor_bottom = 0.0
  113. margin_left = 185.0
  114. margin_top = 72.0
  115. margin_right = 638.0
  116. margin_bottom = 433.0
  117. rect_pivot_offset = Vector2( 0, 0 )
  118. mouse_filter = 0
  119. mouse_default_cursor_shape = 0
  120. size_flags_horizontal = 2
  121. size_flags_vertical = 2
  122. popup_exclusive = false
  123. _sections_unfolded = [ "Pause" ]
  124. [node name="text" type="Label" parent="pause_popup" index="0"]
  125. anchor_left = 0.0
  126. anchor_top = 0.0
  127. anchor_right = 0.0
  128. anchor_bottom = 0.0
  129. margin_left = 73.0
  130. margin_top = 49.0
  131. margin_right = 389.0
  132. margin_bottom = 154.0
  133. rect_pivot_offset = Vector2( 0, 0 )
  134. mouse_filter = 2
  135. mouse_default_cursor_shape = 0
  136. size_flags_horizontal = 2
  137. size_flags_vertical = 0
  138. text = "The game has been paused! Nodes are not processing anymore, but this popup can still process!"
  139. autowrap = true
  140. percent_visible = 1.0
  141. lines_skipped = 0
  142. max_lines_visible = -1
  143. [node name="unpause" type="Button" parent="pause_popup" index="1"]
  144. anchor_left = 0.0
  145. anchor_top = 0.0
  146. anchor_right = 0.0
  147. anchor_bottom = 0.0
  148. margin_left = 185.0
  149. margin_top = 288.0
  150. margin_right = 281.0
  151. margin_bottom = 320.0
  152. rect_pivot_offset = Vector2( 0, 0 )
  153. focus_mode = 2
  154. mouse_filter = 0
  155. mouse_default_cursor_shape = 0
  156. size_flags_horizontal = 2
  157. size_flags_vertical = 2
  158. toggle_mode = false
  159. enabled_focus_mode = 2
  160. shortcut = null
  161. group = null
  162. text = "UN-PAUSE!"
  163. flat = false
  164. align = 1
  165. [connection signal="pressed" from="pause" to="." method="_on_pause_pressed"]
  166. [connection signal="pressed" from="pause_popup/unpause" to="." method="_on_unpause_pressed"]