コード例 #1
0
    void Send(int n)
    {
        var fbb = new FlatBufferBuilder(1);

        fbb.Finish(SendMeStat.CreateSendMeStat(fbb, Class.SendMeStat, Class.MonsterStat, 1).Value);
        TCPClient.Instance.Send(fbb.SizedByteArray());
    }
コード例 #2
0
 public static void Send(int PlayerID)
 {
     NetworkSendManager.instance.actions.Enqueue(() =>
     {
         var fbb = new FlatBufferBuilder(1);
         fbb.Finish(SendMeStat.CreateSendMeStat(fbb, Class.SendMeStat, Class.MonsterStat, PlayerID).Value);
         TCPClient.Instance.Send(fbb.SizedByteArray());
     });
 }
コード例 #3
0
 public static Offset <SendMeStat> CreateSendMeStat(FlatBufferBuilder builder,
                                                    Class cType        = Class.Base,
                                                    Class StatDataType = Class.Base,
                                                    int ID             = 0)
 {
     builder.StartObject(3);
     SendMeStat.AddID(builder, ID);
     SendMeStat.AddStatDataType(builder, StatDataType);
     SendMeStat.AddCType(builder, cType);
     return(SendMeStat.EndSendMeStat(builder));
 }
コード例 #4
0
 public static SendMeStat GetRootAsSendMeStat(ByteBuffer _bb, SendMeStat obj)
 {
     return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }