rokojori_action_library/Runtime/LOD/LODArrangement.cs

32 lines
565 B
C#
Raw Normal View History

2025-01-03 12:09:23 +00:00
using Godot;
using System.Collections;
using System.Collections.Generic;
using Godot.Collections;
2026-05-22 12:25:02 +00:00
using Rokojori.Extensions;
2025-01-03 12:09:23 +00:00
namespace Rokojori
{
[Tool]
[GlobalClass]
public partial class LODArrangement:Resource
{
[Export]
public LODLevel[] levels = new LODLevel[ 0 ];
2025-01-03 12:09:23 +00:00
public LODLevel GetLevel( LODNode node )
{
for ( int i = 0; i < levels.Length; i++ )
{
if ( ! levels[ i ].Evaluate( node ) )
{
continue;
}
return levels[ i ];
}
return null;
}
}
}