private void FollowPlayer(EventArgs args) { if (m_step == 0) { for (int _i = 0; _i < m_followList.Count; ++_i) { Follower _follower = m_followList[_i].GetComponent <Follower>(); int _row = _follower.Pos.m_row; int _col = _follower.Pos.m_col; _follower.SetPosition(_row + 2, _col + 1); } IntEventArgs _args = new IntEventArgs(m_step); long _id = TimerManager.StartTimer(500, false, _args, DelayExecuteEnemies, 0); m_timerIdList.Add(_id); ++m_step; } else if (m_step == 1) { for (int _i = 0; _i < m_followList.Count; ++_i) { Follower _follower = m_followList[_i].GetComponent <Follower>(); int _row = _follower.Pos.m_row; int _col = _follower.Pos.m_col; _follower.SetPosition(_row + 2, _col); } IntEventArgs _args = new IntEventArgs(m_step); long _id = TimerManager.StartTimer(500, false, _args, DelayExecuteEnemies, 0); m_timerIdList.Add(_id); ++m_step; } else if (m_step == 2) { for (int _i = 0; _i < m_followList.Count; ++_i) { Follower _follower = m_followList[_i].GetComponent <Follower>(); int _row = _follower.Pos.m_row; int _col = _follower.Pos.m_col; _follower.SetPosition(_row + 2, _col - 2); } IntEventArgs _args = new IntEventArgs(m_step); long _id = TimerManager.StartTimer(500, false, _args, DelayExecuteEnemies, 0); m_timerIdList.Add(_id); ++m_step; MissionList.Instance.m_mission1_2 = true; MissionList.Instance.m_mission1_3 = true; } else if (m_step == 3) { for (int _i = 0; _i < m_followList.Count; ++_i) { Follower _follower = m_followList[_i].GetComponent <Follower>(); int _row = _follower.Pos.m_row; int _col = _follower.Pos.m_col; _follower.SetPosition(_row + 2, _col + 2); } ++m_step; } }
private void FollowPlayer(EventArgs args) { if (m_step == 0) { for (int _i = 0; _i < m_followList.Count; ++_i) { Follower _follower = m_followList[_i].GetComponent <Follower>(); int _row = _follower.Pos.m_row; int _col = _follower.Pos.m_col; _follower.SetPosition(_row + 2, _col + 1); } IntEventArgs _args = new IntEventArgs(m_step); long _id = TimerManager.StartTimer(1500, false, _args, DelayExecuteEnemies, 0); m_timerIdList.Add(_id); ++m_step; } else if (m_step == 1) { for (int _i = 0; _i < m_followList.Count; ++_i) { Follower _follower = m_followList[_i].GetComponent <Follower>(); int _row = _follower.Pos.m_row; int _col = _follower.Pos.m_col; _follower.SetPosition(_row + 2, _col); } IntEventArgs _args = new IntEventArgs(m_step); long _id = TimerManager.StartTimer(1500, false, _args, DelayExecuteEnemies, 0); m_timerIdList.Add(_id); ++m_step; } else if (m_step == 2) { for (int _i = 0; _i < m_followList.Count; ++_i) { Follower _follower = m_followList[_i].GetComponent <Follower>(); int _row = _follower.Pos.m_row; int _col = _follower.Pos.m_col; _follower.SetPosition(_row + 2, _col - 2); } IntEventArgs _args = new IntEventArgs(m_step); long _id = TimerManager.StartTimer(1500, false, _args, DelayDestroyXiangFollow, 0); m_timerIdList.Add(_id); ++m_step; } //else if(m_step == 3) //{ // for (int _i = 0; _i < m_followList.Count; ++_i) // { // Follower _follower = m_followList[_i].GetComponent<Follower>(); // int _row = _follower.Pos.m_row; // int _col = _follower.Pos.m_col; // _follower.SetPosition(_row + 2, _col + 2); // } // ++m_step; //} }
private void LoadRookieMa() { for (int _i = 0; _i < m_maPosList.Length; ++_i) { GameObject _rookieMa = (GameObject)GameManager.ResManager.LoadPrefabSync(PlayerPrefabPath, "woHorse", typeof(GameObject)); _rookieMa.transform.SetParent(GameManager.GameManagerObj.GetComponent <GameManager>().SceneLayer); Follower _follower = _rookieMa.GetComponent <Follower>(); _follower.SetType(FollowerType.MA); _follower.SetPosition(m_maPosList[_i].m_row, m_maPosList[_i].m_col); m_followList.Add(_rookieMa); } }
private void DelayLoadRookieXiang(EventArgs args) { for (int _i = 0; _i < m_xiangPosList.Length; ++_i) { GameObject _rookieXiang = (GameObject)GameManager.ResManager.LoadPrefabSync(PlayerPrefabPath, "woXiang", typeof(GameObject)); _rookieXiang.transform.SetParent(GameManager.GameManagerObj.GetComponent <GameManager>().SceneLayer); Follower _follower = _rookieXiang.GetComponent <Follower>(); _follower.SetType(FollowerType.XIANG); _follower.SetPosition(m_xiangPosList[_i].m_row, m_xiangPosList[_i].m_col); m_followList.Add(_rookieXiang); } long _id = TimerManager.StartTimer(1000, false, null, DelayActiveXiangBtn, 0); m_timerIdList.Add(_id); }