You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
mapbox-sdk/Unity/SourceLayers/SubLayerLightStyle.cs

40 lines
708 B

namespace Mapbox.Unity.Map
{
public class SubLayerLightStyle : ISubLayerLightStyle
{
private GeometryMaterialOptions _materialOptions;
public SubLayerLightStyle(GeometryMaterialOptions materialOptions)
{
_materialOptions = materialOptions;
}
public float Opacity
{
get
{
return _materialOptions.lightStyleOpacity;
}
set
{
_materialOptions.lightStyleOpacity = value;
_materialOptions.HasChanged = true;
}
}
public void SetAsStyle()
{
SetAsStyle(1.0f);
}
public void SetAsStyle(float opacity)
{
_materialOptions.style = StyleTypes.Light;
_materialOptions.lightStyleOpacity = opacity;
_materialOptions.HasChanged = true;
}
}
}