public void HighlightBackButton() { move1Btn.UnselectSelf(); move2Btn.UnselectSelf(); move3Btn.UnselectSelf(); move4Btn.UnselectSelf(); backBtn.SelectSelf(); promptText.text = "Go back to commands."; }
public void HighlightMove(int moveIndex) { Panels.FightButton selectedBtn = null; if (moveIndex == 0) { selectedBtn = move1Btn; } else { move1Btn.UnselectSelf(); } if (moveIndex == 1) { selectedBtn = move2Btn; } else { move2Btn.UnselectSelf(); } if (moveIndex == 2) { selectedBtn = move3Btn; } else { move3Btn.UnselectSelf(); } if (moveIndex == 3) { selectedBtn = move4Btn; } else { move4Btn.UnselectSelf(); } if (selectedBtn != null) { selectedBtn.SelectSelf(); backBtn.UnselectSelf(); if (selectedBtn.moveslot.hide) { promptText.text = "This move can't be selected..."; } else { MoveData moveData = MoveDatabase.instance.GetMoveData(selectedBtn.moveID); TypeData typeData = TypeDatabase.instance.GetTypeData(moveData.moveType); Color typeColor = Color.clear; ColorUtility.TryParseHtmlString(typeData.typeColor, out typeColor); string moveText = "<color=" + typeData.typeColor + ">" + typeData.typeName + "</color>\n"; moveText += moveData.category.ToString() + " / "; moveText += (selectedBtn.moveslot.basePower > 0) ? selectedBtn.moveslot.basePower + " BP / " : ""; moveText += (selectedBtn.moveslot.accuracy > 0) ? (Mathf.FloorToInt(selectedBtn.moveslot.accuracy * 100)) + "% ACC" : "Never Misses"; promptText.text = moveText; } } }