set correct shader properties in symbol button

This commit is contained in:
2022-11-20 12:53:23 +01:00
parent 9fdfafc3eb
commit 2d6c3b67fd

View File

@@ -6,7 +6,7 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
[RequireComponent(typeof(MeshRenderer))] [RequireComponent(typeof(MeshRenderer))]
public class SymbolButton : Button public class SymbolButton : Button
{ {
private static readonly int FresnelPower = Shader.PropertyToID("_FresnelPower"); private static readonly int FresnelColor = Shader.PropertyToID("_FresnelColor");
private static readonly int Color = Shader.PropertyToID("_Color"); private static readonly int Color = Shader.PropertyToID("_Color");
public EngineTheme theme; public EngineTheme theme;
@@ -22,7 +22,7 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
Pressed ? theme.activeColor Pressed ? theme.activeColor
: Active ? theme.puzzleColor : Active ? theme.puzzleColor
: theme.solvedColor; : theme.solvedColor;
_material.SetColor(FresnelPower, color); _material.SetColor(FresnelColor, color);
_material.SetColor(Color, color); _material.SetColor(Color, color);
} }
} }