timed button stand puzzle
This commit is contained in:
@@ -11,6 +11,7 @@ namespace Station46.Scripts
|
||||
private static readonly int FresnelColor = Shader.PropertyToID("_FresnelColor");
|
||||
private static readonly int Color = Shader.PropertyToID("_Color");
|
||||
|
||||
public bool hideWhenDisabled, startInactive;
|
||||
[BoxGroup("Internal")] [Required] public MeshRenderer holoRenderer;
|
||||
|
||||
private Material _material;
|
||||
@@ -35,9 +36,16 @@ namespace Station46.Scripts
|
||||
color = EscapeRoomEngine.Engine.Runtime.Engine.Theme.activeColor;
|
||||
}
|
||||
|
||||
holoRenderer.enabled = Active || !hideWhenDisabled;
|
||||
|
||||
_material.SetColor(FresnelColor, color.hdr);
|
||||
_material.SetColor(Color, color.hdr);
|
||||
};
|
||||
|
||||
if (startInactive)
|
||||
{
|
||||
Active = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user