| | |
| | | case RichTextEventEnum.MOVENPC:
|
| | | {
|
| | | int id = int.Parse(href.mSplits["movenpc"]);
|
| | | var movetype = 2;
|
| | | if (href.mSplits.ContainsKey("movetype"))
|
| | | {
|
| | | movetype = int.Parse(href.mSplits["movetype"]);
|
| | | }
|
| | | var error = 0;
|
| | | if (!TestMoveNpc(id, out error))
|
| | | {
|
| | |
| | | if (hero != null)
|
| | | {
|
| | | PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
|
| | | SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(id));
|
| | | SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(id, movetype));
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(new Vector3(m_Posx / 2, 0, m_Posy / 2)));
|
| | | }
|
| | |
|
| | | private IEnumerator WaitForSkillFinished(int id)
|
| | | private IEnumerator WaitForSkillFinished(int id, int movetype)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | |
|
| | |
| | | yield break;
|
| | | }
|
| | |
|
| | | MapTransferUtility.Instance.MoveToNPC(id);
|
| | | MapTransferUtility.Instance.MoveToNPC(id, 0, movetype == 1);
|
| | | }
|
| | |
|
| | | private IEnumerator WaitForSkillFinished(Vector3 pos)
|