public void Write(InputBasic2d from, Sent sent) { sent.WriteFloat(from.Vertical); sent.WriteFloat(from.Horizontal); sent.WriteFloat(from.Rotation); sent.WriteByte(from.Inputs); }
public void PackDelta(Sent sent, NentBasic2d obj, PackInfoBasic2d packinfo) { sent.WriteByte(packinfo.DeltaFlag); if ((packinfo.DeltaFlag & DELTA_FLAG_X) != 0) { sent.WriteFloat(obj.X); } if ((packinfo.DeltaFlag & DELTA_FLAG_Y) != 0) { sent.WriteFloat(obj.Y); } if ((packinfo.DeltaFlag & DELTA_FLAG_ROT) != 0) { sent.WriteFloat(obj.Rot); } if ((packinfo.DeltaFlag & DELTA_FLAG_XVEL) != 0) { sent.WriteFloat(obj.XVel); } if ((packinfo.DeltaFlag & DELTA_FLAG_YVEL) != 0) { sent.WriteFloat(obj.YVel); } if ((packinfo.DeltaFlag & DELTA_FLAG_FREE1) != 0) { sent.WriteFloat(obj.Free1); } }
public void PackFull(Sent sent, NentBasic2d obj, NentStaticBasic2d stat, PackInfoBasic2d packinfo) { sent.WriteByte(stat.Id1); sent.WriteUShort(stat.Id2); sent.WriteFloat(obj.X); sent.WriteFloat(obj.Y); sent.WriteFloat(obj.Rot); sent.WriteFloat(obj.XVel); sent.WriteFloat(obj.YVel); sent.WriteFloat(obj.Free1); }