main.tscn 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. [gd_scene load_steps=13 format=2]
  2. [ext_resource path="res://spawner.gd" type="Script" id=1]
  3. [ext_resource path="res://bacteria.tscn" type="PackedScene" id=2]
  4. [ext_resource path="res://restarter.gd" type="Script" id=3]
  5. [ext_resource path="res://Healthpickup.tscn" type="PackedScene" id=4]
  6. [ext_resource path="res://PowerUpControl.gd" type="Script" id=5]
  7. [sub_resource type="Shader" id=1]
  8. code = "// NOTE: Shader automatically converted from Godot Engine 3.4.4.stable's CanvasItemMaterial.
  9. shader_type canvas_item;
  10. render_mode blend_mix;
  11. uniform sampler2D noise;
  12. uniform sampler2D noise2;
  13. uniform sampler2D grad;
  14. void fragment(){
  15. float col = texture(noise, UV).r * texture(noise2, UV+TIME*0.1).r + 0.3;
  16. COLOR = texture(grad, vec2( round(col)) ) + clamp(col,0.0,0.6) - 0.3;
  17. }"
  18. [sub_resource type="Gradient" id=2]
  19. offsets = PoolRealArray( 0.00833333, 0.970833 )
  20. colors = PoolColorArray( 0.00156975, 0.401855, 0.337356, 1, 0.144711, 0.686035, 0.256252, 1 )
  21. [sub_resource type="GradientTexture" id=3]
  22. gradient = SubResource( 2 )
  23. [sub_resource type="OpenSimplexNoise" id=4]
  24. [sub_resource type="NoiseTexture" id=5]
  25. width = 256
  26. height = 256
  27. noise = SubResource( 4 )
  28. [sub_resource type="NoiseTexture" id=6]
  29. width = 96
  30. height = 96
  31. seamless = true
  32. noise = SubResource( 4 )
  33. [sub_resource type="ShaderMaterial" id=7]
  34. shader = SubResource( 1 )
  35. shader_param/noise = SubResource( 5 )
  36. shader_param/noise2 = SubResource( 6 )
  37. shader_param/grad = SubResource( 3 )
  38. [node name="main" type="YSort"]
  39. [node name="bacteria" parent="." instance=ExtResource( 2 )]
  40. [node name="spawner" type="Node2D" parent="."]
  41. script = ExtResource( 1 )
  42. [node name="spawner2" type="Node2D" parent="."]
  43. script = ExtResource( 1 )
  44. enemy_ = ExtResource( 4 )
  45. spawnspeed = 15.0
  46. [node name="restarter" type="CanvasLayer" parent="."]
  47. pause_mode = 2
  48. script = ExtResource( 3 )
  49. [node name="MarginContainer" type="MarginContainer" parent="restarter"]
  50. visible = false
  51. anchor_right = 1.0
  52. anchor_bottom = 1.0
  53. margin_left = 300.0
  54. margin_right = -300.0
  55. [node name="VBoxContainer" type="VBoxContainer" parent="restarter/MarginContainer"]
  56. margin_right = 67.0
  57. margin_bottom = 960.0
  58. alignment = 1
  59. [node name="Label" type="Label" parent="restarter/MarginContainer/VBoxContainer"]
  60. margin_top = 621.0
  61. margin_right = 120.0
  62. margin_bottom = 635.0
  63. text = "game over"
  64. align = 1
  65. valign = 1
  66. [node name="Button" type="Button" parent="restarter/MarginContainer/VBoxContainer"]
  67. margin_top = 639.0
  68. margin_right = 120.0
  69. margin_bottom = 659.0
  70. text = "restart"
  71. [node name="PowerUpControl" type="CanvasLayer" parent="."]
  72. script = ExtResource( 5 )
  73. [node name="Control" type="MarginContainer" parent="PowerUpControl"]
  74. pause_mode = 2
  75. visible = false
  76. anchor_right = 1.0
  77. anchor_bottom = 1.0
  78. margin_left = 120.0
  79. margin_right = -120.0
  80. [node name="VSeparator" type="VBoxContainer" parent="PowerUpControl/Control"]
  81. margin_right = 300.0
  82. margin_bottom = 960.0
  83. alignment = 1
  84. [node name="Label" type="Label" parent="PowerUpControl/Control/VSeparator"]
  85. margin_top = 411.0
  86. margin_right = 300.0
  87. margin_bottom = 425.0
  88. text = "Choose a power:"
  89. [node name="ItemList" type="ItemList" parent="PowerUpControl/Control/VSeparator"]
  90. margin_top = 429.0
  91. margin_right = 300.0
  92. margin_bottom = 549.0
  93. rect_min_size = Vector2( 0, 120 )
  94. items = [ "Item 0", null, false, "Item 1", null, false, "Item 2", null, false, "Item 3", null, false, "Item 4", null, false ]
  95. [node name="VSeparator2" type="VBoxContainer" parent="PowerUpControl/Control"]
  96. margin_right = 300.0
  97. margin_bottom = 960.0
  98. alignment = 1
  99. [node name="Label" type="Label" parent="PowerUpControl/Control/VSeparator2"]
  100. margin_top = 411.0
  101. margin_right = 300.0
  102. margin_bottom = 425.0
  103. text = "put on slot:"
  104. [node name="ItemList2" type="ItemList" parent="PowerUpControl/Control/VSeparator2"]
  105. margin_top = 429.0
  106. margin_right = 300.0
  107. margin_bottom = 549.0
  108. rect_min_size = Vector2( 0, 120 )
  109. items = [ "Item 0", null, false, "Item 1", null, false, "Item 2", null, false ]
  110. [node name="CanvasLayer" type="CanvasLayer" parent="."]
  111. layer = -1
  112. [node name="TextureButton" type="ColorRect" parent="CanvasLayer"]
  113. material = SubResource( 7 )
  114. anchor_right = 1.0
  115. anchor_bottom = 1.0
  116. [connection signal="dieproxy" from="bacteria" to="restarter" method="_on_bacteria_dieproxy"]
  117. [connection signal="level_up" from="bacteria" to="PowerUpControl" method="_on_bacteria_level_up"]
  118. [connection signal="button_down" from="restarter/MarginContainer/VBoxContainer/Button" to="restarter" method="_on_Button_button_down"]
  119. [connection signal="item_activated" from="PowerUpControl/Control/VSeparator/ItemList" to="PowerUpControl" method="_on_ItemList_item_activated"]
  120. [connection signal="item_activated" from="PowerUpControl/Control/VSeparator2/ItemList2" to="PowerUpControl" method="_on_ItemList2_item_activated"]