当前位置: 首页>>代码示例>>Java>>正文


Java EndPoint.getKryo方法代码示例

本文整理汇总了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);
}
 
开发者ID:AlexMog,项目名称:MMO-Rulemasters-World,代码行数:26,代码来源:Network.java

示例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);
}
 
开发者ID:Deliquescence,项目名称:ChainReactionClone,代码行数:25,代码来源:Networking.java

示例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);

    
}
 
开发者ID:MosaicOwl,项目名称:the-erder,代码行数:20,代码来源:TListener.java

示例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!");
}
 
开发者ID:MosaicOwl,项目名称:the-erder,代码行数:20,代码来源:LoginClientListener.java

示例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);
}
 
开发者ID:lumannnn,项目名称:AudioRacer,代码行数:25,代码来源:PlayerNetwork.java

示例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);
}
 
开发者ID:justinmarentette11,项目名称:Tower-Defense-Galaxy,代码行数:11,代码来源:Networking.java

示例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);
}
 
开发者ID:Pheelbert,项目名称:chatterino,代码行数:12,代码来源:NetworkShared.java

示例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);
}
 
开发者ID:benalexau,项目名称:rpc-bench,代码行数:9,代码来源:Network.java

示例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);
}
 
开发者ID:ratmole,项目名称:Mach3Pendant,代码行数:14,代码来源:Network.java

示例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);
}
 
开发者ID:LeNiglo,项目名称:TinyTank,代码行数:37,代码来源:NetworkRegister.java

示例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);
}
 
开发者ID:LeNiglo,项目名称:TinyTank,代码行数:31,代码来源:NetworkRegister.java

示例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);
}
 
开发者ID:AlexMog,项目名称:MMO-Rulemasters-World,代码行数:14,代码来源:HubNetwork.java

示例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);
}
 
开发者ID:CeriAvignon,项目名称:Projet2015,代码行数:38,代码来源:ClassRegisterer.java

示例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);
}
 
开发者ID:Sim00n,项目名称:kingdom,代码行数:14,代码来源:KingdomNetwork.java

示例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);
}
 
开发者ID:Sim00n,项目名称:kingdom,代码行数:12,代码来源:Network.java


注:本文中的com.esotericsoftware.kryonet.EndPoint.getKryo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。