19 lines
403 B
C#
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);
|
|
}
|
|
}
|