30 lines
610 B
C#
30 lines
610 B
C#
using Godot;
|
|
using Rokojori;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
[Tool, GlobalClass]
|
|
public partial class PostProcessingHack : Action
|
|
{
|
|
[Export]
|
|
public CompositorEffect[] compositorEffects;
|
|
|
|
[Export]
|
|
public WorldEnvironment environment;
|
|
|
|
|
|
protected override void _OnTrigger()
|
|
{
|
|
|
|
var godotArray = new Godot.Collections.Array<CompositorEffect>();
|
|
|
|
for ( int i = 0; i < compositorEffects.Length; i++ )
|
|
{
|
|
godotArray.Add( (CompositorEffect) compositorEffects[ i ].Duplicate() );
|
|
}
|
|
|
|
environment.Compositor.CompositorEffects = godotArray;
|
|
}
|
|
|
|
}
|