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


Java FortDataOuterClass类代码示例

本文整理汇总了Java中POGOProtos.Map.Fort.FortDataOuterClass的典型用法代码示例。如果您正苦于以下问题:Java FortDataOuterClass类的具体用法?Java FortDataOuterClass怎么用?Java FortDataOuterClass使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FortDataOuterClass类属于POGOProtos.Map.Fort包,在下文中一共展示了FortDataOuterClass类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addLuredPokestop

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
public void addLuredPokestop(FortDataOuterClass.FortData data) {
    if (fortExists(data.getId())) return;
    LatLng location = new LatLng(data.getLatitude(), data.getLongitude());
    PPokemon marker = new PPokemon();
    marker.setId(location.toString());
    luredPokemon.put(data.getId(), addPokemon(location, marker, data.getLureInfo().getActivePokemonId()));
    addLuredPokestop(location, data.getId(), data.getLureInfo().getLureExpiresTimestampMs());
    forts.add(data.getId());
}
 
开发者ID:guipenedo,项目名称:PokeRadar,代码行数:10,代码来源:MapsActivity.java

示例2: getGyms

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
public Collection<FortDataOuterClass.FortData> getGyms() {
    try {
        return getMap().getMapObjects().getGyms();
    } catch (Exception e) {
        e.printStackTrace();

    }
    return new ArrayList<>();
}
 
开发者ID:mackenzieg,项目名称:PokemonGoBot,代码行数:10,代码来源:SimplePokemonBot.java

示例3: doInBackground

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
@Override
protected Void doInBackground(Void... voids) {
    PokemonGo go = MainActivity.go;
    if (go == null)
        return null;
    long time = System.currentTimeMillis();

    while (pos < settings.locations.size()) {
        if (isCancelled()) return null;
        go.setLatitude(settings.locations.get(pos).latitude);
        go.setLongitude(settings.locations.get(pos).longitude);
        pos++;
        try {
            Map map = new Map(go);
            MapObjects objects = map.getMapObjects(9);
            MapWrapper mapWrapper = new MapWrapper();
            if (settings.pokemon)
                mapWrapper.getPokemon().addAll(map.getCatchablePokemon());
            if (settings.pokestops)
                mapWrapper.getPokestops().addAll(objects.getPokestops());
            if (settings.spawnpoints) {
                mapWrapper.getSpawnpoints().addAll(map.getDecimatedSpawnPoints());
                mapWrapper.getSpawnpoints().addAll(map.getSpawnPoints());
            }
            if (settings.gyms)
                for (FortDataOuterClass.FortData fortdata : objects.getGyms()) {
                    if (!ids.contains(fortdata.getId())) {
                        Thread.sleep(350);
                        mapWrapper.getGyms().add(new PGym(new Gym(go, fortdata)));
                        ids.add(fortdata.getId());
                    }
                }
            publishProgress(mapWrapper);

            if (objects.getPokestops().size() > 0) {
                System.out.println("SUCCESSFUL REQUEST! TIME: " + (System.currentTimeMillis() - time) / 1000);
                time = System.currentTimeMillis();
            }
            System.out.println("POKESTOP COUNT: " + objects.getPokestops().size());
            System.out.println("SLEEPING " + ((long) go.getSettings().getMapSettings().getMinRefresh()));
            //Thread.sleep((long) go.getSettings().getMapSettings().getMinRefresh());
            Thread.sleep(6200);
            //Thread.sleep(10000);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    return null;
}
 
开发者ID:guipenedo,项目名称:PokeRadar,代码行数:50,代码来源:ScanTask.java

示例4: addPokestop

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
public void addPokestop(FortDataOuterClass.FortData data) {
    if (fortExists(data.getId())) return;
    addPokestop(new LatLng(data.getLatitude(), data.getLongitude()), data.getId());
}
 
开发者ID:guipenedo,项目名称:PokeRadar,代码行数:5,代码来源:MapsActivity.java

示例5: setGymsMarkers

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
private void setGymsMarkers(final GymsEvent event){
    if (mGoogleMap != null) {

        int markerSize = getResources().getDimensionPixelSize(R.dimen.gym_marker);
        Collection<FortDataOuterClass.FortData> gyms = event.getGyms();

        if(gyms != null && mPref.getShowGyms()) {

            Set<String> markerKeys = gymsList.keySet();

            for (final FortDataOuterClass.FortData gym : gyms) {

                double distanceFromCenterInMeters = MapHelper.distance(new LatLng(event.getLatitude(), event.getLongitude()), new LatLng(gym.getLatitude(), gym.getLongitude())) * 1000;

                if (!markerKeys.contains(gym.getId()) && distanceFromCenterInMeters <= MapHelper.convertStepsToRadius(mPref.getSteps())) {

                    RemoteImageLoader.loadMapIcon(
                            getActivity(), gymTeamImageUrls.get(gym.getOwnedByTeam().getNumber()),
                        markerSize, markerSize,
                            new RemoteImageLoader.Callback() {
                            @Override
                            public void onFetch(Bitmap bitmap) {

                                BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(bitmap);

                                Marker marker = mGoogleMap.addMarker(new MarkerOptions()
                                    .position(new LatLng(gym.getLatitude(), gym.getLongitude()))
                                    .title(getString(R.string.gym))
                                    .icon(bitmapDescriptor)
                                    .zIndex(MapHelper.LAYER_GYMS)
                                    .anchor(0.5f, 0.5f));

                                // adding gyms to list to be removed on next search
                                gymsList.put(gym.getId(), new GymMarkerExtended(gym, marker));
                            }
                        }
                    );
                }
            }
        }
        updateMarkers();

    } else {
        showMapNotInitializedError();
    }
}
 
开发者ID:shivarajp,项目名称:LivePokemonFinder,代码行数:47,代码来源:MapWrapperFragment.java

示例6: GymMarkerExtended

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
public GymMarkerExtended(FortDataOuterClass.FortData gym, Marker marker) {
    this.gym = gym;
    this.marker = marker;
}
 
开发者ID:shivarajp,项目名称:LivePokemonFinder,代码行数:5,代码来源:GymMarkerExtended.java

示例7: getGym

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
public FortDataOuterClass.FortData getGym() {
    return gym;
}
 
开发者ID:shivarajp,项目名称:LivePokemonFinder,代码行数:4,代码来源:GymMarkerExtended.java

示例8: setGym

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
public void setGym(FortDataOuterClass.FortData gym) {
    this.gym = gym;
}
 
开发者ID:shivarajp,项目名称:LivePokemonFinder,代码行数:4,代码来源:GymMarkerExtended.java

示例9: GymsEvent

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
public GymsEvent(Collection<FortDataOuterClass.FortData> gyms, double lat, double longitude) {
    this.gyms = gyms;
    this.lat = lat;
    this.longitude = longitude;
}
 
开发者ID:shivarajp,项目名称:LivePokemonFinder,代码行数:6,代码来源:GymsEvent.java

示例10: getGyms

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
public Collection<FortDataOuterClass.FortData> getGyms() {
    return gyms;
}
 
开发者ID:shivarajp,项目名称:LivePokemonFinder,代码行数:4,代码来源:GymsEvent.java

示例11: setGyms

import POGOProtos.Map.Fort.FortDataOuterClass; //导入依赖的package包/类
public void setGyms(Collection<FortDataOuterClass.FortData> gyms) {
    this.gyms = gyms;
}
 
开发者ID:shivarajp,项目名称:LivePokemonFinder,代码行数:4,代码来源:GymsEvent.java


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