Files
resources/semag/fridaynightfunkin/assets/scripts/shaders/BuildingEffectShader.hxc
2025-06-22 12:00:12 -04:00

34 lines
617 B
Plaintext
Executable File

import flixel.addons.display.FlxRuntimeShader;
import funkin.Paths;
import openfl.utils.Assets;
class BuildingEffectShader extends FlxRuntimeShader
{
var alphaShit:Float = 1.0;
public var effectSpeed:Float = 1.0;
function new(speed:Float = 1.0)
{
var fragText:String = Assets.getText(Paths.frag('building'));
super(fragText);
this.effectSpeed = speed;
}
function setAlpha(value:Float):Void
{
this.alphaShit = value;
this.setFloat('alphaShit', this.alphaShit);
}
function update(elapsed:Float):Void
{
setAlpha(alphaShit + effectSpeed * elapsed);
}
function reset()
{
setAlpha(0);
}
}