public override void OnConnected(Network.IConnection connection) { Context.Time.Start(); connection.Player = Player = Context.CreatePlayer(0, connection); log.Info("Connected"); if (OnClientConnected != null) { OnClientConnected(this); } }
public override void OnConnected(Network.IConnection connection) { Assert.NotNull(connection, "connection"); ushort playerId; if (playerIdPool.Acquire(out playerId)) { log.Info("Connected {0}", Context.CreatePlayer(playerId, connection)); } else { connection.Disconnect(); } }