예제 #1
0
 public JoinIglooSequence(ClubPenguinClient client, ZoneId igloo, string language, IJoinIglooErrorHandler errorHandler)
 {
     clubPenguinClient = client;
     iglooToJoin       = igloo;
     this.language     = language;
     this.errorHandler = errorHandler;
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
    public void JoinIgloo(ZoneId igloo, string language, IJoinIglooErrorHandler errorHandler)
    {
        JoinIglooSequence joinIglooSequence = new JoinIglooSequence(clubPenguinClient, igloo, language, errorHandler);

        joinIglooSequence.JoinIgloo();
    }