public static object[] BuildDeathPayload(Cycle cycle) { var payload = new DeathPayload { ID = cycle.ID, DiedAt = cycle.MovementController.Position, }; return(_compressor.Compress(payload)); }
public static object[] BuildDeathPayload(Cycle cycle) { var payload = new DeathPayload { ID = cycle.ID, DiedAt = cycle.MovementController.Position, }; return _compressor.Compress(payload); }
public object[] Compress(DeathPayload payload) { object[] result = new object[4]; result[_deathPayloadCompressionContract.ID] = payload.ID; result[_deathPayloadCompressionContract.DiedAt_X] = Math.Round(payload.DiedAt.x, 2); result[_deathPayloadCompressionContract.DiedAt_Y] = Math.Round(payload.DiedAt.y, 2); result[_deathPayloadCompressionContract.DiedAt_Z] = Math.Round(payload.DiedAt.z, 2); return result; }
public object[] Compress(DeathPayload payload) { object[] result = new object[4]; result[_deathPayloadCompressionContract.ID] = payload.ID; result[_deathPayloadCompressionContract.DiedAt_X] = Math.Round(payload.DiedAt.x, 2); result[_deathPayloadCompressionContract.DiedAt_Y] = Math.Round(payload.DiedAt.y, 2); result[_deathPayloadCompressionContract.DiedAt_Z] = Math.Round(payload.DiedAt.z, 2); return(result); }