Skip to content

Commit

Permalink
Allow the erase tool to also "erase" media widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Feb 5, 2025
1 parent 8bcd3ff commit 1be7be0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Assets/Scripts/Tools/EraserTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ override public void IntersectionHappenedThisFrame()

override protected bool HandleIntersectionWithWidget(GrabWidget widget)
{
if (widget is MediaWidget)
{
SketchMemoryScript.m_Instance.PerformAndRecordCommand(new HideWidgetCommand(widget));
AudioManager.m_Instance.ShowHideWidget(false, transform.position);
PlayModifyStrokeSound();
return true;
}
return false;
}

Expand Down

0 comments on commit 1be7be0

Please sign in to comment.