public void DrawPlayersPanels() { foreach (PlayerController playerController in _playerControllers.Values) { PlayerType playerType = playerController.PlayerType; PlayerView playerView = _gameViewContext.GetPlayerView(playerType); Transform panelsContainer = playerView.PanelHierarchy.statsPanel; DrawBuffPanels(playerController.PlayerModel, panelsContainer); DrawStatPanels(playerController.PlayerModel, panelsContainer); } }
private void CreatePlayerHealthBars() { foreach (PlayerType playerType in _playerControllers.Keys) { GameObject playerObject = _gameViewContext.GetPlayerView(playerType).PanelHierarchy.character.gameObject; HealthBarViewMediator healthBar = GameObject.Instantiate(_gameViewContext.HealthPanel, _gameViewContext.HealthContainer.transform); GetPlayerController(playerType).HealthBar = healthBar; _healthBarToPlayerCharacters.Add(healthBar, playerObject); } UpdateHealthBarsPositions(); }