diff --git a/Assets/Sounds/lake-waves.mp3 b/Assets/Sounds/lake-waves.mp3 new file mode 100644 index 0000000..193f7e2 Binary files /dev/null and b/Assets/Sounds/lake-waves.mp3 differ diff --git a/Assets/Sounds/lake-waves.mp3.import b/Assets/Sounds/lake-waves.mp3.import new file mode 100644 index 0000000..58c274a --- /dev/null +++ b/Assets/Sounds/lake-waves.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://cuu0kcsmlchgu" +path="res://.godot/imported/lake-waves.mp3-5b6f2a2274aba65cf71981123a3654d0.mp3str" + +[deps] + +source_file="res://Assets/Sounds/lake-waves.mp3" +dest_files=["res://.godot/imported/lake-waves.mp3-5b6f2a2274aba65cf71981123a3654d0.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Characters/Player.cs b/Characters/Player.cs index 57f7fa8..1ea3afd 100644 --- a/Characters/Player.cs +++ b/Characters/Player.cs @@ -26,6 +26,8 @@ public sealed partial class Player : Character } } + private TargetTracer _targetTracer; + [Export] public PlayerCamera Camera { get; set; } @@ -41,6 +43,8 @@ public sealed partial class Player : Character { InteractionRay = GetNode("Direction2D/InteractionRay"); + _targetTracer = GetNode("%TargetTracer"); + base._Ready(); Inventory.UsedItem += (Items.Item item) => @@ -61,6 +65,8 @@ public sealed partial class Player : Character public override void _Process(double delta) { base._Process(delta); + + _targetTracer.Rotation = DesiredTarget.Angle(); } public override void _Input(InputEvent @event) diff --git a/Characters/Player.tscn b/Characters/Player.tscn index 855c060..ad25718 100644 --- a/Characters/Player.tscn +++ b/Characters/Player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=66 format=3 uid="uid://b2254pup8k161"] +[gd_scene load_steps=67 format=3 uid="uid://b2254pup8k161"] [ext_resource type="Script" path="res://Characters/Player.cs" id="1_flygr"] [ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="2_ngsgt"] @@ -31,6 +31,7 @@ [ext_resource type="Texture2D" uid="uid://d1ukste16yq6v" path="res://Assets/Sprites/Particles/player-light.png" id="15_3hahh"] [ext_resource type="Script" path="res://Utils/DamageTime.cs" id="15_4xl06"] [ext_resource type="PackedScene" uid="uid://g7wfcubs6bdd" path="res://Items/Weapons/Railgun.tscn" id="21_n8w32"] +[ext_resource type="PackedScene" uid="uid://ce0ph4wk0ylra" path="res://UI/TargetTracer.tscn" id="22_hxi53"] [ext_resource type="PackedScene" uid="uid://5y1acxl4j4n7" path="res://Items/Weapons/Pugio.tscn" id="22_mqpn7"] [ext_resource type="PackedScene" uid="uid://d1d4vg7we5rjr" path="res://Items/Weapons/Shotgun.tscn" id="22_rmciq"] @@ -452,6 +453,10 @@ stream = ExtResource("13_bxguv") [node name="HurtSound" type="AudioStreamPlayer2D" parent="Effects"] stream = ExtResource("12_vvem5") +[node name="TargetTracer" parent="Effects" instance=ExtResource("22_hxi53")] +unique_name_in_owner = true +position = Vector2(0, -4) + [node name="Camera2D" parent="." instance=ExtResource("4_ym125")] zoom = Vector2(4, 4) position_smoothing_speed = 8.0 @@ -513,6 +518,9 @@ UseTime = 0.2 [node name="DocLance" parent="Inventory" instance=ExtResource("14_bj0lo")] +[node name="RemoteTransform2D2" type="RemoteTransform2D" parent="Inventory"] +position = Vector2(0, 4) + [node name="Hurtbox" parent="." node_paths=PackedStringArray("InvincibilityTimer") instance=ExtResource("9_avyu4")] visible = false InvincibilityTimer = NodePath("Timer") @@ -527,7 +535,6 @@ shape = SubResource("RectangleShape2D_cjk6b") one_shot = true [node name="AudioListener2D" type="AudioListener2D" parent="."] -visible = false current = true [node name="Direction2D" type="Marker2D" parent="."] diff --git a/Scenes/Maps/ArenaExterior.tscn b/Scenes/Maps/ArenaExterior.tscn index fc2d906..9dd12d3 100644 --- a/Scenes/Maps/ArenaExterior.tscn +++ b/Scenes/Maps/ArenaExterior.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=67 format=3 uid="uid://dr3bcvql7burk"] +[gd_scene load_steps=72 format=3 uid="uid://dr3bcvql7burk"] [ext_resource type="PackedScene" uid="uid://clwv2owvk6abe" path="res://Scenes/BaseMap.tscn" id="1_ci4ij"] [ext_resource type="TileSet" uid="uid://l61kbx31ug4p" path="res://Scenes/Maps/ArenaTileset.tres" id="2_m6h7j"] @@ -18,6 +18,7 @@ [ext_resource type="Texture2D" uid="uid://ds0xg848g3jid" path="res://Assets/Sprites/Props/tree-dark-5.png" id="12_md5xh"] [ext_resource type="Texture2D" uid="uid://8rbstele3ckq" path="res://Assets/Sprites/Props/tree-dark-4.png" id="13_j84wc"] [ext_resource type="Texture2D" uid="uid://wuvwd5corw3f" path="res://Assets/Sprites/Props/arena-stairs.png" id="14_i2ht5"] +[ext_resource type="Shader" path="res://Shaders/WindSwayUnshaded.gdshader" id="15_pmjmi"] [ext_resource type="Shader" path="res://Shaders/Water.gdshader" id="15_vlb8v"] [ext_resource type="Texture2D" uid="uid://dngclnqt7pe3k" path="res://Assets/Sprites/Particles/NoiseSmall.tres" id="17_j6kc0"] [ext_resource type="Texture2D" uid="uid://dejwdw7or8c" path="res://Assets/Sprites/Particles/NoiseLarge.tres" id="18_1c1fg"] @@ -28,6 +29,7 @@ [ext_resource type="Material" uid="uid://b64pfv5ocwegv" path="res://Assets/Sprites/Particles/ArenaLeaves.tres" id="23_4ibaf"] [ext_resource type="PackedScene" uid="uid://dhl071rj5wyvx" path="res://Entities/Campfire.tscn" id="23_mykt8"] [ext_resource type="Texture2D" uid="uid://d2vhmsc65ichv" path="res://Assets/Sprites/Particles/leaf-white.png" id="23_qkkt0"] +[ext_resource type="AudioStream" uid="uid://cuu0kcsmlchgu" path="res://Assets/Sounds/lake-waves.mp3" id="26_2g1h3"] [ext_resource type="PackedScene" uid="uid://cdj50hb84aujp" path="res://Characters/DocLegionary.tscn" id="27_84gw4"] [ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="28_b3suq"] [ext_resource type="PackedScene" uid="uid://dhamcei7tfta8" path="res://Characters/DocCenturion.tscn" id="30_qfl2k"] @@ -137,9 +139,36 @@ shader_parameter/seed = 3.0 [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_47ohj"] light_mode = 1 +[sub_resource type="ShaderMaterial" id="ShaderMaterial_so677"] +shader = ExtResource("15_pmjmi") +shader_parameter/speed = 1.0 +shader_parameter/minStrength = 0.05 +shader_parameter/maxStrength = 0.01 +shader_parameter/strengthScale = 100.0 +shader_parameter/interval = 3.5 +shader_parameter/detail = 1.0 +shader_parameter/distortion = null +shader_parameter/heightOffset = null +shader_parameter/offset = 0.0 + [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_wt525"] light_mode = 1 +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b00lw"] +shader = ExtResource("15_pmjmi") +shader_parameter/speed = 1.0 +shader_parameter/minStrength = 0.05 +shader_parameter/maxStrength = 0.02 +shader_parameter/strengthScale = 100.0 +shader_parameter/interval = 2.0 +shader_parameter/detail = 1.0 +shader_parameter/distortion = 1.0 +shader_parameter/heightOffset = null +shader_parameter/offset = 0.0 + +[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_txrwk"] +light_mode = 1 + [sub_resource type="ShaderMaterial" id="ShaderMaterial_6r42m"] shader = ExtResource("15_vlb8v") shader_parameter/alpha = 0.75 @@ -166,91 +195,91 @@ size = Vector2(64, 97) [sub_resource type="RectangleShape2D" id="RectangleShape2D_5pcme"] size = Vector2(18, 6) -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mg83a"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_rmd68"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_elrp0"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mfl5e"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_7olcb"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_5dit0"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_d2b1c"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_s1isy"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_3qqeq"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_57t45"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_u0yfp"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_2s5o2"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_lxojq"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_hgfsn"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_6i24g"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_8o8wb"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_o80y1"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_nnd4x"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_bc5nr"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_muryx"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_wcyyo"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_2qvkn"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_gnvby"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_o7meu"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_8o4l7"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_52xin"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) @@ -522,10 +551,11 @@ offset = Vector2(32, -32) [node name="Static@Node2D2" type="Node2D" parent="Props" index="18"] z_index = 2 +material = SubResource("ShaderMaterial_so677") position = Vector2(696, 559) [node name="Sprite2D" type="Sprite2D" parent="Props/Static@Node2D2" index="0"] -material = SubResource("CanvasItemMaterial_wt525") +use_parent_material = true position = Vector2(40, 24) texture = ExtResource("10_sx2hw") offset = Vector2(-48, -64) @@ -539,17 +569,17 @@ offset = Vector2(-48, -64) [node name="StaticNode2D2" type="Node2D" parent="Props" index="19"] z_index = 1 +material = SubResource("ShaderMaterial_b00lw") position = Vector2(705, 447) [node name="Sprite2D" type="Sprite2D" parent="Props/StaticNode2D2" index="0"] -material = SubResource("CanvasItemMaterial_wt525") +use_parent_material = true position = Vector2(40, 24) texture = ExtResource("12_md5xh") offset = Vector2(-48, -64) [node name="Sprite2D2" type="Sprite2D" parent="Props/StaticNode2D2" index="1"] z_index = -4 -material = SubResource("CanvasItemMaterial_wt525") position = Vector2(40, 24) texture = ExtResource("12_md5xh") offset = Vector2(-48, -64) @@ -559,7 +589,7 @@ z_index = 3 position = Vector2(710, 603) [node name="Sprite2D" type="Sprite2D" parent="Props/Static@Node2D3" index="0"] -material = SubResource("CanvasItemMaterial_wt525") +material = SubResource("CanvasItemMaterial_txrwk") position = Vector2(64, 56) texture = ExtResource("11_wjfe8") offset = Vector2(-48, -64) @@ -682,6 +712,15 @@ explosiveness = 0.2 randomness = 0.5 fixed_fps = 12 +[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="Props" index="27"] +position = Vector2(576, 504) +stream = ExtResource("26_2g1h3") +volume_db = -4.0 +autoplay = true +max_distance = 140.0 +attenuation = 0.5 +bus = &"Ambient" + [node name="ArenaEntrance" parent="Entities" index="0" instance=ExtResource("20_tcd0x")] z_index = -1 position = Vector2(576, 416) @@ -716,55 +755,55 @@ position = Vector2(256, -9) position = Vector2(80, 373) [node name="Centurion" parent="Entities" index="8" instance=ExtResource("30_qfl2k")] -material = SubResource("ShaderMaterial_mg83a") +material = SubResource("ShaderMaterial_rmd68") position = Vector2(-360, 31) [node name="Centurion2" parent="Entities" index="9" instance=ExtResource("30_qfl2k")] -material = SubResource("ShaderMaterial_elrp0") +material = SubResource("ShaderMaterial_mfl5e") position = Vector2(-224, 131) [node name="Centurion3" parent="Entities" index="10" instance=ExtResource("30_qfl2k")] -material = SubResource("ShaderMaterial_7olcb") +material = SubResource("ShaderMaterial_5dit0") position = Vector2(-280, 411) [node name="Centurion4" parent="Entities" index="11" instance=ExtResource("30_qfl2k")] -material = SubResource("ShaderMaterial_d2b1c") +material = SubResource("ShaderMaterial_s1isy") position = Vector2(-232, 728) [node name="Legionary" parent="Entities" index="12" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_3qqeq") +material = SubResource("ShaderMaterial_57t45") position = Vector2(-214, 72) [node name="Legionary2" parent="Entities" index="13" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_u0yfp") +material = SubResource("ShaderMaterial_2s5o2") position = Vector2(-496, 15) [node name="Legionary3" parent="Entities" index="14" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_lxojq") +material = SubResource("ShaderMaterial_hgfsn") position = Vector2(-384, 118) [node name="Legionary4" parent="Entities" index="15" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_6i24g") +material = SubResource("ShaderMaterial_8o8wb") position = Vector2(-300, 384) [node name="Legionary5" parent="Entities" index="16" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_o80y1") +material = SubResource("ShaderMaterial_nnd4x") position = Vector2(-152, 728) [node name="Legionary6" parent="Entities" index="17" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_bc5nr") +material = SubResource("ShaderMaterial_muryx") position = Vector2(-258, 455) [node name="Legionary7" parent="Entities" index="18" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_wcyyo") +material = SubResource("ShaderMaterial_2qvkn") position = Vector2(-556, 402) [node name="Legionary8" parent="Entities" index="19" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_gnvby") +material = SubResource("ShaderMaterial_o7meu") position = Vector2(-404, 505) [node name="Cultist" parent="Entities" index="20" instance=ExtResource("30_xj4yo")] -material = SubResource("ShaderMaterial_8o4l7") +material = SubResource("ShaderMaterial_52xin") position = Vector2(191, 567) [node name="CameraBounds" parent="Areas" index="0" instance=ExtResource("33_e4gty")] diff --git a/Shaders/Scrolling.gdshader b/Shaders/Scrolling.gdshader new file mode 100644 index 0000000..d78cc43 --- /dev/null +++ b/Shaders/Scrolling.gdshader @@ -0,0 +1,8 @@ +shader_type canvas_item; + +uniform float speed = 16; +uniform vec2 direction = vec2(1, 0); + +void fragment() { + COLOR = texture(TEXTURE, UV - direction * TIME * speed); +} diff --git a/Shaders/WindSway.gdshader b/Shaders/WindSway.gdshader new file mode 100644 index 0000000..3de30bc --- /dev/null +++ b/Shaders/WindSway.gdshader @@ -0,0 +1,43 @@ +// original wind shader from https://github.com/Maujoe/godot-simple-wind-shader-2d/tree/master/assets/maujoe.simple_wind_shader_2d +// original script modified by HungryProton so that the assets are moving differently : https://pastebin.com/VL3AfV8D +// +// speed - The speed of the wind movement. +// minStrength - The minimal strength of the wind movement. +// maxStrength - The maximal strength of the wind movement. +// strengthScale - Scalefactor for the wind strength. +// interval - The time between minimal and maximal strength changes. +// detail - The detail (number of waves) of the wind movement. +// distortion - The strength of geometry distortion. +// heightOffset - The height where the wind begins to move. By default 0.0. + +shader_type canvas_item; +render_mode blend_mix; + +// Wind settings. +uniform float speed = 1.0; +uniform float minStrength : hint_range(0.0, 1.0) = 0.05; +uniform float maxStrength : hint_range(0.0, 1.0) = 0.01; +uniform float strengthScale = 100.0; +uniform float interval = 3.5; +uniform float detail = 1.0; +uniform float distortion : hint_range(0.0, 1.0); +uniform float heightOffset : hint_range(0.0, 1.0); + +// With the offset value, you can if you want different moves for each asset. Just put a random value (1, 2, 3) in the editor. Don't forget to mark the material as unique if you use this +uniform float offset = 0; + + +float getWind(vec2 vertex, vec2 uv, float time){ + float diff = pow(maxStrength - minStrength, 2.0); + float strength = clamp(minStrength + diff + sin(time / interval) * diff, minStrength, maxStrength) * strengthScale; + float wind = (sin(time) + cos(time * detail)) * strength * max(0.0, (1.0-uv.y) - heightOffset); + + return wind; +} + +void vertex() { + vec4 pos = MODEL_MATRIX * vec4(0.0, 0.0, 0.0, 1.0); + float time = TIME * speed + offset; + //float time = TIME * speed + pos.x * pos.y ; not working when moving... + VERTEX.x += getWind(VERTEX.xy, UV, time); +} diff --git a/Shaders/WindSwayUnshaded.gdshader b/Shaders/WindSwayUnshaded.gdshader new file mode 100644 index 0000000..3918d4e --- /dev/null +++ b/Shaders/WindSwayUnshaded.gdshader @@ -0,0 +1,43 @@ +// original wind shader from https://github.com/Maujoe/godot-simple-wind-shader-2d/tree/master/assets/maujoe.simple_wind_shader_2d +// original script modified by HungryProton so that the assets are moving differently : https://pastebin.com/VL3AfV8D +// +// speed - The speed of the wind movement. +// minStrength - The minimal strength of the wind movement. +// maxStrength - The maximal strength of the wind movement. +// strengthScale - Scalefactor for the wind strength. +// interval - The time between minimal and maximal strength changes. +// detail - The detail (number of waves) of the wind movement. +// distortion - The strength of geometry distortion. +// heightOffset - The height where the wind begins to move. By default 0.0. + +shader_type canvas_item; +render_mode unshaded; + +// Wind settings. +uniform float speed = 1.0; +uniform float minStrength : hint_range(0.0, 1.0) = 0.05; +uniform float maxStrength : hint_range(0.0, 1.0) = 0.01; +uniform float strengthScale = 100.0; +uniform float interval = 3.5; +uniform float detail = 1.0; +uniform float distortion : hint_range(0.0, 1.0); +uniform float heightOffset : hint_range(0.0, 1.0); + +// With the offset value, you can if you want different moves for each asset. Just put a random value (1, 2, 3) in the editor. Don't forget to mark the material as unique if you use this +uniform float offset = 0; + + +float getWind(vec2 vertex, vec2 uv, float time){ + float diff = pow(maxStrength - minStrength, 2.0); + float strength = clamp(minStrength + diff + sin(time / interval) * diff, minStrength, maxStrength) * strengthScale; + float wind = (sin(time) + cos(time * detail)) * strength * max(0.0, (1.0-uv.y) - heightOffset); + + return wind; +} + +void vertex() { + vec4 pos = MODEL_MATRIX * vec4(0.0, 0.0, 0.0, 1.0); + float time = TIME * speed + offset; + //float time = TIME * speed + pos.x * pos.y ; not working when moving... + VERTEX.x += getWind(VERTEX.xy, UV, time); +} diff --git a/UI/TargetTracer.cs b/UI/TargetTracer.cs new file mode 100644 index 0000000..7be0021 --- /dev/null +++ b/UI/TargetTracer.cs @@ -0,0 +1,20 @@ +using Godot; + +public partial class TargetTracer : Node2D +{ + private Line2D _line; + + private float Intensity + { + get => SelfModulate.A; + set + { + SelfModulate = new Color(SelfModulate, value); + } + } + + public override void _Ready() + { + _line = GetNode("Line2D"); + } +} diff --git a/UI/TargetTracer.tscn b/UI/TargetTracer.tscn new file mode 100644 index 0000000..5dd4b81 --- /dev/null +++ b/UI/TargetTracer.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=6 format=3 uid="uid://ce0ph4wk0ylra"] + +[ext_resource type="Shader" path="res://Shaders/Scrolling.gdshader" id="1_1y0lt"] +[ext_resource type="Script" path="res://UI/TargetTracer.cs" id="1_mtnfa"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_hcccp"] +shader = ExtResource("1_1y0lt") +shader_parameter/speed = 1.0 +shader_parameter/direction = Vector2(1, 0) + +[sub_resource type="Gradient" id="Gradient_0wna6"] +interpolation_mode = 1 +offsets = PackedFloat32Array(0, 0.867133) +colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_icdwl"] +gradient = SubResource("Gradient_0wna6") +width = 2 +height = 1 + +[node name="TargetTracer" type="Node2D"] +script = ExtResource("1_mtnfa") + +[node name="Line2D" type="Line2D" parent="."] +z_index = 31 +texture_repeat = 2 +material = SubResource("ShaderMaterial_hcccp") +scale = Vector2(1, 0.5) +points = PackedVector2Array(0, 0, 32, 0) +width = 2.0 +texture = SubResource("GradientTexture2D_icdwl") +texture_mode = 1