ktyl 58c2d9a451 heat (#16)
Reviewed-on: #16
2022-12-13 01:54:54 +01:00

19 lines
403 B
C#

using Godot;
using System;
public class HeatOverlay : Overlay
{
[Export]
private Color _coldColor;
[Export]
private Color _hotColor;
public override void Apply(Tile tile, ShaderMaterial material)
{
material.SetShaderParam("lowColor", _coldColor);
material.SetShaderParam("highColor", _hotColor);
material.SetShaderParam("t", tile.temperature);
}
}