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.

97 lines
2.5KB

  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. shader = SubResource( 1 )
  26. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  27. shader_param/fade_offset = 0.15
  28. [sub_resource type="ShaderMaterial" id=3]
  29. shader = SubResource( 1 )
  30. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  31. shader_param/fade_offset = 0.15
  32. [sub_resource type="ShaderMaterial" id=4]
  33. shader = SubResource( 1 )
  34. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  35. shader_param/fade_offset = 0.15
  36. [sub_resource type="ShaderMaterial" id=5]
  37. shader = SubResource( 1 )
  38. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  39. shader_param/fade_offset = 0.15
  40. [sub_resource type="ShaderMaterial" id=6]
  41. shader = SubResource( 1 )
  42. shader_param/primary_color = Color( 1, 0.8, 0, 1 )
  43. shader_param/fade_offset = 0.15
  44. [node name="PulseArrow" type="Node2D"]
  45. script = ExtResource( 1 )
  46. [node name="Dot" parent="." instance=ExtResource( 3 )]
  47. material = SubResource( 2 )
  48. position = Vector2( 0, -0.698334 )
  49. pulse_in_time = 0.5
  50. pulse_out_time = 0.5
  51. pulse_out = 0.75
  52. [node name="Dot21" parent="." instance=ExtResource( 3 )]
  53. material = SubResource( 3 )
  54. position = Vector2( -53.772, 35.6152 )
  55. pulse_in_time = 0.5
  56. pulse_out_time = 0.5
  57. pulse_out = 0.75
  58. pulse_offset = 0.35
  59. [node name="Dot31" parent="." instance=ExtResource( 3 )]
  60. material = SubResource( 4 )
  61. position = Vector2( -110.337, 66.3421 )
  62. pulse_in_time = 0.5
  63. pulse_out_time = 0.5
  64. pulse_out = 0.75
  65. pulse_offset = 0.6
  66. [node name="Dot22" parent="." instance=ExtResource( 3 )]
  67. material = SubResource( 5 )
  68. position = Vector2( 52.3753, 35.6152 )
  69. pulse_in_time = 0.5
  70. pulse_out_time = 0.5
  71. pulse_out = 0.75
  72. pulse_offset = 0.35
  73. [node name="Dot32" parent="." instance=ExtResource( 3 )]
  74. material = SubResource( 6 )
  75. position = Vector2( 106.147, 66.3421 )
  76. pulse_in_time = 0.5
  77. pulse_out_time = 0.5
  78. pulse_out = 0.75
  79. pulse_offset = 0.6