vectozavr-shooter/network/ShooterMsgType.cpp

16 lines
356 B
C++
Raw Permalink Normal View History

2021-10-28 16:58:02 +03:00
//
// Created by Иван Ильин on 27.10.2021.
//
#include "ShooterMsgType.h"
2021-10-31 11:39:08 +03:00
sf::Packet &operator<<(sf::Packet &packet, ShooterMsgType type) {
return packet << (sf::Uint16) type;
2021-10-28 16:58:02 +03:00
}
2021-10-31 11:39:08 +03:00
sf::Packet &operator>>(sf::Packet &packet, ShooterMsgType &type) {
2021-10-28 16:58:02 +03:00
sf::Uint16 temp;
packet >> temp;
2021-10-31 11:39:08 +03:00
type = (ShooterMsgType) temp;
2021-10-28 16:58:02 +03:00
return packet;
}