Compare commits

..

No commits in common. "feb5158ffe0ef648e020279c7866b95708d16a59" and "f923d141005d3a0f7801e5441b480d4c193d7d09" have entirely different histories.

5 changed files with 2 additions and 33 deletions

View File

@ -43,8 +43,6 @@ namespace AxibugEmuOnline.Client.ClientCore
#endif
public static void Init(Initer initer, bool isTest = false, string testSrvIP = "")
{
PlayerPrefs.DeleteAll();
settings = new AppSettings();
log = new LogManager();

View File

@ -3,18 +3,6 @@
public enum EEvent
{
// 添加你自己需要的事件类型
/// <summary>
/// 登录成功
/// </summary>
OnLoginSucceed,
/// <summary>
/// 登录失败
/// </summary>
OnLoginFailed,
OnChatMsg,
//自己的信息更新(比如改名更新)

View File

@ -1,6 +1,5 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.Common;
using AxibugEmuOnline.Client.Event;
using AxibugEmuOnline.Client.Network;
using AxibugProtobuf;
using System;
@ -51,21 +50,15 @@ namespace AxibugEmuOnline.Client.Manager
{
App.log.Info("登录成功");
App.user.InitMainUserData(App.user.userdata.Account, msg.UID);
OverlayManager.PopTip("登录成功");
App.log.Info("获取Room列表");
App.roomMgr.SendGetRoomList();
App.log.Info("获取在线玩家列表");
App.user.Send_GetUserList();
Eventer.Instance.PostEvent(EEvent.OnLoginSucceed);
}
else
{
App.log.Info("登录失败");
OverlayManager.PopTip("登录失败");
Eventer.Instance.PostEvent(EEvent.OnLoginFailed);
App.log.Info("登录失败");
}
#if UNITY_EDITOR
//TestCreate();

View File

@ -295,10 +295,7 @@ namespace AxibugEmuOnline.Client.Manager
Protobuf_Room_Join_RESP msg = ProtoBufHelper.DeSerizlize<Protobuf_Room_Join_RESP>(reqData);
mineRoomMiniInfo = msg.RoomMiniInfo;
InitRePlay();
{
OverlayManager.PopTip($"已进入[{msg.RoomMiniInfo.GetHostNickName()}]的房间");
Eventer.Instance.PostEvent(EEvent.OnMineJoinRoom);
}
Eventer.Instance.PostEvent(EEvent.OnMineJoinRoom);
}
/// <summary>
@ -325,7 +322,6 @@ namespace AxibugEmuOnline.Client.Manager
ReleaseRePlay();
mineRoomMiniInfo = null;
Eventer.Instance.PostEvent(EEvent.OnMineLeavnRoom);
OverlayManager.PopTip($"已经离开房间");
}
void RecvRoomMyRoomStateChange(byte[] reqData)
@ -345,10 +341,7 @@ namespace AxibugEmuOnline.Client.Manager
{
Eventer.Instance.PostEvent(EEvent.OnOtherPlayerLeavnRoom, i, OldPlayer);
if (NewPlayer > 0)//而且害换了一个玩家
{
Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);
OverlayManager.PopTip($"其他人进入了房间");
}
}
else //之前没人
Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);

View File

@ -163,10 +163,7 @@ namespace AxibugEmuOnline.Client.Manager
Protobuf_UserJoin_RESP msg = ProtoBufHelper.DeSerizlize<Protobuf_UserJoin_RESP>(reqData);
UpdateOrAddUser(msg.UserInfo, out bool isNewUser);
if (isNewUser)
{
Eventer.Instance.PostEvent(EEvent.OnUserLogin, msg.UserInfo.UID, msg.UserInfo.NickName);
OverlayManager.PopTip($"玩家[{msg.UserInfo.NickName}]上线了");
}
}
public void RecvGetUserLeave(byte[] reqData)