rj-action-library/Runtime/LOD/LODArrangement.cs

31 lines
518 B
C#

using Godot;
using System.Collections;
using System.Collections.Generic;
using Godot.Collections;
namespace Rokojori
{
[Tool]
[GlobalClass]
public partial class LODArrangement:Resource
{
[Export]
public LODLevel[] levels;
public LODLevel GetLevel( LODNode node )
{
for ( int i = 0; i < levels.Length; i++ )
{
if ( ! levels[ i ].Evaluate( node ) )
{
continue;
}
return levels[ i ];
}
return null;
}
}
}