本文整理汇总了Java中com.esotericsoftware.kryonet.EndPoint.getKryo方法的典型用法代码示例。如果您正苦于以下问题:Java EndPoint.getKryo方法的具体用法?Java EndPoint.getKryo怎么用?Java EndPoint.getKryo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.esotericsoftware.kryonet.EndPoint
的用法示例。
在下文中一共展示了EndPoint.getKryo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
public static void register(EndPoint endPoint) {
Kryo kryo = endPoint.getKryo();
kryo.register(ConnectPacket.class);
kryo.register(NewUserConnectedLobbyPacket.class);
kryo.register(ErrorPacket.class);
kryo.register(ErrorPacket.ErrorType.class);
kryo.register(EntityMovePacket.class);
kryo.register(EntityPacket.class);
kryo.register(EntityRemovePacket.class);
kryo.register(GotoPosPacket.class);
kryo.register(EntityHpPacket.class);
kryo.register(EntityEffectAddPacket.class);
kryo.register(EntityEffectRemovePacket.class);
kryo.register(TchatMsgPacket.class);
kryo.register(TchatCommandPacket.class);
kryo.register(TchatCommands.class);
kryo.register(ConnectQueuePlace.class);
kryo.register(PlayerSpellPacket.class);
kryo.register(TargetType.class);
kryo.register(PlayerUseSpellPacket.class);
kryo.register(ChangeMapPacket.class);
kryo.register(PlayerSpellUsedPacket.class);
kryo.register(ObjectStats.class);
kryo.register(EntityStats.class);
}
示例2: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
static public void register(EndPoint endPoint) {
Log.set(Log.LEVEL_DEBUG);
Log.setLogger(new Log.Logger());
Kryo kryo = endPoint.getKryo();
kryo.register(deliquescence.network.PacketTitle.class);
kryo.register(java.util.HashMap.class);
kryo.register(java.util.ArrayList.class);
kryo.register(NetworkPacket.class);
kryo.register(NetworkGameSettings.class);
kryo.register(deliquescence.Tile.class);
kryo.register(deliquescence.network.NetworkGame.class);
kryo.register(UUID.class, new UUIDSerializer());
kryo.register(com.esotericsoftware.kryo.util.ObjectMap.class);
kryo.register(deliquescence.Player.class);
kryo.register(deliquescence.Player[].class);
kryo.register(javax.swing.plaf.ColorUIResource.class);
kryo.register(float[].class);
kryo.register(java.net.Inet4Address.class);
kryo.register(double.class);
kryo.register(Object[].class);
kryo.register(java.util.TreeSet.class);
}
示例3: TListener
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
public TListener(EndPoint e)
{
kryo = e.getKryo();
kryo.setRegistrationRequired(true);
kryo.setAsmEnabled(true);
kryo.register(ServerListingState.class);
kryo.register(AuthState.class);
kryo.register(AuthPacketRequest.class);
kryo.register(AuthResponse.class);
kryo.register(AddServerResponse.class);
kryo.register(ServerListing.class);
kryo.register(RegistrationPacketRequest.class);
kryo.register(RegisterResponse.class);
}
示例4: LoginClientListener
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
public LoginClientListener(EndPoint e)
{
kryo = e.getKryo();
kryo.setRegistrationRequired(true);
kryo.setAsmEnabled(true);
kryo.register(ServerListingState.class);
kryo.register(AuthState.class);
kryo.register(AuthPacketRequest.class);
kryo.register(AuthResponse.class);
kryo.register(AddServerResponse.class);
kryo.register(ServerListing.class);
kryo.register(RegistrationPacketRequest.class);
kryo.register(RegisterResponse.class);
// System.out.println("Client Handler have been started!");
}
示例5: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
public static void register(EndPoint endpoint) {
Kryo kryo = endpoint.getKryo();
// This must be called in order to use ObjectSpaces.
// ObjectSpace.registerClasses(kryo);
// The interfaces that will be used as remote objects must be registered.
kryo.register(PlayerMessage.MessageId.class);
kryo.register(SetPlayerNameRequestMessage.class);
kryo.register(SetPlayerNameResponseMessage.class);
kryo.register(FreeCarsMessage.class);
kryo.register(SelectCarRequestMessage.class);
kryo.register(SelectCarResponseMessage.class);
kryo.register(UpdateVelocityMessage.class);
kryo.register(PlayerConnectedMessage.class);
kryo.register(StartGameMessage.class);
kryo.register(PlayerMessage.class);
kryo.register(UpdateGameStateMessage.class);
kryo.register(UpdateCheckPointDirectionMessage.class);
kryo.register(ReconnectRequestMessage.class);
kryo.register(ReconnectRequestResponse.class);
kryo.register(PlayerDisconnectedMessage.class);
kryo.register(byte[].class);
}
示例6: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
public static void register(EndPoint endPoint) {
Kryo kryo = endPoint.getKryo();
kryo.register(RegisterClient.class);
kryo.register(RegisterServer.class);
kryo.register(EntityPacket.class);
kryo.register(EntityPacket.EntityRender.class);
kryo.register(CreateShare.class);
kryo.register(ViewShare.class);
kryo.register(ConfirmSession.class);
}
示例7: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
static public void register(EndPoint endPoint) {
Kryo kryo = endPoint.getKryo();
kryo.register(RegisterNameInfo.class);
kryo.register(String[].class);
kryo.register(MessageInfo.class);
kryo.register(String.class);
kryo.register(PointInfo.class);
kryo.register(PlayerInfo.class);
kryo.register(DisconnectionInfo.class);
kryo.register(TypingInfo.class);
}
示例8: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
public static void register(final EndPoint endPoint) {
final Kryo kryo = endPoint.getKryo();
kryo.setReferences(false);
kryo.register(Ping.class);
kryo.register(Pong.class);
kryo.register(Size.class);
kryo.register(Price.class);
}
示例9: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
static public void register(EndPoint endPoint) {
Kryo kryo = endPoint.getKryo();
kryo.register(String[].class);
kryo.register(SomeRequest.class);
kryo.register(SomeResponse.class);
kryo.register(KeyEvent.class);
kryo.register(EventSequence.class);
kryo.register(Event.class);
kryo.register(ArrayList.class);
kryo.register(ServerGreeting.class);
kryo.register(ServerWindow.class);
kryo.register(Handshake.class);
}
示例10: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
static public void register (EndPoint endPoint) {
Kryo kryo = endPoint.getKryo();
kryo.register(MessageModel.class);
kryo.register(MessageConnect.class);
kryo.register(MessageDisconnect.class);
kryo.register(MessageMove.class);
kryo.register(MessageShoot.class);
kryo.register(MessageSpell.class);
kryo.register(MessageChangeTeam.class);
kryo.register(MessagePlayerDelete.class);
kryo.register(MessagePlayerNew.class);
kryo.register(MessagePlayerObserverDelete.class);
kryo.register(MessagePlayerObserverNew.class);
kryo.register(MessagePlayerUpdateState.class);
kryo.register(MessagePlayerUpdatePosition.class);
kryo.register(MessagePlayerRevive.class);
kryo.register(MessageCollision.class);
kryo.register(MessagePutObstacle.class);
kryo.register(MessageObstacleUpdateState.class);
kryo.register(MessageShotUpdateState.class);
kryo.register(MessageChat.class);
kryo.register(MessageRoundKill.class);
kryo.register(MessageRoundScore.class);
kryo.register(MessageRoundStart.class);
kryo.register(MessageRoundEnd.class);
kryo.register(MessageDeleteObject.class);
kryo.register(EnumGameObject.class);
kryo.register(EnumCollision.class);
// pas utilisé
kryo.register(MessageNeedMap.class);
kryo.register(MessageDownload.class);
kryo.register(ArrayList.class);
}
示例11: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
static public void register (EndPoint endPoint) {
Kryo kryo = endPoint.getKryo();
kryo.register(MessageModel.class);
kryo.register(MessageConnect.class);
kryo.register(MessageDisconnect.class);
kryo.register(MessageMove.class);
kryo.register(MessageShoot.class);
kryo.register(MessageSpell.class);
kryo.register(MessageChangeTeam.class);
kryo.register(MessagePlayerDelete.class);
kryo.register(MessagePlayerNew.class);
kryo.register(MessagePlayerObserverDelete.class);
kryo.register(MessagePlayerObserverNew.class);
kryo.register(MessagePlayerUpdateState.class);
kryo.register(MessagePlayerUpdatePosition.class);
kryo.register(MessagePlayerRevive.class);
kryo.register(MessageCollision.class);
kryo.register(MessagePutObstacle.class);
kryo.register(MessageObstacleUpdateState.class);
kryo.register(MessageShotUpdateState.class);
kryo.register(MessageChat.class);
kryo.register(MessageRoundKill.class);
kryo.register(MessageRoundScore.class);
kryo.register(MessageRoundStart.class);
kryo.register(MessageRoundEnd.class);
kryo.register(MessageDeleteObject.class);
kryo.register(EnumGameObject.class);
kryo.register(EnumCollision.class);
}
示例12: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
public static void register(EndPoint endPoint) {
Kryo kryo = endPoint.getKryo();
kryo.register(ConnectPacket.class);
kryo.register(NewUserConnectedLobbyPacket.class);
kryo.register(TchatPrivmsgPacket.class);
kryo.register(ErrorPacket.class);
kryo.register(ErrorPacket.ErrorType.class);
// Game lobby packets
kryo.register(GameLobbyJoin.class);
kryo.register(CreateGamePacket.class);
kryo.register(GameLobbyNumberPacket.class);
kryo.register(GameLobbyPacket.class);
}
示例13: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
/**
* Enregistre les classes qui seront transmises via le réseau.
*
* @param endPoint
* Objet utilisé pour l'enregistrement des classes.
*/
static public void register (EndPoint endPoint)
{ Kryo kryo = endPoint.getKryo();
kryo.register(Integer.class);
kryo.register(Integer[].class);
kryo.register(int[].class);
kryo.register(float[].class);
kryo.register(String.class);
kryo.register(Profile.class);
kryo.register(Profile[].class);
kryo.register(UpdateInterface.class);
kryo.register(Round.class);
kryo.register(Player.class);
kryo.register(Player[].class);
kryo.register(Board.class);
kryo.register(PhysBoard.class);
kryo.register(PhysItemInstance.class);
kryo.register(LinkedList.class);
kryo.register(ArrayList.class);
kryo.register(Snake[].class);
kryo.register(ItemInstance.class);
kryo.register(ItemInstance[].class);
kryo.register(ItemType.class);
kryo.register(PhysSnake.class);
kryo.register(TreeSet.class);
kryo.register(Position.class);
kryo.register(State.class);
kryo.register(SmallUpdate.class);
kryo.register(boolean[].class);
kryo.register(boolean.class);
}
示例14: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
public static void register(EndPoint endPoint) {
Kryo kryo = endPoint.getKryo();
kryo.register(Login.class);
kryo.register(ConnectionEstablished.class);
kryo.register(RegistrationRequired.class);
kryo.register(Register.class);
kryo.register(AddCharacter.class);
kryo.register(UpdateCharacter.class);
kryo.register(RemoveCharacter.class);
kryo.register(KingdomCharacter.class);
kryo.register(ChatMessage.class);
kryo.register(ProjectileMessage.class);
}
示例15: register
import com.esotericsoftware.kryonet.EndPoint; //导入方法依赖的package包/类
static public void register (EndPoint endPoint) {
Kryo kryo = endPoint.getKryo();
kryo.register(Login.class);
kryo.register(RegistrationRequired.class);
kryo.register(Register.class);
kryo.register(AddCharacter.class);
kryo.register(UpdateCharacter.class);
kryo.register(RemoveCharacter.class);
kryo.register(Character.class);
kryo.register(MoveCharacter.class);
}