private void NameOptionSelected(string option, int index) { _textbox.Close(); if (index == 0) { // input own name var nameScreen = new PlayerNamingScreen(this); nameScreen.LoadContent(); nameScreen.SetIcon(_namingIcon); nameScreen.NameSelected += PlayerCustomNameEntered; GetComponent <ScreenManager>().SetScreen(nameScreen); } else { // use preset name _playerChosenName = PRESET_NAMES[index]; _movePlayer = true; } }
public static void Close() { Textbox textbox = gameObject.GetComponent <Textbox>(); // Triggers only close blocking text if (!textbox.Blocking) { textbox.Close(); NextTextbox(); } }
private void PutInPackOptionSelected(string option, int index) { _confirmationBox.OptionSelected -= PutInPackOptionSelected; if (index == 0) // yes { var mailData = _mails[_index + _scrollIndex]; var mailItem = mailData.GetItem(); Controller.ActivePlayer.RemoveMailFromPC(mailData); Controller.ActivePlayer.AddItem(mailItem.Name, 1); _textbox.Show("The cleared MAIL\nwas put away."); _textbox.Closed += PutInPackFinished; } else // no { _textbox.Close(); } }
// sets menu to main public void ResetMenu() { _battleTextbox.Close(); _menuState = BattleMenuState.Main; }
private void WithdrawDismissed() { _amountSelector.Dismissed -= WithdrawDismissed; _textbox.Close(); }