A game created for the Godot Wild Jam #21
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.7KB

  1. [gd_scene load_steps=9 format=2]
  2. [ext_resource path="res://Data/Scripts/PulseArrow.gd" type="Script" id=1]
  3. [ext_resource path="res://Data/Objects/Glowdot.tscn" type="PackedScene" id=3]
  4. [sub_resource type="Shader" id=1]
  5. code = "shader_type canvas_item;
  6. uniform vec4 primary_color:hint_color = vec4(1.0, 0.8, 0.0, 1.0);
  7. uniform float fade_offset:hint_range(0.0, 0.5) = 0.1;
  8. float ramp(float v, float f_min, float f_max){
  9. float res = (v - f_min) / (f_max - f_min);
  10. return max(0.0, min(res, 1.0));
  11. }
  12. void fragment(){
  13. float mask = length(vec2(0.5, 0.5) - (UV.xy));
  14. float fade = 1.0 - ramp(mask, fade_offset, 0.5);
  15. if (mask > 0.5){
  16. mask = 0.0;
  17. } else {mask = 1.0;}
  18. if (mask == 1.0){
  19. COLOR = vec4(primary_color.rgb, fade);
  20. } else {
  21. COLOR = vec4(primary_color.rgb, mask);
  22. }
  23. }"
  24. [sub_resource type="ShaderMaterial" id=2]
  25. resource_local_to_scene = true
  26. shader = SubResource( 1 )
  27. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  28. shader_param/fade_offset = 0.14
  29. [sub_resource type="ShaderMaterial" id=3]
  30. resource_local_to_scene = true
  31. shader = SubResource( 1 )
  32. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  33. shader_param/fade_offset = 0.24
  34. [sub_resource type="ShaderMaterial" id=4]
  35. resource_local_to_scene = true
  36. shader = SubResource( 1 )
  37. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  38. shader_param/fade_offset = 0.34
  39. [sub_resource type="ShaderMaterial" id=5]
  40. resource_local_to_scene = true
  41. shader = SubResource( 1 )
  42. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  43. shader_param/fade_offset = 0.24
  44. [sub_resource type="ShaderMaterial" id=6]
  45. resource_local_to_scene = true
  46. shader = SubResource( 1 )
  47. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  48. shader_param/fade_offset = 0.34
  49. [node name="PulseArrow" type="Node2D"]
  50. script = ExtResource( 1 )
  51. [node name="Dot" parent="." instance=ExtResource( 3 )]
  52. material = SubResource( 2 )
  53. position = Vector2( 0, -0.698334 )
  54. pulse_color = Color( 1, 0.8, 0, 1 )
  55. pulse_out = 0.75
  56. pulse_offset = 0.1
  57. [node name="Dot21" parent="." instance=ExtResource( 3 )]
  58. material = SubResource( 3 )
  59. position = Vector2( -53.772, 35.6152 )
  60. pulse_color = Color( 1, 0.8, 0, 1 )
  61. pulse_out = 0.75
  62. pulse_offset = 0.35
  63. [node name="Dot31" parent="." instance=ExtResource( 3 )]
  64. material = SubResource( 4 )
  65. position = Vector2( -110.337, 66.3421 )
  66. pulse_color = Color( 1, 0.8, 0, 1 )
  67. pulse_out = 0.75
  68. pulse_offset = 0.6
  69. [node name="Dot22" parent="." instance=ExtResource( 3 )]
  70. material = SubResource( 5 )
  71. position = Vector2( 52.3753, 35.6152 )
  72. pulse_color = Color( 1, 0.8, 0, 1 )
  73. pulse_out = 0.75
  74. pulse_offset = 0.35
  75. [node name="Dot32" parent="." instance=ExtResource( 3 )]
  76. material = SubResource( 6 )
  77. position = Vector2( 106.147, 66.3421 )
  78. pulse_color = Color( 1, 0.8, 0, 1 )
  79. pulse_out = 0.75
  80. pulse_offset = 0.6