Пример #1
0
        //Choosing which (if any) gps location to use for the intervention coordinates
        internal void SelectGPSLocation()
        {
            //Dissociate from last GPS coordinates
            if (gpsLocation != null)
            {
                gpsLocation.DeregisterInstanceObserver(this);
                gpsLocation = null;
            }

            //Find a team that has a GPS location and attach self to it
            foreach (TeamPin teamPin in getInterveningTeamsPin())
            {
                if (teamPin.getTeam().getGPSLocation() != null && teamPin.getTeam().getStatus() == Statuses.intervening)
                {
                    gpsLocation = teamPin.getTeam().getGPSLocation();
                    gpsLocation.RegisterInstanceObserver(this);
                }
            }
        }