private void AddPanel(string panelName, string icon, string value, Transform container) { StatPanelViewMediator statPanel = GameObject.Instantiate(_gameViewContext.StatPanel, container); statPanel.name = panelName; statPanel.IconName = icon; statPanel.Value = value; }
public void UpdateHealthPanelValue(PlayerType playerType, string value) { PlayerView playerView = _gameViewContext.GetPlayerView(playerType); Transform transform = playerView.PanelHierarchy.statsPanel.Find(STAT_PANEL_PREFIX + StatsId.LIFE_ID); StatPanelViewMediator statPanel = transform.GetComponent <StatPanelViewMediator>(); statPanel.Value = value; }