| | |
| | | [SerializeField] Button m_AddFriend; |
| | | [SerializeField] Button m_SetCaptainer; |
| | | [SerializeField] Button m_AddFairy; |
| | | [SerializeField] Button m_Chat; |
| | | |
| | | int playerId = 0; |
| | | public event Action<bool> activeOrDeActiveEvent; |
| | |
| | | this.gameObject.SetActive(false); |
| | | } |
| | | |
| | | private void Chat() |
| | | { |
| | | Teammate mate; |
| | | if (model.myTeam.TryGetMemberByPlayerId(playerId, out mate)) |
| | | { |
| | | if (mate.online) |
| | | { |
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Friend)) |
| | | { |
| | | FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.Friend); |
| | | } |
| | | else |
| | | { |
| | | var playerId = (uint)mate.id; |
| | | var playerName = mate.mateName; |
| | | var job = (byte)mate.job; |
| | | var playerLv = (ushort)mate.level; |
| | | var realmLv = (ushort)mate.realm; |
| | | var onLine = mate.online; |
| | | |
| | | friendsModel.SetPlayerShortInfo(playerId, playerName, job, playerLv, realmLv, (byte)(onLine ? 1 : 0), true); |
| | | |
| | | WindowCenter.Instance.Close<TeamFrameWin>(); |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("Friend_OffLine"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void Awake() |
| | | { |
| | | m_ViewBaseInfo.AddListener(ViewBaseInfo); |
| | | m_AddFriend.AddListener(AddFriend); |
| | | m_SetCaptainer.AddListener(SetCaptainer); |
| | | m_AddFairy.AddListener(FairyInvite); |
| | | m_Chat.AddListener(Chat); |
| | | } |
| | | |
| | | private void OnEnable() |