Add new cool light beam for the flashlight
Co-authored-by: Евгений Титаренко <frundle@teasanctuary.ru>
This commit is contained in:
parent
3832a05c1b
commit
f307a7ef00
20 changed files with 230 additions and 68 deletions
16
scripts/PointLight2DWorkaround.cs
Normal file
16
scripts/PointLight2DWorkaround.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue