Esempio n. 1
0
        public static object[] BuildDeathPayload(Cycle cycle)
        {
            var payload = new DeathPayload
            {
                ID     = cycle.ID,
                DiedAt = cycle.MovementController.Position,
            };

            return(_compressor.Compress(payload));
        }
Esempio n. 2
0
        public static object[] BuildDeathPayload(Cycle cycle)
        {
            var payload = new DeathPayload
            {
                ID = cycle.ID,
                DiedAt = cycle.MovementController.Position,
            };

            return _compressor.Compress(payload);
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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);
        }