public JoinIglooSequence(ClubPenguinClient client, ZoneId igloo, string language, IJoinIglooErrorHandler errorHandler) { clubPenguinClient = client; iglooToJoin = igloo; this.language = language; this.errorHandler = errorHandler; }
private static bool onPostRoomPlayersErrorMapper(NetworkErrorType errorType, IJoinIglooErrorHandler handler) { switch (errorType) { case NetworkErrorType.CP_ROOM_FULL: handler.onRoomFull(); return(true); case NetworkErrorType.CP_NO_SERVER_FOUND: handler.onNoServerFound(); return(true); case NetworkErrorType.CP_IGLOO_WRONG_ROOM: handler.onRoomChanged(); return(true); case NetworkErrorType.CP_IGLOO_UNAVAILABLE: handler.onIglooNotAvailable(); return(true); default: return(false); } }
public void JoinIgloo(ZoneId igloo, string language, IJoinIglooErrorHandler errorHandler) { JoinIglooSequence joinIglooSequence = new JoinIglooSequence(clubPenguinClient, igloo, language, errorHandler); joinIglooSequence.JoinIgloo(); }