public static ShowMessage ( string message ) : void | ||
message | string | |
Résultat | void |
public override void SynInfo(SynSkillInfo info) { if (info.extraInt1 == 0 && this.unit.isPlayer) { UIMessageBox.ShowMessage("现在不能释放", 1.5f, 0); } }
private void LaunchSkill(Skill skill, Units targetUnits, bool isCrazyMode) { Vector3 vector = Vector3.zero; if (!skill.needTarget) { if (targetUnits != null && !targetUnits.CanBeSelected) { targetUnits = null; } if (targetUnits == this.self) { targetUnits = null; } vector = this.self.mTransform.forward; if (targetUnits != null) { vector = targetUnits.mTransform.position; if (isCrazyMode && Vector3.Distance(vector, this.self.mTransform.position) > skill.distance + 3f) { Vector3 a = vector - this.self.mTransform.position; a.Normalize(); vector = this.self.mTransform.position + a * skill.distance; } } else { vector.Normalize(); if (skill.distance == 0f) { vector = this.self.mTransform.position + vector; } else { vector = this.self.mTransform.position + vector * skill.distance; } if (isCrazyMode && skill.NeedResetTargetPos()) { vector = skill.GetExtraTargetPos(targetUnits, vector, isCrazyMode); } } this.LaunchSkill(skill, targetUnits, vector, isCrazyMode); } else { targetUnits = base.GetSkillTarget(skill, targetUnits, true); targetUnits = skill.ReselectTarget(targetUnits, isCrazyMode); if (targetUnits != null) { this.LaunchSkill(skill, targetUnits, vector, isCrazyMode); } else { UIMessageBox.ShowMessage("未选择目标,不能释放!", 1.5f, 0); } } }
public static void Prompt(string id, string text) { SysPromptVo dataById = BaseDataMgr.instance.GetDataById <SysPromptVo>(id); if (dataById != null) { UIMessageBox.ShowMessage(LanguageManager.Instance.GetStringById(text), dataById.text_time, 0); AudioMgr.PlayUI(dataById.sound, null, false, false); } else { ClientLogger.Error("PromptHelper.Prompt: cannot found #" + id); } }
public void EnqueueSkillCmd(string skillID, Vector3 targetPos, Units targetUnits, bool exeImmediate = true, bool isCrazyMode = true) { if (!this.DoExtraActionFirst(skillID)) { return; } Skill skillOrAttackById = this.self.getSkillOrAttackById(skillID); if (skillOrAttackById.needTarget) { if ((targetUnits == null || !targetUnits.isLive) && skillOrAttackById.IsAttack) { return; } if (targetUnits == null || !targetUnits.isLive) { UIMessageBox.ShowMessage("未选择目标,不能释放!", 1.5f, 0); return; } this.self.SetSelectTarget(targetUnits); PlayerControlMgr.Instance.SetSelectedTarget(targetUnits); } if (Singleton <PvpManager> .Instance.IsInPvp) { this.SendUseSkill(skillID, targetUnits, targetPos, isCrazyMode); NewbieManager.Instance.TryHandleNotifyServerUseSkill(); } else { CmdSkill cmdSkill = new CmdSkill(); this.m_cmdReady = cmdSkill; cmdSkill.skillMainID = skillID; cmdSkill.targetPos = targetPos; cmdSkill.targetUnits = targetUnits; cmdSkill.skill = skillOrAttackById; if (exeImmediate) { this.doCacheCmd(); } } }
public static void PromptFormat(string id, params object[] args) { SysPromptVo dataById = BaseDataMgr.instance.GetDataById <SysPromptVo>(id); if (dataById != null) { try { string mess = string.Format(LanguageManager.Instance.GetStringById(dataById.prompt_text), args); UIMessageBox.ShowMessage(mess, dataById.text_time, 0); } catch (Exception e) { ClientLogger.LogException(e); } AudioMgr.PlayUI(dataById.sound, null, false, false); } else { ClientLogger.Error("PromptHelper.Prompt: cannot found #" + id); } }
private void ShowMsg(string msg) { UIMessageBox.ShowMessage(msg, 1.5f, 0); }