mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
33 lines
702 B
C#
33 lines
702 B
C#
using AssetRipper.SourceGenerated.Classes.ClassID_218;
|
|
using AssetRipper.SourceGenerated.Enums;
|
|
|
|
namespace AssetRipper.SourceGenerated.Extensions
|
|
{
|
|
public static class TerrainExtensions
|
|
{
|
|
public static ShadowCastingMode GetShadowCastingMode(this ITerrain terrain)
|
|
{
|
|
if (terrain.Has_ShadowCastingMode())
|
|
{
|
|
return terrain.ShadowCastingModeE;
|
|
}
|
|
else
|
|
{
|
|
return terrain.CastShadows ? ShadowCastingMode.TwoSided : ShadowCastingMode.Off;
|
|
}
|
|
}
|
|
|
|
public static bool GetCastShadows(this ITerrain terrain)
|
|
{
|
|
if (terrain.Has_CastShadows())
|
|
{
|
|
return terrain.CastShadows;
|
|
}
|
|
else
|
|
{
|
|
return terrain.ShadowCastingModeE != ShadowCastingMode.Off;
|
|
}
|
|
}
|
|
}
|
|
}
|