Client.tscn 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. [gd_scene load_steps=17 format=2]
  2. [ext_resource path="res://Debug.tscn" type="PackedScene" id=1]
  3. [ext_resource path="res://PowerMenu.tscn" type="PackedScene" id=2]
  4. [ext_resource path="res://Client.gd" type="Script" id=3]
  5. [ext_resource path="res://font/tiny.tres" type="DynamicFont" id=4]
  6. [ext_resource path="res://font/8bit.tres" type="DynamicFont" id=5]
  7. [ext_resource path="res://ping.gd" type="Script" id=6]
  8. [ext_resource path="res://Input.gd" type="Script" id=7]
  9. [ext_resource path="res://opts.gd" type="Script" id=8]
  10. [ext_resource path="res://projectiles.gd" type="Script" id=9]
  11. [ext_resource path="res://enemiessprite.gd" type="Script" id=10]
  12. [ext_resource path="res://art/coffeemilk.png" type="Texture" id=11]
  13. [ext_resource path="res://art/player/emote/esclamation.png" type="Texture" id=12]
  14. [sub_resource type="GDScript" id=1]
  15. script/source = "extends Label
  16. export(NodePath) var node
  17. export(NodePath) var node2
  18. func _input(event):
  19. if get_node(node2).visible:
  20. if Input.is_action_just_pressed('ui_select'):
  21. get_node(node).spawn_request()
  22. print('sending spawn request...')
  23. "
  24. [sub_resource type="Shader" id=19]
  25. code = "// NOTE: Shader automatically converted from Godot Engine 3.4.4.stable's CanvasItemMaterial.
  26. shader_type canvas_item;
  27. render_mode blend_mix;
  28. void fragment(){
  29. COLOR = texture(TEXTURE,UV+TIME/5.00);
  30. }"
  31. [sub_resource type="ShaderMaterial" id=20]
  32. shader = SubResource( 19 )
  33. [sub_resource type="StyleBoxFlat" id=2]
  34. bg_color = Color( 0, 0, 0, 0.415686 )
  35. [node name="Client" type="Node" groups=["client"]]
  36. script = ExtResource( 3 )
  37. [node name="Input" type="Node" parent="."]
  38. script = ExtResource( 7 )
  39. [node name="players" type="Node" parent="."]
  40. [node name="enemies" type="Node" parent="."]
  41. script = ExtResource( 10 )
  42. [node name="projectiles" type="Node" parent="."]
  43. script = ExtResource( 9 )
  44. [node name="Debug" parent="." instance=ExtResource( 1 )]
  45. [node name="ping" type="Label" parent="Debug"]
  46. margin_left = 12.1612
  47. margin_top = 260.304
  48. margin_right = 52.1612
  49. margin_bottom = 281.304
  50. custom_fonts/font = ExtResource( 4 )
  51. text = "ping..."
  52. script = ExtResource( 6 )
  53. [node name="Timer" type="Timer" parent="Debug/ping"]
  54. wait_time = 0.5
  55. autostart = true
  56. [node name="Hud" type="CanvasLayer" parent="."]
  57. [node name="HBoxContainer" type="HBoxContainer" parent="Hud"]
  58. anchor_right = 1.0
  59. margin_right = 1.0
  60. margin_bottom = 60.0
  61. __meta__ = {
  62. "_edit_use_anchors_": false
  63. }
  64. [node name="PowerMenu" parent="." instance=ExtResource( 2 )]
  65. [node name="Chat" type="CanvasLayer" parent="."]
  66. layer = 7
  67. [node name="LineEdit" type="LineEdit" parent="Chat"]
  68. modulate = Color( 1, 1, 1, 0.627451 )
  69. margin_left = 480.0
  70. margin_top = 320.0
  71. margin_right = 620.0
  72. margin_bottom = 344.0
  73. custom_fonts/font = ExtResource( 5 )
  74. align = 2
  75. placeholder_text = "....message"
  76. [node name="RichTextLabel" type="RichTextLabel" parent="Chat"]
  77. margin_left = 480.0
  78. margin_top = 220.0
  79. margin_right = 620.0
  80. margin_bottom = 315.0
  81. custom_fonts/normal_font = ExtResource( 5 )
  82. [node name="ColorRect" type="ColorRect" parent="Chat/RichTextLabel"]
  83. show_behind_parent = true
  84. anchor_right = 1.0
  85. anchor_bottom = 1.0
  86. color = Color( 0, 0, 0, 0.333333 )
  87. [node name="spawnmsg" type="CanvasLayer" parent="."]
  88. [node name="CenterContainer" type="CenterContainer" parent="spawnmsg"]
  89. visible = false
  90. anchor_right = 1.0
  91. anchor_bottom = 1.0
  92. [node name="VBoxContainer" type="VBoxContainer" parent="spawnmsg/CenterContainer"]
  93. margin_left = 236.0
  94. margin_top = 166.0
  95. margin_right = 404.0
  96. margin_bottom = 194.0
  97. [node name="spawnmsg" type="Label" parent="spawnmsg/CenterContainer/VBoxContainer"]
  98. margin_right = 164.0
  99. margin_bottom = 14.0
  100. custom_fonts/font = ExtResource( 5 )
  101. text = "press \"space\" to be ready"
  102. align = 1
  103. valign = 1
  104. script = SubResource( 1 )
  105. node = NodePath("../../../..")
  106. node2 = NodePath("../..")
  107. [node name="spawnmsg2" type="Label" parent="spawnmsg/CenterContainer/VBoxContainer"]
  108. margin_top = 18.0
  109. margin_right = 164.0
  110. margin_bottom = 32.0
  111. custom_fonts/font = ExtResource( 5 )
  112. text = "loading list...."
  113. align = 1
  114. valign = 1
  115. autowrap = true
  116. [node name="ColorRect" type="ColorRect" parent="spawnmsg/CenterContainer/VBoxContainer/spawnmsg2"]
  117. show_behind_parent = true
  118. anchor_right = 1.0
  119. anchor_bottom = 1.0
  120. color = Color( 0, 0, 0, 0.333333 )
  121. [node name="Options" type="CanvasLayer" parent="."]
  122. [node name="Control" type="Control" parent="Options"]
  123. visible = false
  124. margin_right = 40.0
  125. margin_bottom = 40.0
  126. [node name="TextureRect" type="TextureRect" parent="Options/Control"]
  127. modulate = Color( 1, 1, 1, 0.501961 )
  128. material = SubResource( 20 )
  129. anchor_right = 1.0
  130. anchor_bottom = 1.0
  131. margin_right = 600.0
  132. margin_bottom = 320.0
  133. texture = ExtResource( 11 )
  134. expand = true
  135. stretch_mode = 2
  136. [node name="VBoxContainer" type="VBoxContainer" parent="Options/Control"]
  137. anchor_left = 0.5
  138. anchor_right = 0.5
  139. anchor_bottom = 1.0
  140. margin_left = 236.0
  141. margin_right = 365.0
  142. margin_bottom = 321.0
  143. alignment = 1
  144. script = ExtResource( 8 )
  145. [node name="Label" type="Label" parent="Options/Control/VBoxContainer"]
  146. margin_top = 156.0
  147. margin_right = 129.0
  148. margin_bottom = 168.0
  149. custom_fonts/font = ExtResource( 5 )
  150. text = "volume:"
  151. align = 1
  152. [node name="HSlider" type="HSlider" parent="Options/Control/VBoxContainer"]
  153. margin_top = 172.0
  154. margin_right = 129.0
  155. margin_bottom = 188.0
  156. custom_icons/tick = ExtResource( 12 )
  157. custom_icons/grabber_disabled = ExtResource( 12 )
  158. custom_icons/grabber_highlight = ExtResource( 12 )
  159. custom_icons/grabber = ExtResource( 12 )
  160. [node name="OptionButton" type="OptionButton" parent="Options/Control/VBoxContainer"]
  161. margin_top = 192.0
  162. margin_right = 129.0
  163. margin_bottom = 204.0
  164. custom_fonts/font = ExtResource( 5 )
  165. custom_styles/hover = SubResource( 2 )
  166. custom_styles/pressed = SubResource( 2 )
  167. custom_styles/focus = SubResource( 2 )
  168. custom_styles/disabled = SubResource( 2 )
  169. custom_styles/normal = SubResource( 2 )
  170. text = "window option"
  171. [connection signal="timeout" from="Debug/ping/Timer" to="Debug/ping" method="_on_Timer_timeout"]
  172. [connection signal="text_entered" from="Chat/LineEdit" to="." method="chat_messages"]
  173. [connection signal="value_changed" from="Options/Control/VBoxContainer/HSlider" to="Options/Control/VBoxContainer" method="_on_HSlider_value_changed"]
  174. [connection signal="item_selected" from="Options/Control/VBoxContainer/OptionButton" to="Options/Control/VBoxContainer" method="_on_OptionButton_item_selected"]