public void SearchIDProvider(GameObject gameObject, List <PicturePointerData> list) { PicturePointerData result = list.Find(x => x.getGameObject() == gameObject); PictureAttribute attribute = result.getGameObject().GetComponent <PictureAttribute>(); Debug.Log(attribute.latitude + " " + attribute.longitude); Debug.Log(result.getID() + " ID "); var eventArgs = new SelectResultPictureDataArgs(result); OnSelectPicture(this, eventArgs); ShowObject = Instantiate(result.getGameObject()); ShowObject.AddComponent <ObjectManipulator>(); ShowObject.AddComponent <NearInteractionGrabbable>(); ShowObject.GetComponent <PointerHandler>().enabled = false; // Disabling it otherwise other Listener will get Events ShowObject.transform.position = result.getGameObject().transform.position; // This position used for a smooth transition from collection to view ShowPictureObject = (GameObject)Resources.Load("Prefab/ShowResult", typeof(GameObject)); ShowPictureObject = Instantiate(ShowPictureObject); ShowPictureObject.transform.parent = transform.parent; ShowPictureObject.transform.position = ShowObject.transform.position; // Get Original position from colloection for nice smooth transition ShowObject.transform.localScale = new Vector3(attribute.width / local_resize, attribute.height / local_resize, 0.0001f); // Setting size ShowObject.transform.parent = ShowPictureObject.transform; //ShowPictureObject.transform.GetChild(0).transform.position = result.getGameObject().transform.position; //ShowPictureObject.transform.GetChild(0).transform.localScale = new Vector3(0.5f,-0.3f,0.0001f); ShowPictureObject.GetComponent <SolverHandler>().enabled = true; ShowPictureObject.GetComponent <RadialView>().enabled = true; RadialView radialView = ShowPictureObject.GetComponent <RadialView>(); setImageProperties(radialView); setCollectionVisibility(false); initPictureObject(); initHandMenuPictureObject(attribute); HandMenuSuperImoseInit(); PictureMenuSuperImoseInit(); }
public void showPicture(PicturePointerData picturePointerData) { GameObject result = picturePointerData.getGameObject(); int id = picturePointerData.getID(); Vector3 orginalPosition = result.transform.position; GameObject EndResult; GameObject ShowPictureCollection = transform.GetChild(1).GetChild(0).GetChild(1).GetChild(0).GetChild(0).gameObject; foreach (Transform VARIABLE in ShowPictureCollection.transform) { if (id == VARIABLE.gameObject.GetComponent <PictureAttribute>().ID) { EndResult = VARIABLE.gameObject; EndResult.AddComponent <RadialView>(); break; } } }
public SelectResultPictureDataArgs(PicturePointerData pointerData) { this.pointerData = pointerData; }
public void SetCurrentPicture(PicturePointerData pointerData) { this.CurrentPicture = pointerData; }