void OnTeamFollow() { Obj_MainPlayer mainPlayer = Singleton <ObjManager> .Instance.MainPlayer; if (mainPlayer == null) { return; } // 没队伍 if (GlobeVar.INVALID_ID == GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID) { return; } if (mainPlayer.IsTeamLeader()) // 队长 { // 组队跟随状态 if (false == mainPlayer.IsInTeamFollow) { mainPlayer.ReqTeamFollow();// 请求跟随 } else { // 解散 mainPlayer.AskLeaveTeamFollow(); } } else// 队员 { // 离开跟随 mainPlayer.AskLeaveTeamFollow(); } }
void OnUnTeamFellow() { Obj_MainPlayer mainPlayer = Singleton <ObjManager> .Instance.MainPlayer; if (mainPlayer != null && mainPlayer.IsInTeamFollow) { mainPlayer.AskLeaveTeamFollow(); } }