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 = new LODLevel[ 0 ];

    public LODLevel GetLevel( LODNode node )
    {
      for ( int i = 0; i < levels.Length; i++ )
      {
        if ( ! levels[ i ].Evaluate( node ) )
        {
          continue;
        }
        
        return levels[ i ];
        
      }

      return null;
    }
  }
}