|
|
@@ -100,14 +100,18 @@ public class UserPlayer : JCEntity
|
|
|
string pkTypeName = pkTypeNames[roomType];
|
|
|
string tip = $"好友邀请你参加{pkTypeName}PK";
|
|
|
System.Action cb = delegate() {
|
|
|
- if (SceneManager.GetActiveScene().name == "Home") {
|
|
|
+ if (!PKMatchingView.ins && SceneManager.GetActiveScene().name == "Home") {
|
|
|
PKMatchingView view = PKMatchingView.Create();
|
|
|
view.isFriendPKInvitee = true;
|
|
|
view.targetJoinRoomID = roomID;
|
|
|
GlobalData.pkMatchType = PKMatchType.OnlinePK;
|
|
|
GlobalData.matchRoomType = roomType;
|
|
|
+ } else if (PKMatchingView.ins) {
|
|
|
+ PopupMgr.ins.ShowTip("当前正处于匹配状态,无法接受好友PK邀请!");
|
|
|
}
|
|
|
};
|
|
|
- PopupMgr.ins.ShowPKInviteNotice(avatarID, nickname, tip, cb);
|
|
|
+ if (!PKMatchingView.ins && SceneManager.GetActiveScene().name == "Home") {
|
|
|
+ PopupMgr.ins.ShowPKInviteNotice(avatarID, nickname, tip, cb);
|
|
|
+ }
|
|
|
}
|
|
|
}
|