/// <summary> /// Create the panels for the dungeon master. /// </summary> /// <param name="basePlayer"></param> private void InstantiatePanel(BasePlayer basePlayer) { PlayerPanel playerPanel = Instantiate(playerPanelPrefab); playerPanel.PlayerPanelConstruct(basePlayer.GetName(), basePlayer.GetMaxHealth(), basePlayer.GetMaxEnergy()); playerPanel.transform.SetParent(playerPanelHolder, false); playerPanel.transform.localPosition = new Vector3(playerPanel.transform.localPosition.x, playerPanel.transform.localPosition.y, 0); //Add the panel to the dictionary with the basePlayer as the key so we can easily change it later panels.Add(basePlayer, playerPanel); }