The User Interface in CrowdRunner provides essential information to the player, such as follower/enemy counts, and manages game states like the initial start screen. The UI is built using Unreal Engine's UMG (Unreal Motion Graphics) system, primarily through Widget Blueprints.
Key UI elements include:
Purpose:
This is a reusable Widget Blueprint designed to display a count (a number) alongside a representative icon. It's used by BP_Crowd_Player
to show the current follower count and by BP_EnemySegment
to show the current enemy count for that segment.
Key Variables
CountDisplayText
(Text Widget Reference): Bound to the TextBlock in the designer.IconDisplay
(Image Widget Reference): Bound to the Image widget in the designer.SpecifiedColor
(Linear Color)SlateColor
(Slate Color)Key Functions
UpdateCount(NewNumber As Integer)
:
NewNumber
(Integer).NewNumber
, converts it to Text, and sets the Text
property of the CountDisplayText
widget.BP_Crowd_Player
(for follower count) and BP_EnemySegment
(for enemy count).SetIcon(IconToShow As Texture2D)
: