Files
HauntedBloodlines/Assets/Obi/Editor/Common/Blueprints/Brushes/BrushModes/ObiSelectBrushMode.cs
2025-05-29 22:31:40 +03:00

33 lines
807 B
C#

namespace Obi
{
public class ObiSelectBrushMode : IObiBrushMode
{
ObiBlueprintSelected property;
string customName;
public ObiSelectBrushMode(ObiBlueprintSelected property, string customName = "Select")
{
this.property = property;
this.customName = customName;
}
public string name
{
get { return customName; }
}
public bool needsInputValue
{
get { return true; }
}
public void ApplyStamps(ObiBrushBase brush, bool modified)
{
for (int i = 0; i < brush.weights.Length; ++i)
{
if (brush.weights[i] > 0 && !property.Masked(i))
property.Set(i,!modified);
}
}
}
}