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

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

            return _compressor.Compress(payload);
        }
示例#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;
        }
示例#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);
        }