8 [
Attribute(
"", UIWidgets.Object,
"Visual configuration")]
9 protected ref SCR_MarkerSimpleConfig m_EntryConfig;
17 void OnPlayerSpawned(
int playerId, IEntity player)
19 if (m_MarkerMgr.GetDynamicMarkerByTarget(GetMarkerType(), player))
22 SCR_MapMarkerEntity markerEnt = m_MarkerMgr.InsertDynamicMarker(GetMarkerType(), player, 1);
23 markerEnt.SetGlobalVisible(
true);
28 void OnPlayerKilled(
int playerId, IEntity playerEntity, IEntity killerEntity, notnull
Instigator killer)
30 SCR_MapMarkerEntity markerEnt = m_MarkerMgr.GetDynamicMarkerByTarget(GetMarkerType(), playerEntity);
32 m_MarkerMgr.RemoveDynamicMarker(markerEnt);
37 void OnPlayerDeleted(
int playerId, IEntity player)
39 SCR_MapMarkerEntity markerEnt = m_MarkerMgr.GetDynamicMarkerByTarget(GetMarkerType(), player);
41 m_MarkerMgr.RemoveDynamicMarker(markerEnt);
64 super.InitClientSettingsDynamic(marker, widgetComp);
67 m_EntryConfig.GetIconResource(imgset, icon);
69 widgetComp.SetImage(imgset, icon);
70 widgetComp.SetColor(m_EntryConfig.GetColor());
71 widgetComp.SetText(m_EntryConfig.GetText());
80 override void InitServerLogic()
82 super.InitServerLogic();
88 gameMode.GetOnPlayerSpawned().Insert(OnPlayerSpawned);
89 gameMode.GetOnPlayerKilled().Insert(OnPlayerKilled);
90 gameMode.GetOnPlayerDeleted().Insert(OnPlayerDeleted);