main.tscn 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. [gd_scene load_steps=11 format=2]
  2. [ext_resource path="res://Client.gd" type="Script" id=1]
  3. [ext_resource path="res://Server.gd" type="Script" id=2]
  4. [ext_resource path="res://Database.gd" type="Script" id=3]
  5. [ext_resource path="res://ping.gd" type="Script" id=4]
  6. [ext_resource path="res://Input.gd" type="Script" id=5]
  7. [ext_resource path="res://spawner.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://Debug.tscn" type="PackedScene" id=9]
  11. [sub_resource type="GDScript" id=1]
  12. script/source = "extends Node
  13. var enabled = false
  14. func _physics_process(delta):
  15. if enabled:
  16. var input = ''
  17. if Input.is_action_pressed(\"s\"):
  18. input =(\"ui_down\")
  19. if Input.is_action_pressed(\"w\"):
  20. input =(\"ui_up\")
  21. if Input.is_action_pressed(\"a\"):
  22. input =(\"ui_left\")
  23. if Input.is_action_pressed(\"d\"):
  24. input =(\"ui_right\")
  25. get_parent().send_input(input)
  26. "
  27. [node name="Node" type="Node"]
  28. [node name="Server" type="Node" parent="."]
  29. script = ExtResource( 2 )
  30. database = NodePath("../Database")
  31. [node name="players" type="Node" parent="Server"]
  32. [node name="enemies" type="Node" parent="Server"]
  33. script = ExtResource( 6 )
  34. [node name="dmgbox" type="Node" parent="Server"]
  35. [node name="Client" type="Node" parent="."]
  36. script = ExtResource( 1 )
  37. [node name="ping" type="Label" parent="Client"]
  38. margin_left = 12.1612
  39. margin_top = 260.304
  40. margin_right = 52.1612
  41. margin_bottom = 281.304
  42. custom_fonts/font = ExtResource( 8 )
  43. text = "ping..."
  44. script = ExtResource( 4 )
  45. __meta__ = {
  46. "_edit_use_anchors_": false
  47. }
  48. [node name="Input" type="Node" parent="Client"]
  49. script = ExtResource( 5 )
  50. [node name="players" type="Node" parent="Client"]
  51. [node name="enemies" type="Node" parent="Client"]
  52. script = ExtResource( 7 )
  53. [node name="Debug" parent="Client" instance=ExtResource( 9 )]
  54. [node name="Hud" type="CanvasLayer" parent="Client"]
  55. [node name="HBoxContainer" type="HBoxContainer" parent="Client/Hud"]
  56. anchor_right = 1.0
  57. margin_right = 1.0
  58. margin_bottom = 60.0
  59. __meta__ = {
  60. "_edit_use_anchors_": false
  61. }
  62. [node name="Client2" type="Node" parent="."]
  63. script = ExtResource( 1 )
  64. [node name="Input" type="Node" parent="Client2"]
  65. script = SubResource( 1 )
  66. [node name="Database" type="Node" parent="."]
  67. script = ExtResource( 3 )
  68. [node name="Login" type="Node" parent="."]
  69. [node name="Authority" type="Node" parent="."]