void Update() { if (Input.inputString.Length > 0 && char.IsDigit(Input.inputString[0])) { _inputString += Input.inputString[0]; SnackBar.ShowMessage(_inputString, 3); } if (Input.GetKeyDown(KeyCode.Minus) || Input.GetKeyDown(KeyCode.KeypadMinus)) { var controller = BarSelector.CurrentlySelected.GetComponent <CharacterBarController>(); int newHpValue = controller.Character.Hp - int.Parse(_inputString); StartCoroutine(AlterHp(controller.Character.CharId, newHpValue)); _inputString = string.Empty; controller.Character.Hp = newHpValue; } if (Input.GetKeyDown(KeyCode.Plus) || Input.GetKeyDown(KeyCode.KeypadPlus)) { var controller = BarSelector.CurrentlySelected.GetComponent <CharacterBarController>(); int newHpValue = controller.Character.Hp + int.Parse(_inputString); StartCoroutine(AlterHp(controller.Character.CharId, newHpValue)); _inputString = string.Empty; controller.Character.Hp = newHpValue; } }
public void CopyUri() { GUIUtility.systemCopyBuffer = waypointData.Uri; snackBar.ShowMessage("Uri copiada en el portapales", 2); }