public void Setup(Player player, PlayerCOM playerPreview, List <UpgradeInstall> list, ActionType currentType) { this.playerPreview = playerPreview; this.list = list; this.currentType = currentType; playerInputIndex = player.inputIndex; GetStartingIndex(player); UpdateDisplay(); setup = true; }
public void SetPanels(Shop shop, int id, Player player, Vector3 position) { this.shop = shop; this.id = id; this.player = player; playerInputIndex = player.inputIndex; GetComponent <RectTransform>().anchoredPosition = position; inputPanel.SetActive(true); confirmationPanel.gameObject.SetActive(false); index = 0; playerPreview = Instantiate(playerPreview, new Vector3((id == 1) ? -4.5f : 4.5f, -3.5f), Quaternion.identity); playerPreview.SetActive(true); playerCOM = playerPreview.GetComponent <PlayerCOM>(); playerCOM.SetLEDsColor((id == 1) ? PlayerConfigurations.player1.color : PlayerConfigurations.player2.color); SetActionDisplay(); SetUpgradeLabels(); label.text = "Player " + id; }