void UpdateLabels() { foreach (Profession p in Enum.GetValues(typeof(Profession))) { if (p == Profession.None) { continue; } GameObject.Find(UILib.GetLabelNameByProf(p)).GetComponent <Text>().text = _requiredCounters[p].ToString(); } GameObject.Find(UILib.GetLabelNameByProf(Profession.None)).GetComponent <Text>().text = _availableCounter.ToString(); }
public void OnChangeInput(string type) { GameObject input = GameObject.Find(type); var val = (int)uint.Parse(input.GetComponent <InputField>().text); var maxVal = _availableCounter + _assignedCounters[UILib.GetProfByInputName(type)]; if (val > maxVal) { val = maxVal; } _assignedCounters[UILib.GetProfByInputName(type)] = val; ApplyCounters(UILib.GetProfByInputName(type)); }
private void UpdateInputs() { foreach (Profession prof in Enum.GetValues(typeof(Profession))) { if (prof == Profession.None) { continue; } var g = GameObject.Find(UILib.GetInputNameByProf(prof)); if (g != null) { g.GetComponent <InputField>().text = _assignedCounters[prof].ToString(); } } }
public void OnLoginSuccess() { Debug.Log("AAAA"); UILib.SwitchProcedurePanel("DESKTOP"); // MSGBOXCALLBACK okcb = delegate() // { // Debug.LogError("ok"); // }; // // MSGBOXCALLBACK cancelcb = delegate() // { // Debug.LogError("cancel"); // }; // // Eventer.Fire("ShowMessageBox", new object[] // { // "哈哈哈", // okcb, // cancelcb, // } ); }
// Update is called once per frame void SwitchLogin() { UILib.SwitchProcedurePanel("LOGIN"); }