1bit-game-jam/scripts/PointLight2DWorkaround.cs
Ivan Kuzmenko f307a7ef00 Add new cool light beam for the flashlight
Co-authored-by: Евгений Титаренко <frundle@teasanctuary.ru>
2023-08-16 00:13:37 +03:00

16 lines
304 B
C#

using Godot;
using System;
[Tool]
public partial class PointLight2DWorkaround : PointLight2D
{
[Export] public Viewport LightViewport;
public override void _Process(double delta)
{
base._Process(delta);
Texture = null;
Texture = LightViewport.GetTexture();
}
}