Skip to content

Commit

Permalink
Fixed wheel segment scaling animation not finishing
Browse files Browse the repository at this point in the history
...which caused the "scale down" animation to play when reopening the tower construction wheel, after having previously selected a tower to build.
  • Loading branch information
ddabble committed Nov 24, 2021
1 parent b7155f6 commit f40b00f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Assets/Scripts/UI/UIControllerWheel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ void Awake()
segment.GetComponent<SpriteRenderer>().sprite = normalSprite;
}

void OnEnable()
{
SelectedSegmentIndex = null;

// Reset the scale of all menu segments
foreach (GameObject segment in menuSegments)
LeanTween.scale(segment, Vector3.one, 0f);
}

public int GetNumSegments()
{
return menuSegments.Length;
Expand Down

0 comments on commit f40b00f

Please sign in to comment.