예제 #1
0
        public async Task PlayerSendMsg(IUserGrain user, string msg)
        {
            S2C100008 content = new S2C100008();

            content.UserId  = user.GetPrimaryKeyLong();
            content.Content = msg;
            MOMsg notify = new MOMsg();

            notify.ActionId = 100008;
            notify.Content  = content.ToByteString();
            await RoomNotify(notify);
        }
예제 #2
0
        public void Handle(object sender, Packet packet)
        {
            S2C100008 rep = S2C100008.Parser.ParseFrom(((MOPacket)packet).Packet.Content);

            if (rep.UserId == GameUser.Instance.UserId)
            {
                return;
            }

            PlayerData playerData;

            if (GameUser.Instance.Players.TryGetValue(rep.UserId, out playerData))
            {
                //GameEntry.Entity.ShowEntity<PlayerChatEntity>(
                //    GameEntry.Entity.GenerateSerialId(),
                //    "Assets/GameMain/Entities/PlayerChatMsg.prefab",
                //    "DefaultEntityGroup", new MsgUserData(playerData.UserName, rep.Content));
            }
        }