ballot-checkAbilities Selector Window

The Abilities Selector is a complex window that displays up to three abilities for the player to choose from.

Abilities Selector Prefab Structure

  • Background Image - A dark, full-screen image that dims the background and blocks raycasts to all elements behind the Ability Selector.

  • Slots Holder - The parent object that contains all Ability Selector Slots.

  • Level Up Header - The visual header of the Ability Selector. It includes the Level Up text, decorative images, and an animated shine line that plays when the Ability Selector is shown.

  • Rarity - A visual element representing the rarity tier of the abilities currently shown to the player. It contains Rarity Text and a Gradient Image.

  • Skip Button - A full-screen invisible button that allows the player to skip the Ability Selector’s animation.

  • Roll Again Button - A button that lets the player reroll the available abilities for a small gold cost.

  • Gold - Displays the player’s current gold amount.

Abilities Selector Animation flow

The Ability Selector window features a complex multi step animation. It's controlled by ShowCoroutine() method. Let's break it down

The Ability Selector Component contains many variables that control the animation flow, durations, and delays of different UI elements. If the player clicks Skip, the animation immediately jumps to the CompleteShowCoroutine() method.

Ability Selector Slot Animation Flow

Each slot scrolls cards vertically in a continuous loop, controlled by ScrollingCoroutine(). Here’s a breakdown:

Ability Card Animation Flow

The animation for revealing an ability card is handled by the Init() method in AbilityCardBehavior:

Last updated