SupaLidlGame/UI/TargetTracer.cs

26 lines
500 B
C#
Raw Normal View History

2023-09-07 11:53:51 -07:00
using Godot;
public partial class TargetTracer : Node2D
{
private Line2D _line;
2023-09-10 09:37:12 -07:00
private float _intensity = 127;
public float Intensity
2023-09-07 11:53:51 -07:00
{
2023-09-10 09:37:12 -07:00
get => _intensity;
2023-09-07 11:53:51 -07:00
set
{
2023-09-10 09:37:12 -07:00
var color = new Color(Colors.White, value);
(Material as ShaderMaterial)
.SetShaderParameter("tint_color", color);
_intensity = value;
2023-09-07 11:53:51 -07:00
}
}
public override void _Ready()
{
_line = GetNode<Line2D>("Line2D");
}
}