23 lines
490 B
C#
Raw Normal View History

2022-12-10 17:24:14 +00:00
using Godot;
using System;
public class HeatOverlay : Overlay
{
[Export]
private Color _coldColor;
[Export]
private Color _hotColor;
public override void Initialise(Tile tile, ShaderMaterial material)
{
material.SetShaderParam("lowColor", _coldColor);
material.SetShaderParam("highColor", _hotColor);
}
public override void Process(Tile tile, ShaderMaterial material)
{
material.SetShaderParam("t", tile.temperature);
}
}