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 #endif
public static void Init(Initer initer, bool isTest = false, string testSrvIP = "") public static void Init(Initer initer, bool isTest = false, string testSrvIP = "")
{ {
PlayerPrefs.DeleteAll();
settings = new AppSettings(); settings = new AppSettings();
log = new LogManager(); log = new LogManager();

View File

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

View File

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

View File

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