|
|
|
@ -19,6 +19,7 @@ public partial class InteractionArea2D : Node2D
|
|
|
|
[Export] private int _id = -1; // TODO: remove
|
|
|
|
[Export] private int _id = -1; // TODO: remove
|
|
|
|
|
|
|
|
|
|
|
|
private Material[] _backupMaterials;
|
|
|
|
private Material[] _backupMaterials;
|
|
|
|
|
|
|
|
private bool _initializationComplete;
|
|
|
|
|
|
|
|
|
|
|
|
[Signal] public delegate void InteractedToolEventHandler(int id); // TODO: remove
|
|
|
|
[Signal] public delegate void InteractedToolEventHandler(int id); // TODO: remove
|
|
|
|
|
|
|
|
|
|
|
|
@ -33,6 +34,8 @@ public partial class InteractionArea2D : Node2D
|
|
|
|
Visible = value;
|
|
|
|
Visible = value;
|
|
|
|
_selectionChangeListener.ProcessMode = value ? ProcessModeEnum.Inherit : ProcessModeEnum.Disabled;
|
|
|
|
_selectionChangeListener.ProcessMode = value ? ProcessModeEnum.Inherit : ProcessModeEnum.Disabled;
|
|
|
|
_active = value;
|
|
|
|
_active = value;
|
|
|
|
|
|
|
|
if(!_active && _initializationComplete)
|
|
|
|
|
|
|
|
ResetHighlight();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -48,6 +51,7 @@ public partial class InteractionArea2D : Node2D
|
|
|
|
if (_useOutline)
|
|
|
|
if (_useOutline)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_backupMaterials = _spritesToOutline.Select(s => s.Material).ToArray();
|
|
|
|
_backupMaterials = _spritesToOutline.Select(s => s.Material).ToArray();
|
|
|
|
|
|
|
|
_initializationComplete = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|