65 lines
1.8 KiB
C#
65 lines
1.8 KiB
C#
namespace XCEngine
|
|
{
|
|
public sealed class MeshRenderer : Component
|
|
{
|
|
internal MeshRenderer(ulong gameObjectUUID)
|
|
: base(gameObjectUUID)
|
|
{
|
|
}
|
|
|
|
public int MaterialCount => InternalCalls.MeshRenderer_GetMaterialCount(GameObjectUUID);
|
|
public int materialCount => MaterialCount;
|
|
|
|
public bool CastShadows
|
|
{
|
|
get => InternalCalls.MeshRenderer_GetCastShadows(GameObjectUUID);
|
|
set => InternalCalls.MeshRenderer_SetCastShadows(GameObjectUUID, value);
|
|
}
|
|
|
|
public bool castShadows
|
|
{
|
|
get => CastShadows;
|
|
set => CastShadows = value;
|
|
}
|
|
|
|
public bool ReceiveShadows
|
|
{
|
|
get => InternalCalls.MeshRenderer_GetReceiveShadows(GameObjectUUID);
|
|
set => InternalCalls.MeshRenderer_SetReceiveShadows(GameObjectUUID, value);
|
|
}
|
|
|
|
public bool receiveShadows
|
|
{
|
|
get => ReceiveShadows;
|
|
set => ReceiveShadows = value;
|
|
}
|
|
|
|
public int RenderLayer
|
|
{
|
|
get => InternalCalls.MeshRenderer_GetRenderLayer(GameObjectUUID);
|
|
set => InternalCalls.MeshRenderer_SetRenderLayer(GameObjectUUID, value);
|
|
}
|
|
|
|
public int renderLayer
|
|
{
|
|
get => RenderLayer;
|
|
set => RenderLayer = value;
|
|
}
|
|
|
|
public string GetMaterialPath(int index)
|
|
{
|
|
return InternalCalls.MeshRenderer_GetMaterialPath(GameObjectUUID, index) ?? string.Empty;
|
|
}
|
|
|
|
public void SetMaterialPath(int index, string path)
|
|
{
|
|
InternalCalls.MeshRenderer_SetMaterialPath(GameObjectUUID, index, path ?? string.Empty);
|
|
}
|
|
|
|
public void ClearMaterials()
|
|
{
|
|
InternalCalls.MeshRenderer_ClearMaterials(GameObjectUUID);
|
|
}
|
|
}
|
|
}
|