// PARTY COMMAND public void SetPartyCommands(Pokemon pokemon, List <BattleExtraCommand> commands) { partyCmdBtns = new List <BTLUI_ButtonCmdExtra>(); for (int i = 0; i < commands.Count; i++) { BTLUI_ButtonCmdExtra newBtn = Instantiate(cmdExtraBtnPrefab, partyCmdOptionObj.transform); newBtn.InitializeSelf(); CreateCmdExtraBtn(commands[i], newBtn); partyCmdBtns.Add(newBtn); int xPos = 0; int yPos = -20 * i; newBtn.transform.localPosition += new Vector3(xPos, yPos); } string promptString = "Do what with\n\\cyellow\\" + pokemon.nickname + "\\c.\\?"; StartCoroutine(DrawTextInstant(text: promptString, textBox: partyCmdTxt)); }
private void SelectCmdExtraBtn(BTLUI_ButtonCmdExtra btn, bool select) { btn.image.color = select ? colorSel : colorUnsel; btn.txt.color = select ? colorTxtSel : colorTxtUnsel; }
private void CreateCmdExtraBtn(BattleExtraCommand commandType, BTLUI_ButtonCmdExtra btn) { btn.commandType = commandType; btn.txt.text = commandType.ToString(); }