Exemplo n.º 1
0
    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();
    }
Exemplo n.º 2
0
 private void HandlePictureSelect(object sender, SelectResultPictureDataArgs e)
 {
     model.SetCurrentPicture(e.get());
 }