public string[] toStringArray() { string[] info = { Health.ToString(), Armor.ToString(), Strength.ToString(), Dexterity.ToString(), Mana.ToString(), Level.ToString(), EXP.ToString(), Name, Race, ClassName }; return(info); }
/// <summary> /// 加载产品 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void btnLoadProduct_Click(object sender, EventArgs e) { string Errstring = ""; if (lbxProductCategory.SelectedIndex == -1) { return; } btnLoadProduct.Enabled = false; string pdt = null; pdt = lbxProductCategory.SelectedValue.ToString(); btnLoadProduct.Enabled = true; Form_Wait.ShowForm(); await Task.Run(new Action(() => { try { //需要加载当前产品相关的参数 _operation = JFHubCenter.Instance.RecipeManager.GetRecipe("Product", pdt) as JFDLAFProductRecipe; if (_operation == null) { HTUi.TipError("Recipe Manager中不存在配方:" + pdt); return; } if (Errstring == "") { HTLog.Info("加载产品完成."); HTUi.TipHint("加载产品完成"); if (_operation.MgzIdx == -1) { HTLog.Error("注意:当前产品未选择料盒型号,开始流程需要选择料盒型号."); } } else { HTLog.Error("加载产品失败!!!" + Errstring); HTUi.TipError("加载产品失败"); HTUi.PopWarn("产品加载失败\n" + Errstring); } } catch (Exception EXP) { HTLog.Error(String.Format("{0}加载新产品失败\n", EXP.ToString())); HTUi.TipError("加载新产品失败"); } })); if (_operation != null) { SetupUI(); } JFHubCenter.Instance.SystemCfg.SetItemValue("CurrentID", pdt); JFHubCenter.Instance.SystemCfg.Save(); Form_Wait.CloseForm(); }
/// <summary> /// You died! /// </summary> public override void Die() { // add experience to the current level. BF_GameManager.instance.DeltaCurrentExp(EXP); // minus monster count. --BF_GameManager.instance.MOB_CURRENT_IN_SCENE; JCS_UtilitiesManager jcsUm = JCS_UtilitiesManager.instance; if (jcsUm.GetIGLogSystem() != null) { string expMsg = BF_MessageSettings.instance.EXP_BASE + EXP.ToString(); jcsUm.GetIGLogSystem().SendLogMessage(expMsg); } base.Die(); }
public void SaveData()//حفظ الداتا { try { StreamWriter SW = new StreamWriter("Data"); SW.Write(size + ";"); SW.Write(PenCase + ";"); SW.Write(Case + ";"); SW.Write(color.R + ";"); SW.Write(color.G + ";"); SW.Write(color.B + ";"); SW.Write(color2.R + ";"); SW.Write(color2.G + ";"); SW.Write(color2.B); SW.Close(); } catch (Exception EXP) { MessageBox.Show(EXP.ToString()); } }