using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; using System.Text; using Godot; namespace Rokojori { public enum HighlightActionType { Start, End } public class HighlightTargets { public Node3D[] targets; public int activeAnimationTarget = -1; public List originalMaterial; public List animationMaterial; } [Tool] [GlobalClass] public partial class Highlighter:Node { [Export] public HighlightFlag flag; [Export] public Material material; List _activeTargets = new List(); public void Highlight( HighlightActionType type, Node3D[] targets ) { if ( HighlightActionType.End == type ) { var t = _activeTargets.Find( a => a.targets == targets ); if ( t == null ) { return; } // Get materials // Animate // Swap Original Material; // Remove Materials; } else if ( HighlightActionType.Start == type ) { // Create target // Create materials // Swap animation materials // Animate } } } }