Skip to content

SusSearchRadar ​

SusSearchRadar

Opponent-search radar — an animated sweep while searching, a flash when a match is found, then a settled state with a status label and timer.

Package

SusGame · Screens (commercial)

Open in Playground

SusGame · Screens

Props

NameTypeDefault
StateProp<string>"searching"
LabelProp<string>DefaultLabel
SettleDelayMsProp<int>1500
TimerTickMsProp<int>1000

Slots

No slots.

Events

NameFieldPayload
SettledOnSettled—

Style hooks ​

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-search-radar
  • sus-search-radar__axis
  • sus-search-radar__axis--h
  • sus-search-radar__axis--v
  • sus-search-radar__dot
  • sus-search-radar__flash
  • sus-search-radar__label
  • sus-search-radar__label--empty
  • sus-search-radar__ring
  • sus-search-radar__sweep
  • sus-search-radar__timer
  • sus-search-radar--found
  • sus-search-radar--searching
  • sus-search-radar--settled

Usage ​

xml
<sus:SusSearchRadar />
csharp
var radar = new SusSearchRadar();
radar.Label.Value = "Searching for opponent...";
radar.OnSettled += () => { /* start the match */ };
radar.StartSearch();
// later, when the matchmaker answers:
radar.Found();
Prop / APIRole
State"searching" (sweep rotates, elapsed timer runs), "found" (dot and flash, timer frozen), "settled" (match locked in). Drives sus-search-radar--searching / --found / --settled
LabelStatus caption under the radar; the caller sets the text per state. Default "Searching for opponent..." (translated through SusGameText). An empty string hides the caption node (sus-search-radar__label--empty)
SettleDelayMsDelay from Found() to the automatic found → settled step. Default 1500
StartSearch()(Re)starts a search from any state: timer to 0, sweep resumes
Found()Opponent located; no-op outside searching
OnSettledFires once when the found → settled step completes

Reduce motion ​

While SusMotion.Reduce is on, the sweep holds still; the elapsed timer keeps running.