You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
1.2 KiB

using System.Collections.Generic;
using System.Runtime.Remoting.Messaging;
using Entitas;
using Entitas.CodeGeneration.Attributes;
namespace CoreGame.Render
{
public struct SvrCmd
{
public int cmdType;
public int frame;
public int eid;
public IMessage msg;
public static void CreateCommand(ClientEvent type, out SvrCmd battleCommand, in IMessage msg)
{
battleCommand = default;
battleCommand.eid = BattleModule.s_LocalPlayerEid;
battleCommand.cmdType = (int)type;
battleCommand.msg = msg;
}
public void Reset()
{
}
}
[Unique, Combat]
public class CmdRecvComponent : IComponent
{
// public Queue<ClientCmd> renderCmds; // render -> logic 指令
public Queue<SvrCmd> netCmds; // net -> logic 指令
public CombatEntity ent;
// // 渲染层的指令
// public void PushRenderCmd(in ClientCmd cmd)
// {
// if (renderCmds.Count == 0)
// {
// ent.ReplaceComponent(CombatComponentsLookup.CmdRecv, this);
// }
// renderCmds.Enqueue(cmd);
// }
}
}