Client.tscn 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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. align = 2
  74. placeholder_text = "....message"
  75. [node name="RichTextLabel" type="RichTextLabel" parent="Chat"]
  76. margin_left = 480.0
  77. margin_top = 220.0
  78. margin_right = 620.0
  79. margin_bottom = 315.0
  80. [node name="ColorRect" type="ColorRect" parent="Chat/RichTextLabel"]
  81. show_behind_parent = true
  82. anchor_right = 1.0
  83. anchor_bottom = 1.0
  84. color = Color( 0, 0, 0, 0.333333 )
  85. [node name="spawnmsg" type="CanvasLayer" parent="."]
  86. [node name="CenterContainer" type="CenterContainer" parent="spawnmsg"]
  87. visible = false
  88. anchor_right = 1.0
  89. anchor_bottom = 1.0
  90. [node name="VBoxContainer" type="VBoxContainer" parent="spawnmsg/CenterContainer"]
  91. margin_left = 238.0
  92. margin_top = 164.0
  93. margin_right = 402.0
  94. margin_bottom = 196.0
  95. [node name="spawnmsg" type="Label" parent="spawnmsg/CenterContainer/VBoxContainer"]
  96. margin_right = 164.0
  97. margin_bottom = 14.0
  98. text = "press \"space\" to be ready"
  99. align = 1
  100. valign = 1
  101. script = SubResource( 1 )
  102. node = NodePath("../../../..")
  103. node2 = NodePath("../..")
  104. [node name="spawnmsg2" type="Label" parent="spawnmsg/CenterContainer/VBoxContainer"]
  105. margin_top = 18.0
  106. margin_right = 164.0
  107. margin_bottom = 32.0
  108. text = "loading list...."
  109. align = 1
  110. valign = 1
  111. autowrap = true
  112. [node name="ColorRect" type="ColorRect" parent="spawnmsg/CenterContainer/VBoxContainer/spawnmsg2"]
  113. show_behind_parent = true
  114. anchor_right = 1.0
  115. anchor_bottom = 1.0
  116. color = Color( 0, 0, 0, 0.333333 )
  117. [node name="Options" type="CanvasLayer" parent="."]
  118. [node name="Control" type="Control" parent="Options"]
  119. visible = false
  120. margin_right = 40.0
  121. margin_bottom = 40.0
  122. [node name="TextureRect" type="TextureRect" parent="Options/Control"]
  123. modulate = Color( 1, 1, 1, 0.501961 )
  124. material = SubResource( 20 )
  125. anchor_right = 1.0
  126. anchor_bottom = 1.0
  127. margin_right = 600.0
  128. margin_bottom = 320.0
  129. texture = ExtResource( 11 )
  130. expand = true
  131. stretch_mode = 2
  132. [node name="VBoxContainer" type="VBoxContainer" parent="Options/Control"]
  133. anchor_left = 0.5
  134. anchor_right = 0.5
  135. anchor_bottom = 1.0
  136. margin_left = 236.0
  137. margin_right = 365.0
  138. margin_bottom = 321.0
  139. alignment = 1
  140. script = ExtResource( 8 )
  141. [node name="Label" type="Label" parent="Options/Control/VBoxContainer"]
  142. margin_top = 156.0
  143. margin_right = 129.0
  144. margin_bottom = 168.0
  145. custom_fonts/font = ExtResource( 5 )
  146. text = "volume:"
  147. align = 1
  148. [node name="HSlider" type="HSlider" parent="Options/Control/VBoxContainer"]
  149. margin_top = 172.0
  150. margin_right = 129.0
  151. margin_bottom = 188.0
  152. custom_icons/tick = ExtResource( 12 )
  153. custom_icons/grabber_disabled = ExtResource( 12 )
  154. custom_icons/grabber_highlight = ExtResource( 12 )
  155. custom_icons/grabber = ExtResource( 12 )
  156. [node name="OptionButton" type="OptionButton" parent="Options/Control/VBoxContainer"]
  157. margin_top = 192.0
  158. margin_right = 129.0
  159. margin_bottom = 204.0
  160. custom_fonts/font = ExtResource( 5 )
  161. custom_styles/hover = SubResource( 2 )
  162. custom_styles/pressed = SubResource( 2 )
  163. custom_styles/focus = SubResource( 2 )
  164. custom_styles/disabled = SubResource( 2 )
  165. custom_styles/normal = SubResource( 2 )
  166. text = "window option"
  167. [connection signal="timeout" from="Debug/ping/Timer" to="Debug/ping" method="_on_Timer_timeout"]
  168. [connection signal="text_entered" from="Chat/LineEdit" to="." method="chat_messages"]
  169. [connection signal="value_changed" from="Options/Control/VBoxContainer/HSlider" to="Options/Control/VBoxContainer" method="_on_HSlider_value_changed"]
  170. [connection signal="item_selected" from="Options/Control/VBoxContainer/OptionButton" to="Options/Control/VBoxContainer" method="_on_OptionButton_item_selected"]