コード例 #1
0
 public PrimitiveEntityUpdatePacketOut(PrimitiveEntity pe)
 {
     UsageType = NetUsageType.ENTITIES;
     ID = ServerToClientPacket.PRIMITIVE_ENTITY_UPDATE;
     Data = new byte[24 + 24 + 16 + 24 + 8];
     pe.GetPosition().ToDoubleBytes().CopyTo(Data, 0);
     pe.GetVelocity().ToDoubleBytes().CopyTo(Data, 24);
     Utilities.QuaternionToBytes(pe.Angles).CopyTo(Data, 24 + 24);
     pe.Gravity.ToDoubleBytes().CopyTo(Data, 24 + 24 + 16);
     Utilities.LongToBytes(pe.EID).CopyTo(Data, 24 + 24 + 16 + 24);
 }
コード例 #2
0
 public PrimitiveEntityTag(PrimitiveEntity ent)
 {
     Internal = ent;
 }