Example #1
0
        private void Update()
        {
            if (!_MoveWithScreen)
            {
                return;
            }
            if (!_FirstPlaneFound)
            {
                return;
            }

            if (Input.touchCount > 0)
            {
                _MoveWithScreen = false;
                Destroy(_previewObject);
                //stop tracking new planes
                _ARPlaneManager.SetTrackablesActive(false);
                _ARPlaneManager.enabled = false;

                PlaceSelected?.Invoke(_lastHitPosePosition);
                return;
            }

            if (_ARRaycastManager.Raycast(_screenCenter, _hits, UnityEngine.XR.ARSubsystems.TrackableType.PlaneWithinPolygon))
            {
                var hitPose = _hits[0].pose;
                _lastHitPosePosition = hitPose.position;
                _ARSessionOrigin.MakeContentAppearAt(_previewObject.transform, hitPose.position);
            }
        }
Example #2
0
 private void ONPlaceSelected(PlaceSelected selected)
 {
     if (_place.Id == selected.Place.Id)
     {
         var transform       = this.transform;
         var parentTransform = (RectTransform)transform.parent.transform;
         parentTransform.localPosition = -transform.localPosition;
         panelImage.color = SELECTED_COLOR;
     }
     else
     {
         panelImage.color = UNSELECTED_COLOR;
     }
 }
Example #3
0
        private void FilterStudents()
        {
            Group  group = GroupSelected;
            string place = PlaceSelected;

            if (group.Name.Equals(""))
            {
                if (PlaceSelected.Equals(""))
                {
                    Students = DB.GetStudents();
                    return;
                }
                Students = DB.GetStudents().Where(stud => stud.BirthPlace.ToUpper().Contains(place.ToUpper())).ToList();
                return;
            }
            Students = DB.GetStudents().Where(stud => stud.BirthPlace.ToUpper().Contains(place.ToUpper()) && stud.IDGroup == group.IDGroup).ToList();
        }
Example #4
0
 private void ONPlaceSelected(PlaceSelected selected)
 {
     transform.localScale = selected.Place.GooglePlaceId == _place.GooglePlaceId ? LARGE_SIZE : NORMAL_SIZE;
 }
Example #5
0
 public void Select()
 {
     _signalBus.Fire(PlaceSelected.create(_place));
 }