Client.tscn 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. [gd_scene load_steps=14 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://Input.gd" type="Script" id=4]
  6. [ext_resource path="res://ping.gd" type="Script" id=5]
  7. [ext_resource path="res://projectiles.gd" type="Script" id=6]
  8. [ext_resource path="res://enemiessprite.gd" type="Script" id=7]
  9. [ext_resource path="res://font/tiny.tres" type="DynamicFont" id=8]
  10. [ext_resource path="res://font/8bit.tres" type="DynamicFont" id=9]
  11. [ext_resource path="res://art/player/emote/esclamation.png" type="Texture" id=10]
  12. [ext_resource path="res://opts.gd" type="Script" id=11]
  13. [sub_resource type="GDScript" id=1]
  14. script/source = "extends Label
  15. export(NodePath) var node
  16. export(NodePath) var node2
  17. func _input(event):
  18. if get_node(node2).visible:
  19. if Input.is_action_just_pressed('ui_select'):
  20. get_node(node).spawn_request()
  21. print('sending spawn request...')
  22. "
  23. [sub_resource type="StyleBoxFlat" id=2]
  24. bg_color = Color( 0, 0, 0, 0.415686 )
  25. [node name="Client" type="Node" groups=["client"]]
  26. script = ExtResource( 3 )
  27. [node name="Input" type="Node" parent="."]
  28. script = ExtResource( 4 )
  29. [node name="players" type="Node" parent="."]
  30. [node name="enemies" type="Node" parent="."]
  31. script = ExtResource( 7 )
  32. [node name="projectiles" type="Node" parent="."]
  33. script = ExtResource( 6 )
  34. [node name="Debug" parent="." instance=ExtResource( 1 )]
  35. [node name="ping" type="Label" parent="Debug"]
  36. margin_left = 12.1612
  37. margin_top = 260.304
  38. margin_right = 52.1612
  39. margin_bottom = 281.304
  40. custom_fonts/font = ExtResource( 8 )
  41. text = "ping..."
  42. script = ExtResource( 5 )
  43. [node name="Timer" type="Timer" parent="Debug/ping"]
  44. wait_time = 0.5
  45. autostart = true
  46. [node name="Hud" type="CanvasLayer" parent="."]
  47. [node name="HBoxContainer" type="HBoxContainer" parent="Hud"]
  48. anchor_right = 1.0
  49. margin_right = 1.0
  50. margin_bottom = 60.0
  51. __meta__ = {
  52. "_edit_use_anchors_": false
  53. }
  54. [node name="PowerMenu" parent="." instance=ExtResource( 2 )]
  55. [node name="Chat" type="CanvasLayer" parent="."]
  56. layer = 7
  57. [node name="LineEdit" type="LineEdit" parent="Chat"]
  58. modulate = Color( 1, 1, 1, 0.627451 )
  59. margin_left = 480.0
  60. margin_top = 320.0
  61. margin_right = 620.0
  62. margin_bottom = 344.0
  63. align = 2
  64. placeholder_text = "....message"
  65. [node name="RichTextLabel" type="RichTextLabel" parent="Chat"]
  66. margin_left = 480.0
  67. margin_top = 220.0
  68. margin_right = 620.0
  69. margin_bottom = 315.0
  70. [node name="ColorRect" type="ColorRect" parent="Chat/RichTextLabel"]
  71. show_behind_parent = true
  72. anchor_right = 1.0
  73. anchor_bottom = 1.0
  74. color = Color( 0, 0, 0, 0.333333 )
  75. [node name="spawnmsg" type="CanvasLayer" parent="."]
  76. [node name="CenterContainer" type="CenterContainer" parent="spawnmsg"]
  77. visible = false
  78. anchor_right = 1.0
  79. anchor_bottom = 1.0
  80. [node name="VBoxContainer" type="VBoxContainer" parent="spawnmsg/CenterContainer"]
  81. margin_left = 238.0
  82. margin_top = 164.0
  83. margin_right = 402.0
  84. margin_bottom = 196.0
  85. [node name="spawnmsg" type="Label" parent="spawnmsg/CenterContainer/VBoxContainer"]
  86. margin_right = 164.0
  87. margin_bottom = 14.0
  88. text = "press \"space\" to be ready"
  89. align = 1
  90. valign = 1
  91. script = SubResource( 1 )
  92. node = NodePath("../../../..")
  93. node2 = NodePath("../..")
  94. [node name="spawnmsg2" type="Label" parent="spawnmsg/CenterContainer/VBoxContainer"]
  95. margin_top = 18.0
  96. margin_right = 164.0
  97. margin_bottom = 32.0
  98. text = "loading list...."
  99. align = 1
  100. valign = 1
  101. autowrap = true
  102. [node name="ColorRect" type="ColorRect" parent="spawnmsg/CenterContainer/VBoxContainer/spawnmsg2"]
  103. show_behind_parent = true
  104. anchor_right = 1.0
  105. anchor_bottom = 1.0
  106. color = Color( 0, 0, 0, 0.333333 )
  107. [node name="Options" type="CanvasLayer" parent="."]
  108. [node name="VBoxContainer" type="VBoxContainer" parent="Options"]
  109. visible = false
  110. anchor_left = 0.5
  111. anchor_right = 0.5
  112. anchor_bottom = 1.0
  113. margin_left = -64.5
  114. margin_right = 64.5
  115. alignment = 1
  116. script = ExtResource( 11 )
  117. [node name="Label" type="Label" parent="Options/VBoxContainer"]
  118. margin_top = 156.0
  119. margin_right = 129.0
  120. margin_bottom = 168.0
  121. custom_fonts/font = ExtResource( 9 )
  122. text = "volume:"
  123. align = 1
  124. [node name="HSlider" type="HSlider" parent="Options/VBoxContainer"]
  125. margin_top = 172.0
  126. margin_right = 129.0
  127. margin_bottom = 188.0
  128. custom_icons/tick = ExtResource( 10 )
  129. custom_icons/grabber_disabled = ExtResource( 10 )
  130. custom_icons/grabber_highlight = ExtResource( 10 )
  131. custom_icons/grabber = ExtResource( 10 )
  132. [node name="OptionButton" type="OptionButton" parent="Options/VBoxContainer"]
  133. margin_top = 192.0
  134. margin_right = 129.0
  135. margin_bottom = 204.0
  136. custom_fonts/font = ExtResource( 9 )
  137. custom_styles/hover = SubResource( 2 )
  138. custom_styles/pressed = SubResource( 2 )
  139. custom_styles/focus = SubResource( 2 )
  140. custom_styles/disabled = SubResource( 2 )
  141. custom_styles/normal = SubResource( 2 )
  142. text = "window option"
  143. [connection signal="timeout" from="Debug/ping/Timer" to="Debug/ping" method="_on_Timer_timeout"]
  144. [connection signal="text_entered" from="Chat/LineEdit" to="." method="chat_messages"]
  145. [connection signal="value_changed" from="Options/VBoxContainer/HSlider" to="Options/VBoxContainer" method="_on_HSlider_value_changed"]
  146. [connection signal="item_selected" from="Options/VBoxContainer/OptionButton" to="Options/VBoxContainer" method="_on_OptionButton_item_selected"]