This commit is contained in:
liuliang 2024-12-28 14:30:15 +08:00
commit 5dcc934ab2
2 changed files with 47 additions and 1 deletions

View File

@ -488,7 +488,25 @@ public class test : MonoBehaviour
wEBScriptListener.SendMessageByte(sendData);
}
//推送玩家信息
public void ThatUser(PlayerJoinResponse player)
{
PlayerJoinResponse data = new PlayerJoinResponse();
data = player;
WSMessage msg = new WSMessage();
msg.Module = "select";
msg.ServiceName = "GetSelectHistoryList";
msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data));
byte[] sendData = ProtoBufffer.Serialize(msg);
WSMessage deinfo = ProtoBufffer.DeSerialize<WSMessage>(sendData);
PlayerJoinResponse login = ProtoBufffer.DeSerialize<PlayerJoinResponse>(deinfo.Data.ToByteArray());
Debug.Log("==========消息转发函数调用");
//BroadcastFrameMsg.FramesFieldNumber
wEBScriptListener.SendMessageByte(sendData);
}
public void TriggerNpcArrive()
{
MoveRoomAoiRequest data = new MoveRoomAoiRequest();

View File

@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
@ -6,6 +7,32 @@ using UnityEngine;
public class PlayerState : MonoBehaviour
{
PlayerJoinResponse playerJoinResponse;
string UserName;// 用户名
string RoomId;// 房间Id
int Status;//扶态日特加入 1进行中 2已结束
string RoleName;// 角色名
int IsLeadingNPC;//1=此职业有分管NPC的功
bool Online;// 判断是否在线 true 在线 false 离线
int RoleId =7;// 角色id
int GroupLeader = 8;// 是否是组长 0 组员 1 组长 2 总指挥 3 主持人
int ActionHode;//0=主持人1=指令式行动2=自由行动
int Group =10;//小组归属 -1 无归属 有值有归属
double X = 11;// 坚标X
double Y = 12;// 坚标Y
double Z = 13;// 坚标Z
string OverseeCond;// 分管区域ID
int SendFraneCount=15;//玩家发送的帧数
int HovespeedFirst;//移动速度1
int Movespeedsecond = 17;//移动速度2
int MoveSpeedThird = 18;//移动速度3
int BearLoad = 19;// 负重
int Protection = 20;//防护值
int Health = 100;//健康值 100
int Rolestatus = 22;//角色扶态 0正常 1行动受限 2负伤 3昏速 4手变伤
int UserId = 23;// 用户id
[Header("鯤소悧沂좆")]
public float totalHp = 100;
[Header("鯤소뎠품沂좆")]
@ -17,6 +44,7 @@ public class PlayerState : MonoBehaviour
// Start is called before the first frame update
void Start()
{
currentHp = totalHp;
}