public void Submit() { string accountText = account.text.Trim(); if (string.IsNullOrEmpty(accountText) || accountText.Length < 6) { CAlertDialog.Show("账号长度不够"); return; } string passwordText = password.text.Trim(); if (string.IsNullOrEmpty(passwordText) || passwordText.Length < 8) { CAlertDialog.Show("密码长度不够"); return; } string passwordCheckText = passwordCheck.text.Trim(); if (passwordText != passwordCheckText) { CAlertDialog.Show("两次密码不一致"); return; } string nameText = nameInput.text.Trim(); if (string.IsNullOrEmpty(nameText) || nameText.Length < 2) { CAlertDialog.Show("名字长度不够"); return; } this.StartCoroutine(ToSubmit(accountText, passwordText, nameText)); }
public void SkillLevelUp(int id) { App.Model.MSkill mSkill = System.Array.Find(character.Skills, s => s.Id == id); if (Global.SUser.self.Silver < mSkill.Master.price) { CAlertDialog.Show("银两不够"); return; } StartCoroutine(SkillLevelUpRun(id, mSkill)); }
public void ClickSkillNode(int index) { MCharacter mCharacter = cBattlefield.charactersManager.GetCharacter(index); if (mCharacter == null || !cBattlefield.charactersManager.IsInSkillDistance(mCharacter, this.mCharacter)) { CharacterReturnNone(); return; } bool sameBelong = cBattlefield.charactersManager.IsSameBelong(mCharacter.Belong, this.mCharacter.Belong); bool useToEnemy = this.mCharacter.CurrentSkill.UseToEnemy; if (!(useToEnemy ^ sameBelong)) { CAlertDialog.Show("belong不对"); return; } this.mCharacter.Target = mCharacter; mCharacter.Target = this.mCharacter; //attackCharacterList.Clear(); if (useToEnemy) { bool forceFirst = (mCharacter.CurrentSkill != null && mCharacter.CurrentSkill.Master.effect.special == App.Model.Master.SkillEffectSpecial.force_first); if (forceFirst && cBattlefield.charactersManager.IsInSkillDistance(this.mCharacter, mCharacter)) { //先手攻击 SetActionCharacterList(mCharacter, this.mCharacter, true); } else { SetActionCharacterList(this.mCharacter, mCharacter, true); } } else { SetActionCharacterList(this.mCharacter, mCharacter, false); } cBattlefield.tilesManager.ClearCurrentTiles(); cBattlefield.CloseOperatingMenu(); cBattlefield.HideBattleCharacterPreviewDialog(); cBattlefield.battleMode = CBattlefield.BattleMode.actioning; cBattlefield.ActionEndHandler += OnActionComplete; OnActionComplete(); }
public void OnClickGacha() { if (labelFree == null || !labelFree.gameObject.activeSelf) { if (gachaPrice.price_type == App.Model.PriceType.gold && Global.SUser.self.Gold < gachaPrice.price) { CAlertDialog.Show("元宝不够"); return; } else if (gachaPrice.price_type == App.Model.PriceType.silver && Global.SUser.self.Silver < gachaPrice.price) { CAlertDialog.Show("银两不够"); return; } } VGachaChild gachaChild = this.GetComponentInParent <VGachaChild>(); gachaChild.OnClickGacha(gachaPrice.child_id, gachaPrice.cnt, labelFree != null && labelFree.gameObject.activeSelf); }
public void ItemRelive() { CAlertDialog.Show("待开发"); }
public void GoldRelive() { CAlertDialog.Show("待开发"); }